
  :root {
    --bg: #0a0b10;
    --panel: #121424;
    --accent: #8a5cff;
    --accent-2: #00e3ff;
    --text: #e6e6f0;
    --muted: #9aa0a6;
    --ok: #29e67a;
    --warn: #ffbf47;
    --shadow: rgba(0, 0, 0, 0.4);
    --highlight: rgba(138, 92, 255, 0.3);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }
  body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Ubuntu, "Helvetica Neue", Arial, sans-serif;
    background: 
      radial-gradient(800px 400px at 20% -10%, #1a1038 0%, transparent 60%),
      radial-gradient(700px 350px at 120% 20%, #033b49 0%, transparent 60%),
      linear-gradient(180deg, #07080d, #0a0b10);
    color: var(--text);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(12px, 3vw, 16px);
    min-height: 100vh;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    z-index: 1;
  }
  /* Background particle animation */
  .particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
  }
  @media (max-width: 767px) {
    .particles { display: none; } /* Hide particles on mobile for performance */
  }
  .particle {
    position: absolute;
    background: rgb(67, 4, 253);
    border-radius: 50%;
    animation: float linear infinite;
    box-shadow: 0 0 10px rgba(76, 14, 233, 0.919);
  }
  @keyframes float {
    0% { transform: translateY(0) translateX(0); opacity: 0.4; }
    50% { opacity: 0.7; }
    100% { transform: translateY(-100vh) translateX(calc(var(--dx) * 1px)); opacity: 0.2; }
  }
  .app {
    width: min(100%, 96vw);
    display: grid;
    gap: clamp(10px, 2.5vw, 12px);
    grid-template-columns: 1fr;
    margin: 0 auto;
    max-width: 1200px;
    position: relative;
    z-index: 2;
  }
  @media (min-width: 768px) {
    .app {
      grid-template-columns: 1.3fr 0.7fr;
      gap: clamp(16px, 3vw, 20px);
      padding: clamp(20px, 3.5vw, 24px);
      background: rgba(18, 20, 36, 0.4);
      border-radius: 24px;
      box-shadow: 0 12px 60px var(--shadow);
      backdrop-filter: blur(12px);
    }
  }
  .card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: clamp(12px, 2.5vw, 14px);
    padding: clamp(12px, 2.5vw, 14px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px var(--shadow), inset 0 0 30px rgba(138, 92, 255, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px var(--shadow), inset 0 0 35px rgba(138, 92, 255, 0.1);
  }
  @media (min-width: 768px) {
    .card { padding: clamp(16px, 3vw, 20px); border-radius: 16px; }
  }
  .title {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 10px);
    font-weight: 700;
    letter-spacing: 0.6px;
    font-size: clamp(1rem, 4vw, 1.1rem);
  }
  @media (min-width: 768px) {
    .title { font-size: clamp(1.2rem, 3vw, 1.4rem); }
  }
  .pill {
    font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
  }
  @media (min-width: 768px) {
    .pill { font-size: clamp(0.8rem, 2vw, 0.9rem); padding: 0.4rem 0.8rem; }
  }
  .status {
    font-weight: 800;
    letter-spacing: 1px;
    font-size: clamp(0.95rem, 3.5vw, 1.05rem);
    transition: color 0.3s ease;
  }
  @media (min-width: 768px) {
    .status { font-size: clamp(1.2rem, 2.5vw, 1.3rem); }
  }
  .status.work { color: #ff6b6b; }
  .status.break { color: var(--accent-2); }
  .status.long { color: var(--ok); }
  .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(8px, 1.5vw, 10px);
    flex-wrap: wrap;
  }
  .grid { display: grid; gap: clamp(10px, 2vw, 12px); }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  @media (min-width: 480px) {
    .grid.two { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
    .grid.three { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
  }
  @media (min-width: 768px) {
    .grid.two { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .grid.three { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  }
  label {
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    color: var(--muted);
    margin-bottom: 5px;
    display: block;
    font-weight: 500;
  }
  @media (min-width: 768px) {
    .label { font-size: clamp(0.9rem, 2vw, 1rem); margin-bottom: 6px; }
  }
  input[type="number"] {
    width: 100%;
    padding: clamp(0.7rem, 2.5vw, 0.8rem);
    background: #0f1120;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    outline: none;
    font-size: clamp(0.9rem, 3vw, 1rem);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  @media (min-width: 768px) {
    input[type="number"] { padding: clamp(0.8rem, 2vw, 0.9rem); font-size: clamp(1rem, 2.5vw, 1.1rem); }
  }
  input[type="number"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--highlight);
  }
  .switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  }
  @media (min-width: 768px) {
    .switch { font-size: clamp(0.9rem, 2vw, 1rem); gap: 10px; }
  }
  .switch input { display: none; }
  .track {
    width: clamp(40px, 9vw, 44px);
    height: clamp(22px, 5vw, 24px);
    background: #0f1120;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    position: relative;
    transition: background 0.3s ease;
  }
  @media (min-width: 768px) {
    .track { width: 48px; height: 26px; }
  }
  .thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: clamp(18px, 4vw, 20px);
    height: clamp(18px, 4vw, 20px);
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff, #c3c7ff);
    transition: left 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
  @media (min-width: 768px) {
    .thumb { width: 22px; height: 22px; }
  }
  .switch input:checked + .track {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-color: var(--accent);
  }
  .switch input:checked + .track .thumb { left: clamp(18px, 4vw, 20px); }
  @media (min-width: 768px) {
    .switch input:checked + .track .thumb { left: 22px; }
  }
  .progress-wrap { display: grid; place-items: center; padding: clamp(10px, 2vw, 12px) 0; }
  .ring {
    width: clamp(160px, 45vw, 200px);
    height: clamp(160px, 45vw, 200px);
    border-radius: 50%;
    background: 
      radial-gradient(closest-side, #0f1120 80%, transparent 81% 100%),
      conic-gradient(var(--accent) var(--p), rgba(255, 255, 255, 0.1) 0);
    filter: drop-shadow(0 0 14px rgba(138, 92, 255, 0.5));
    display: grid;
    place-items: center;
    transition: all 0.5s ease;
  }
  @media (min-width: 768px) {
    .ring { width: clamp(240px, 25vw, 280px); height: clamp(240px, 25vw, 280px); }
  }
  .time {
    font-size: clamp(32px, 8vw, 40px);
    font-weight: 900;
    letter-spacing: 1.2px;
    text-shadow: 0 0 14px rgba(0, 227, 255, 0.3);
    transition: transform 0.3s ease;
  }
  .time.running { transform: scale(1.05); }
  @media (min-width: 768px) {
    .time { font-size: clamp(48px, 5vw, 60px); }
  }
  .controls {
    display: flex;
    gap: clamp(10px, 2vw, 12px);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: clamp(10px, 2vw, 12px);
  }
  button {
    border: none;
    padding: clamp(0.8rem, 2.5vw, 1rem) clamp(1rem, 3vw, 1.4rem);
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.7px;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 8px 25px rgba(0, 227, 255, 0.3), inset 0 0 25px rgba(255, 255, 255, 0.08);
    transition: transform 0.1s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    font-size: clamp(0.9rem, 3vw, 1rem);
    min-width: clamp(90px, 25vw, 100px);
    touch-action: manipulation;
  }
  @media (min-width: 768px) {
    button { padding: 1.1rem 1.6rem; font-size: clamp(1rem, 2.5vw, 1.1rem); min-width: 120px; }
  }
  button:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 227, 255, 0.4); }
  button.secondary {
    background: #11152c;
    color: #dbeafe;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  }
  button.ghost {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    color: #cbd5e1;
    box-shadow: none;
  }
  button:active { transform: scale(0.97); }
  button:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--highlight);
  }
  .meta {
    display: flex;
    gap: clamp(10px, 2vw, 12px);
    justify-content: center;
    color: var(--muted);
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    flex-wrap: wrap;
    margin-top: clamp(10px, 2vw, 12px);
  }
  @media (min-width: 768px) {
    .meta { font-size: clamp(0.9rem, 2vw, 1rem); }
  }
  .dot {
    width: clamp(6px, 1.5vw, 7px);
    height: clamp(6px, 1.5vw, 7px);
    border-radius: 50%;
    background: var(--warn);
    display: inline-block;
    margin-right: 5px;
  }
  @media (min-width: 768px) {
    .dot { width: 8px; height: 8px; }
  }
  .ok { color: var(--ok); }
  .kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: clamp(0.75rem, 2.5vw, 0.85rem);
    background: #0f1120;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
  @media (min-width: 768px) {
    .kbd { font-size: clamp(0.85rem, 2vw, 0.95rem); padding: 0.3rem 0.7rem; }
  }
  .note-card {
    padding: clamp(12px, 2.5vw, 14px);
    position: relative;
    overflow: hidden;
  }
  @media (min-width: 768px) {
    .note-card { padding: clamp(16px, 3vw, 20px); }
  }
  .note-title {
    font-family: ui-monospace, Consolas, Menlo, monospace;
    color: #aab2ff;
    letter-spacing: 0.7px;
    margin-bottom: 8px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
  }
  @media (min-width: 768px) {
    .note-title { font-size: clamp(1rem, 2vw, 1.1rem); }
  }
  pre#note {
    font-family: ui-monospace, Consolas, Menlo, monospace;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
    min-height: 70px;
    position: relative;
    color: #d1d5db;
  }
  @media (min-width: 768px) {
    pre#note { font-size: clamp(0.95rem, 2vw, 1.05rem); min-height: 100px; }
  }
  .caret {
    display: inline-block;
    width: clamp(7px, 1.5vw, 8px);
    height: 1.3em;
    vertical-align: -0.2em;
    border-right: 2px solid #aab2ff;
    animation: blink 0.8s steps(1) infinite;
    margin-left: 4px;
  }
  @media (min-width: 768px) {
    .caret { width: 9px; }
  }
  @keyframes blink { 50% { border-right-color: transparent; } }
  .toast {
    position: fixed;
    right: clamp(10px, 2vw, 12px);
    bottom: clamp(10px, 2vw, 12px);
    padding: clamp(0.7rem, 2vw, 0.9rem) clamp(0.9rem, 2.5vw, 1.2rem);
    background: #0f1120;
    color: #e8f0ff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    box-shadow: 0 8px 25px var(--shadow);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    max-width: 90vw;
    z-index: 1000;
  }
  @media (min-width: 768px) {
    .toast { right: 16px; bottom: 16px; font-size: clamp(0.9rem, 2vw, 1rem); padding: 0.8rem 1.4rem; }
  }
  .toast.show { opacity: 1; transform: translateY(0); }
  /* Accessibility improvements */
  button:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }


   /* Creator Credit Box */
        .creator-credit {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: rgba(1, 3, 5, 0);
            border: 2px solid #2ac9fe;
            border-radius: 12px;
            padding: 8px 16px;
            color: #ffffff;
            font-family: 'Arial', sans-serif;
            font-size: 12px;
            font-weight: 600;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.428);
            box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3),
                        inset 0 1px 0 rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            z-index: 9999;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .creator-credit:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4),
                        inset 0 1px 0 rgba(255, 255, 255, 0.2);
            border-color: #ef4444;
        }

        .creator-credit::before {
            content: '';
            position: absolute;
            bottom: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(45deg, #dc2626, #ef4444, #f87171, #dc2626);
            border-radius: 14px;
            z-index: -1;
            animation: borderGlow 3s ease-in-out infinite;
        }

        @keyframes borderGlow {
            0%, 100% { opacity: 0.6; }
            50% { opacity: 1; }
        }

        /* Responsive adjustments */
        @media (max-width: 640px) {
            .creator-credit {
                bottom: 10px;
                right: 10px;
                font-size: 11px;
                padding: 6px 12px;
            }
        }

       