:root {
  --bg-color: #f5f5f5;
  --text-color: #333;
  --card-bg: white;
  --border-color: #dee2e6;
  --primary-color: #3498db;
  --danger-color: #e74c3c;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #f5f5f5;
  --card-bg: #2d2d2d;
  --border-color: #404040;
  --primary-color: #2980b9;
  --danger-color: #c0392b;
  --success-color: #27ae60;
  --warning-color: #d35400;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

.app {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  margin-bottom: 20px;
}

.header-top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--border-color);
}

.header h1 {
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 10px;
}

.current-time {
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: bold;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.time-container {
  margin: 20px 0;
  padding: 10px;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.time-bar-wrapper {
  position: relative;
  width: 100%;
  height: 150px;
  overflow-x: hidden;
  padding: 10px;
  background: var(--card-bg);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.time-bar {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  background: var(--card-bg);
}

.time-segment {
  position: relative;
  flex: 1;
  min-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
}

.hour-label {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  padding: 10px;
  font-size: 14px;
  color: var(--text-color);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  z-index: 2;
}

.current-hour {
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.time-range {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
}

.minute-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.minute-marks {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
}

.minute-mark {
  position: relative;
  flex: 1;
  height: 100%;
  border-left: 1px solid var(--border-color);
}

.minute-label {
  display: block;
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-color);
  opacity: 0.8;
}

.current-time-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--danger-color);
  z-index: 3;
  transition: left 0.1s linear;
  pointer-events: none;
}

.current-time-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  width: 10px;
  height: 10px;
  background: var(--danger-color);
  border-radius: 50%;
}

.current-hour-segment {
  background: rgba(52, 152, 219, 0.1);
}

.current-hour-segment .current-hour {
  color: var(--danger-color);
}

.tasks-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.active-tasks, .completed-tasks, .task-input {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.conflict-warning {
  background-color: var(--warning-color);
  color: white;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
  text-align: center;
  font-weight: bold;
}

h3 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

ul {
  list-style: none;
}

.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.task-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.task-text {
  font-size: 16px;
  color: var(--text-color);
}

.task-time {
  font-size: 14px;
  color: var(--text-color);
  opacity: 0.8;
}

.task-actions {
  display: flex;
  gap: 8px;
}

.complete-btn, .delete-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.complete-btn {
  background-color: var(--success-color);
  color: white;
}

.delete-btn {
  background-color: var(--danger-color);
  color: white;
}

.complete-btn:hover, .delete-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.task-item.completed {
  opacity: 0.7;
}

.task-item.completed .task-text {
  text-decoration: line-through;
}

.task-input {
  margin-bottom: 20px;
  padding: 15px;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.task-input h3 {
  margin-bottom: 10px;
  color: var(--text-color);
}

.add-task {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#taskInput {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--secondary-color);
  color: var(--text-color);
  font-size: 16px;
  resize: vertical;
  min-height: 100px;
  max-height: 200px;
}

#taskInput:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

#addTaskBtn {
  align-self: flex-end;
  padding: 8px 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

#addTaskBtn:hover {
  background: #357abd;
}

.action-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background-color: var(--primary-color);
  opacity: 0.9;
  transform: translateY(-2px);
}

.action-btn.clear {
  background-color: var(--danger-color);
}

.action-btn.clear:hover {
  background-color: var(--danger-color);
  opacity: 0.9;
}

.completed-task {
  opacity: 0.7;
  text-decoration: line-through;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Responsive design */
@media (max-width: 1400px) {
  .time-bar-wrapper {
    min-width: 600px;
  }
  
  .time-bar {
    min-height: 1000px;
  }
  
  .minute-container {
    height: 120px;
  }
}

@media (max-width: 1200px) {
  .time-container {
    flex-direction: column;
  }
  
  .time-bar-wrapper,
  .task-panel {
    min-width: 100%;
  }
  
  .time-bar {
    min-height: 800px;
  }
  
  .minute-container {
    height: 100px;
  }
}

@media (max-width: 768px) {
  .app {
    padding: 10px;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .current-time {
    font-size: 1.2rem;
  }
  
  .time-bar-wrapper {
    height: 120px;
  }
  
  .minute-container {
    height: 80px;
  }
  
  .minute-label {
    font-size: 0.8rem;
  }
  
  .task-panel {
    min-width: 100%;
  }

  .header-top {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .time-container {
    margin: 10px 0;
  }

  .time-bar-wrapper {
    padding: 5px;
  }

  .hour-label {
    font-size: 0.8rem;
  }

  .minute-mark {
    width: 2px;
  }

  .minute-label {
    font-size: 0.7rem;
    padding: 2px 4px;
  }

  .tasks-container {
    padding: 10px;
  }

  .task-input textarea {
    min-height: 80px;
    font-size: 16px;
  }

  .task-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .task-content {
    width: 100%;
  }

  .task-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .complete-btn, .delete-btn {
    padding: 8px 16px;
    font-size: 14px;
  }

  .zoom-controls {
    margin-bottom: 10px;
  }

  .zoom-btn {
    padding: 8px 16px;
    font-size: 16px;
  }

  #zoomLevel {
    font-size: 14px;
  }

  .current-time-indicator {
    width: 3px;
  }

  .current-time-indicator::after {
    width: 8px;
    height: 8px;
  }
}

/* Tablet Compatibility */
@media (min-width: 769px) and (max-width: 1024px) {
  .app {
    padding: 15px;
  }

  .time-bar-wrapper {
    padding: 8px;
  }

  .hour-label {
    font-size: 0.9rem;
  }

  .minute-mark {
    width: 2.5px;
  }

  .minute-label {
    font-size: 0.8rem;
  }

  .task-item {
    padding: 10px;
  }
} 
