* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: #0a0a0a;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1a1a1a;
  position: relative;
}

.header-left, .header-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-right {
  justify-content: flex-end;
}

.menu-btn {
  background: none;
  border: none;
  color: #999;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}

.menu-btn:hover {
  color: #fff;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 1rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 0.5rem;
  z-index: 100;
  min-width: 180px;
}

.dropdown-menu button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: none;
  border: none;
  color: #fff;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.dropdown-menu button:hover {
  background: #2a2a2a;
}

.time-format-btn {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #999;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.time-format-btn:hover {
  background: #2a2a2a;
  color: #fff;
}

.nav-btn {
  background: none;
  border: none;
  color: #999;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}

.nav-btn:hover {
  color: #fff;
}

.current-date {
  color: #fff;
  font-weight: 500;
  min-width: 80px;
  text-align: center;
}

.current-time {
  color: #999;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
}

.wheel-container {
  position: relative;
}

.wheel-container canvas {
  display: block;
  max-width: 100%;
}

/* Task Tooltip */
.task-tooltip {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  min-width: 250px;
  z-index: 50;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.tooltip-color {
  width: 4px;
  border-radius: 2px;
}

.tooltip-content {
  flex: 1;
}

.tooltip-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.tooltip-time {
  color: #999;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.tooltip-duration {
  color: #666;
  font-size: 0.75rem;
}

/* Action Buttons */
.action-buttons {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 40;
}

.btn-primary, .btn-secondary {
  padding: 0.875rem 1.5rem;
  border-radius: 24px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.btn-primary {
  background: #fff;
  color: #000;
}

.btn-primary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
}

.btn-secondary:hover {
  background: #2a2a2a;
  transform: translateY(-2px);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.2s;
}

.modal-content {
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  color: #999;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #6366f1;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.category-btn {
  padding: 0.75rem;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.category-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.time-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 0.5rem;
}

.time-input input {
  width: 60px;
  padding: 0.25rem;
  background: transparent;
  border: none;
  color: #fff;
  text-align: center;
  font-size: 1rem;
}

.time-input span {
  color: #666;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-cancel, .btn-save {
  flex: 1;
  padding: 0.875rem;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.btn-cancel {
  background: #1a1a1a;
  color: #999;
  border: 1px solid #333;
}

.btn-cancel:hover {
  background: #2a2a2a;
  color: #fff;
}

.btn-save {
  background: #6366f1;
  color: #fff;
}

.btn-save:hover {
  background: #4f46e5;
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  color: #666;
  font-size: 0.875rem;
  border-top: 1px solid #1a1a1a;
}

.footer a {
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 1rem;
  }

  .header-center {
    gap: 0.5rem;
  }

  .current-date {
    min-width: 60px;
    font-size: 0.875rem;
  }

  .main-content {
    padding: 1rem;
  }

  .action-buttons {
    flex-direction: column;
    bottom: 1rem;
    gap: 0.5rem;
  }

  .btn-primary, .btn-secondary {
    padding: 0.75rem 1.25rem;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .task-tooltip {
    bottom: 140px;
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  .header-center {
    flex-direction: column;
    gap: 0.25rem;
  }

  .time-format-btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
  }
}