:root {
      --main-color: rgb(27,188,220);
      --main-color-hover: rgb(62, 199, 226);
      --background-color: rgb(231, 231, 231);
      --white: #ffffff;
      --text-primary: rgb(33, 33, 33);
      --text-secondary: rgb(68, 68, 68);
      --text-muted: rgb(128, 128, 128);
      --border-color: rgb(213, 212, 212);
      --shadow: 0 0 10px 4px rgba(0, 0, 0, 0.1);
      --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    /* Base Styles */
    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      background-color: var(--background-color);
      font-family: 'Inter', sans-serif;
      color: var(--text-primary);
      min-height: 100vh;
    }

    /* Navigation */
    nav {
      display: flex;
      padding: 1rem 1.5rem;
      border-bottom: 1px solid var(--border-color);
      align-items: center;
      background-color: var(--white);
      justify-content: space-between;
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .nav-left {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .logo {
      margin-left: 10px;
      font-size: 1.3rem;
      font-weight: 600;
    }

    .fa-clock {
      color: var(--main-color);
      font-size: 1.3rem;
    }

    .fa-gear {
      font-size: 1.3rem;
      color: var(--text-secondary);
      cursor: pointer;
      transition: color 0.2s;
    }

    .fa-gear:hover {
      color: var(--main-color);
    }

    /* Main Content Container */
    main {
      padding: 1rem;
      max-width: 1400px;
      margin: 0 auto;
    }

    /* Timer Container */
    .timer-container-2 {
      display: flex;
      justify-content: center;
      margin-bottom: 2rem;
    }

    .timer-container {
      display: none;
      background-color: var(--white);
      width: 100%;
      max-width: 60rem;
      min-height: 25rem;
      border-radius: 15px;
      box-shadow: var(--shadow);
      padding: 1.5rem;
    }

    .timer-container.active {
      display: block;
    }

    /* Timer Options */
    .options {
      display: flex;
      justify-content: center;
      gap: 0;
      flex-wrap: wrap;
      margin-bottom: 2rem;
    }

    .pomodoro, .short, .long {
      padding: 1rem 2rem;
      border: none;
      background-color: transparent;
      border-radius: 25px;
      margin: 0.25rem;
      font-size: 1.1rem;
      font-weight: 600;
      color: rgb(73, 73, 73);
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    .pomodoro.active, .short.active, .long.active {
      background-color: var(--main-color);
      color: var(--white);
    }

    .pomodoro:hover, .short:hover, .long:hover {
      background-color: var(--main-color);
      filter: opacity(0.8);
    }

    .pomodoro.active:hover, .short.active:hover, .long.active:hover {
      background-color: var(--main-color);
      filter: opacity(0.8);
    }

    /* Countdown */
    .countdown {
      display: flex;
      justify-content: center;
      font-size: 6rem;
      font-weight: 800;
      margin: 1rem 0;
      text-align: center;
    }

    .footnote {
      display: flex;
      justify-content: center;
      color: var(--text-muted);
      margin-bottom: 2rem;
      text-align: center;
    }

    /* Buttons */
    .buttons {
      display: flex;
      justify-content: center;
      gap: 1rem;
      flex-wrap: wrap;
      align-items: center;
    }

    .start, .pause {
      display: none;
      padding: 1.2rem 3rem;
      border: none;
      border-radius: 55px;
      background-color: var(--main-color);
      font-size: 1.4rem;
      font-weight: 600;
      color: var(--white);
      box-shadow: 0 5px 17px 1px rgba(0, 0, 0, 0.2);
      cursor: pointer;
      transition: background-color 0.2s;
    }

    .start.active, .pause.active {
      display: block;
    }

    .start:hover, .pause:hover {
      background-color: var(--main-color);
      filter: opacity(0.8);
    }

    .restart {
      background-color: rgb(215, 215, 215);
      padding: 1rem 1.5rem;
      border-radius: 50%;
      border: none;
      box-shadow: 0 0 10px 4px rgba(0, 0, 0, 0.081);
      cursor: pointer;
      transition: background-color 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .restart:hover {
      background-color: rgb(200, 200, 200);
    }

    /* Music Player */
    .music-player {
      background-color: #f5f5f5;
      border-radius: 15px;
      width: 100%;
      max-width: 60rem;
      margin: 0 auto 2rem;
      padding: 1.5rem;
      box-shadow: var(--shadow-light);
    }

    .catagory {
      font-size: 1.2rem;
      font-weight: 600;
      padding: 0 0 1rem 0;
      margin-bottom: 1rem;
      border-bottom: 1px solid #e0e0e0;
    }

    .fa-music {
      margin-right: 10px;
      color: var(--main-color);
    }

    .music-player-content {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1.5rem;
      flex-wrap: wrap;
      gap: 1rem;
    }

    .music-info {
      display: flex;
      align-items: center;
      min-width: 200px;
    }

    .music-icon {
      width: 50px;
      height: 50px;
      background-color: #e0e0e0;
      border-radius: 8px;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-right: 15px;
      flex-shrink: 0;
    }

    .music-icon i {
      font-size: 24px;
      color: #666;
    }

    .music-details {
      display: flex;
      flex-direction: column;
    }

    .music-title {
      font-size: 1rem;
      font-weight: 600;
      color: #333;
      margin-bottom: 4px;
    }

    .music-subtitle {
      font-size: 0.9rem;
      color: #666;
    }

    /* Music Controls */
    .music-controls {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .control-btn {
      background: none;
      border: none;
      cursor: pointer;
      padding: 8px;
      border-radius: 50%;
      transition: background-color 0.2s;
    }

    .control-btn:hover {
      background-color: rgba(0,0,0,0.05);
    }

    .control-btn i {
      font-size: 18px;
      color: #666;
    }

    .control-btn.play {
      background-color: var(--main-color);
      width: 40px;
      height: 40px;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 0;
    }

    .control-btn.play:hover {
       background-color: var(--main-color);
      filter: opacity(0.8);
    }

    .control-btn.play i {
      color: var(--white);
      font-size: 16px;
    }

    /* Progress Container */
    .progress-container {
      width: 100%;
    }

    .progress-bar {
      height: 6px;
      background-color: #e0e0e0;
      border-radius: 3px;
      position: relative;
      margin-bottom: 8px;
    }

    .progress-bar .progress {
      position: absolute;
      height: 100%;
      background-color: var(--main-color);
      border-radius: 3px;
      width: 0%;
      transition: width 0.2s;
    }

    .time-info {
      display: flex;
      justify-content: space-between;
      font-size: 0.8rem;
      color: var(--main-color);
      margin-bottom: 2rem;
    }

    /* Sound and Music Options */
    .sound-options-container, .music-options-container {
      margin-bottom: 2rem;
    }

    .sound-options-text, .music-options-text {
      font-weight: 600;
      margin-bottom: 1rem;
      color: var(--text-secondary);
    }

    .sound-options, .music-options {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 1rem;
    }

    .nature, .rain, .fireplace, .white-noise, 
    .lofi, .classical, .jazz, .minecraft {
      display: flex;
      background-color: rgb(230, 230, 230);
      border-radius: 12px;
      height: 80px;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
      cursor: pointer;
      font-weight: 500;
    }

    .nature:hover, .rain:hover, .fireplace:hover, .white-noise:hover,
    .lofi:hover, .classical:hover, .jazz:hover, .minecraft:hover {
      transform: scale(1.03);
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .fa-leaf { color: green; margin-right: 8px; }
    .fa-cloud-rain { color: rgb(0, 179, 255); margin-right: 8px; }
    .fa-fire { color: rgb(255, 81, 0); margin-right: 8px; }
    .fa-headphones { color: rgb(0, 0, 0); margin-right: 8px; }
    .fa-radio { color: rgb(0, 0, 0); margin-right: 8px; }
    .bx-piano-grand { color: rgb(0, 0, 0); margin-right: 8px; }
    .bx-list-music { color: rgb(0, 0, 0); margin-right: 8px; font-size: 18px; }
    .fa-house { color: rgb(0, 0, 0); margin-right: 8px; }

    /* Task Container */
    .task-container {
      background-color: #f5f5f5;
      border-radius: 15px;
      box-shadow: var(--shadow-light);
      padding: 1.5rem;
      max-width: 60rem;
      margin: 0 auto 2rem;
    }

    .task-container .catagory i {
      color: var(--main-color);
      margin-right: 10px;
    }

    #clear {
      font-size: 0.9rem;
      color: #666;
      font-weight: 500;
      cursor: pointer;
      text-align: right;
      margin-bottom: 1rem;
      transition: color 0.2s;
    }

    #clear:hover {
      color: var(--main-color);
    }

    .task-input-container {
      display: flex;
      gap: 0.5rem;
      margin-bottom: 1rem;
      align-items: center;
    }

    .task-container input[type="text"] {
      flex: 1;
      padding: 12px 16px;
      border-radius: 10px;
      border: 1px solid #ddd;
      font-size: 1rem;
      outline: none;
      transition: border-color 0.2s;
    }

    .task-container input[type="text"]:focus {
      border-color: var(--main-color);
    }

    .task-container .add {
      width: 44px;
      height: 44px;
      border-radius: 8px;
      background-color: var(--main-color);
      border: none;
      color: var(--white);
      font-size: 20px;
      font-weight: 500;
      cursor: pointer;
      transition: background-color 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .task-container .add:hover {
       background-color: var(--main-color);
      filter: opacity(0.8);
    }

    .tasks {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .task {
      background-color: #f9f9f9;
      border-radius: 10px;
      padding: 1rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border: 1px solid #ececec;
      transition: box-shadow 0.2s;
    }

    .task:hover {
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .task-left {
      display: flex;
      align-items: center;
      gap: 12px;
      flex: 1;
      min-width: 0;
    }

    .task input[type="checkbox"] {
      width: 16px;
      height: 16px;
      cursor: pointer;
      flex-shrink: 0;
    }

    .task p {
      font-size: 1rem;
      color: #333;
      margin: 0;
      flex: 1;
      word-break: break-word;
    }

    .task i {
      color: var(--main-color);
      cursor: pointer;
      font-size: 16px;
      transition: transform 0.2s ease;
      flex-shrink: 0;
      padding: 4px;
    }

    .task i:hover {
      transform: scale(1.2);
    }

    /* Settings Modal */
    .settings-modal {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.4);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }

    .settings-content {
      background: var(--white);
      border-radius: 18px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.2);
      padding: 2rem;
      width: 100%;
      max-width: 500px;
      max-height: 90vh;
      overflow-y: auto;
      font-family: 'Inter', sans-serif;
      color: #222;
    }

    .settings-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 2rem;
      border-bottom: 1px solid #eee;
      padding-bottom: 1rem;
    }

    .settings-title {
      font-size: 1.5rem;
      font-weight: 700;
    }

    .settings-close {
      font-size: 2rem;
      cursor: pointer;
      color: #888;
      transition: color 0.2s;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
    }

    .settings-close:hover {
      color: #e57373;
      background-color: #f5f5f5;
    }

    .settings-section {
      margin-bottom: 2rem;
    }

    .settings-section h3 {
      margin-bottom: 1rem;
      color: var(--text-secondary);
      font-size: 1.1rem;
    }

    .settings-section label {
      display: block;
      font-size: 1rem;
      margin-bottom: 0.5rem;
      color: #444;
    }

    .settings-section input[type="number"] {
      width: 80px;
      margin-left: 0.5rem;
      border-radius: 6px;
      border: 1px solid #ddd;
      padding: 6px 8px;
      font-size: 1rem;
    }

    .settings-section input[type="range"] {
      width: 100%;
      accent-color: var(--main-color);
      margin: 0.5rem 0;
    }

    .settings-section input[type="color"] {
      width: 50px;
      height: 50px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      margin-bottom: 1rem;
    }

    .settings-save {
      background: var(--main-color);
      color: var(--white);
      border: none;
      border-radius: 8px;
      padding: 12px 24px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s;
      width: 100%;
    }

    .settings-save:hover {
       background-color: var(--main-color);
      filter: opacity(0.8);
    }

    /* Footer */
    footer {
      width: 100%;
      text-align: center;
      padding: 2rem 1rem;
      font-size: 0.9rem;
      color: #888;
      background: transparent;
      letter-spacing: 1px;
    }

    /* Responsive Design */
    @media (max-width: 1200px) {
      main {
        padding: 0.5rem;
      }
      
      .timer-container, .music-player, .task-container {
        margin: 0 auto 1.5rem;
      }
    }

    @media (max-width: 768px) {
      nav {
        padding: 1rem;
      }

      .logo {
        font-size: 1.1rem;
      }

      .countdown {
        font-size: 4rem;
      }

      .options {
        justify-content: center;
      }

      .pomodoro, .short, .long {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
      }

      .start, .pause {
        padding: 1rem 2.5rem;
        font-size: 1.2rem;
      }

      .music-player-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
      }

      .music-info {
        justify-content: center;
        margin-bottom: 1rem;
      }

      .music-controls {
        justify-content: center;
      }

      .sound-options, .music-options {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      }

      .nature, .rain, .fireplace, .white-noise, 
      .lofi, .classical, .jazz, .minecraft {
        height: 70px;
        font-size: 0.9rem;
      }

      .settings-content {
        padding: 1.5rem;
        margin: 1rem;
      }
    }

    @media (max-width: 480px) {
      nav {
        padding: 0.75rem;
      }

      .logo {
        font-size: 1rem;
      }

      .timer-container, .music-player, .task-container {
        border-radius: 10px;
        padding: 1rem;
      }

      .countdown {
        font-size: 3rem;
      }

      .options {
        gap: 0.25rem;
      }

      .pomodoro, .short, .long {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
      }

      .start, .pause {
        padding: 0.8rem 2rem;
        font-size: 1rem;
      }

      .buttons {
        flex-direction: column;
        gap: 0.75rem;
      }

      .sound-options, .music-options {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
      }

      .nature, .rain, .fireplace, .white-noise, 
      .lofi, .classical, .jazz, .minecraft {
        height: 60px;
        font-size: 0.8rem;
      }

      .task-input-container {
        flex-direction: column;
        gap: 0.75rem;
      }

      .task-container input[type="text"] {
        width: 100%;
      }

      .settings-content {
        padding: 1rem;
        margin: 0.5rem;
      }

      .settings-title {
        font-size: 1.2rem;
      }

      footer {
        font-size: 0.8rem;
        padding: 1.5rem 1rem;
      }
    }

    @media (max-width: 320px) {
      .countdown {
        font-size: 2.5rem;
      }

      .sound-options, .music-options {
        grid-template-columns: 1fr;
      }

      .nature, .rain, .fireplace, .white-noise, 
      .lofi, .classical, .jazz, .minecraft {
        height: 55px;
      }
    }
    .dark-mode {
  --main-color: rgb(27,188,220);
  --main-color-hover: rgb(62, 199, 226);
  --background-color: #181a1b;
  --white: #23272a;
  --text-primary: #f5f6fa;
  --text-secondary: #b0b3b8;
  --text-muted: #888;
  --border-color: #23272a;
  --shadow: 0 0 10px 4px rgba(0,0,0,0.4);
  --shadow-light: 0 2px 10px rgba(0,0,0,0.15);
}

.dark-mode body {
  background-color: var(--background-color);
  color: var(--text-primary);
}

.dark-mode nav,
.dark-mode .timer-container,
.dark-mode .music-player,
.dark-mode .task-container,
.dark-mode .settings-content {
  background-color: var(--white);
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

.dark-mode .task {
  background-color: #23272b;
  border-color: #23272b;
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
  color: #fff;
}

.dark-mode .task p {
  color: #fff;
}

.dark-mode .music-icon,
.dark-mode .progress-bar {
  background-color: #23272a;
}

.dark-mode .progress-bar .progress {
  background-color: var(--main-color);
}

.dark-mode .pomodoro, 
.dark-mode .short, 
.dark-mode .long {
  color: var(--text-secondary);
}

.dark-mode .pomodoro.active, 
.dark-mode .short.active, 
.dark-mode .long.active {
  color: var(--white);
}

.dark-mode .nature, 
.dark-mode .rain, 
.dark-mode .fireplace, 
.dark-mode .white-noise, 
.dark-mode .lofi, 
.dark-mode .classical, 
.dark-mode .jazz, 
.dark-mode .minecraft {
  background-color: #23272a;
  color: var(--text-primary);
}

.dark-mode .nature:hover, 
.dark-mode .rain:hover, 
.dark-mode .fireplace:hover, 
.dark-mode .white-noise:hover, 
.dark-mode .lofi:hover, 
.dark-mode .classical:hover, 
.dark-mode .jazz:hover, 
.dark-mode .minecraft:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.dark-mode .settings-close:hover {
  background-color: #23272a;
}

.dark-mode .settings-section input[type="number"],
.dark-mode .settings-section input[type="color"] {
  background: #23272a;
  color: var(--text-primary);
  border: 1px solid #444;
}

.dark-mode .settings-save {
  background: var(--main-color);
  color: var(--white);
}

/* --- DARK MODE STYLES --- */
html.dark-mode, .dark-mode body {
  background: #181c20;
  color: #e0e0e0;
}

/* Music progress bar visible in dark mode */
/* .dark-mode .progress {
  background: #333 !important;
}
.dark-mode .progress::after, .dark-mode .progress-bar {
  background: #1bbcdc !important; /* or your accent color 
}

/* Sound/music option boxes shadow in dark mode */
.dark-mode .nature, 
.dark-mode .rain, 
.dark-mode .fireplace, 
.dark-mode .white-noise, 
.dark-mode .lofi, 
.dark-mode .classical, 
.dark-mode .jazz, 
.dark-mode .minecraft {
  box-shadow: 0 4px 16px rgba(0,0,0,0.45), 0 1.5px 0 #222;
  border: 1px solid #222;
}

/* Remove unused/incorrect selectors for .sound-option/.music-option if present */

/* --- Fix progress bar for both modes --- */
.progress-bar {
  height: 6px;
  background-color: #e0e0e0;
  border-radius: 3px;
  position: relative;
  margin-bottom: 8px;
}

.progress-bar .progress {
  position: absolute;
  height: 100%;
  background-color: var(--main-color);
  border-radius: 3px;
  width: 0%;
  transition: width 0.2s;
}

/* --- DARK MODE --- */
.dark-mode .progress-bar {
  background-color: #292d30;
}
.dark-mode .progress-bar .progress {
  background-color: var(--main-color);
}

/* --- Restore dark mode todo input bar styling --- */
.dark-mode .task-container input[type="text"] {
  background: #23272b;
  color: #e0e0e0;
  border: 1px solid #333;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* --- Enhance dark mode task box and checkbox --- */
.dark-mode .task {
  background-color: #23272b;
  border-color: #23272b;
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
  color: #fff;
}

.dark-mode .task p {
  color: #fff;
}

.dark-mode .task input[type="checkbox"] {
  accent-color: var(--main-color);
  background: #181a1b;
  border: 1px solid #444;
}