:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --surface-gradient: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Theme-specific variables */
:root[data-theme="dark"] {
    --bg-gradient: linear-gradient(125deg, #0f172a 0%, #1e293b 100%);
    --text-color: white;
    --container-bg: rgba(255, 255, 255, 0.05);
    --container-border: rgba(255, 255, 255, 0.3);
    --glow-color: rgba(99, 102, 241, 0.15);
    --mode-bg: rgba(255, 255, 255, 0.05);
    --logo-filter: brightness(0) invert(1);
}

:root[data-theme="light"] {
    --bg-gradient: linear-gradient(125deg, #ffffff 0%, #fdf2f4 100%);
    --text-color: #1e293b;
    --container-bg: rgba(255, 255, 255, 0.7);
    --container-border: rgba(255, 255, 255, 0.5);
    --glow-color: rgba(192, 19, 67, 0.05);
    --mode-bg: rgba(0, 0, 0, 0.03);
    --logo-filter: none;
}

/* Theme toggle styles */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.theme-toggle button {
    background: var(--container-bg);
    border: 1px solid var(--container-border);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.theme-toggle .sun,
.theme-toggle .moon {
    position: absolute;
    transition: all 0.3s ease;
}

.theme-toggle .sun {
    stroke: #2dd4bf;
    opacity: 0;
}

.theme-toggle .moon {
    stroke: #2dd4bf;
    opacity: 1;
}

[data-theme="light"] .theme-toggle .sun {
    opacity: 1;
}

[data-theme="light"] .theme-toggle .moon {
    opacity: 0;
}

/* Existing styles with theme variables */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* Update the ambient background effect */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--glow-color) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

/* Desktop styles */
.container {
    background: var(--container-bg);
    color: var(--text-color);
    text-align: center;
    backdrop-filter: blur(20px);
    padding: 3.5rem;
    border-radius: 30px;
    border: var(--glass-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    width: 400px;
    max-width: 90%;
    position: relative;
    z-index: 1;
    margin: auto;
}

.container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(125deg, 
        var(--glow-color),
        rgba(99, 102, 241, 0.05)
    );
    border-radius: 32px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

h1 {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
    position: relative;
    text-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.timer {
    font-size: 6rem;
    margin: 2.5rem 0;
    font-weight: 600;
    color: var(--text-color);
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    letter-spacing: -2px;
}

.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 2rem 0;
}

.controls button {
    font-size: 1.1rem;
    padding: 1rem 1.8rem;
    cursor: pointer;
    color: white !important;
    border: none;
    border-radius: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.controls button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.controls button:hover::before {
    transform: translateX(100%);
}

#start {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

#start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

#reset {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

#reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

#toggle {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    color: white !important;
    font-size: 0.95rem;
    min-width: 110px;
    padding: 1rem 1.5rem;
}

#toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.mode {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: 500;
    padding: 1rem;
    background: var(--mode-bg);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.mode:hover {
    background: rgba(255, 255, 255, 0.08);
}

.duration-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.duration-setting {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-color);
    justify-content: center;
}

.duration-input {
    width: 32px;
    background: var(--mode-bg);
    border: none;
    border-radius: 4px;
    padding: 2px 4px;
    color: var(--text-color);
    font-size: inherit;
    font-family: inherit;
    text-align: center;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-appearance: none;
    appearance: none;
}

.duration-input:hover {
    background: var(--mode-bg);
    opacity: 0.8;
}

.duration-input:focus {
    user-select: text;
    -webkit-user-select: text;
    background: var(--mode-bg);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
    color: transparent;
    text-shadow: 0 0 0 var(--text-color);
}

.duration-input:not(:focus) {
    color: var(--text-color);
    text-shadow: none;
}

/* Hide spinner buttons */
.duration-input::-webkit-inner-spin-button,
.duration-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox number input styling */
.duration-input[type=number] {
    appearance: textfield;
    -webkit-appearance: textfield;
}

/* Add logo styles */
.logo {
    width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: var(--logo-filter);
    transition: all 0.3s ease;
}

/* Notification banner styles */
.notification-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    text-align: center;
    flex-wrap: wrap;
}

.notification-banner p {
    margin: 0;
    font-size: 0.9rem;
}

.notification-banner button {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Add this to your CSS */
.credits {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    font-weight: 400;
}

#drumToggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.7;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    transition: opacity 0.3s ease;
}

#drumToggle:hover {
    opacity: 1;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    body {
        background: var(--bg-gradient);
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
        margin: 0;
        padding: 0;
    }

    .container {
        width: 100%;
        height: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0.5rem 1rem;
        border-radius: 0;
        background: var(--container-bg);
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
    }

    .container::before,
    body::before {
        display: none;
    }

    .logo {
        width: 80px;
        margin-bottom: 0.5rem;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .timer {
        font-size: 5rem;
        margin: 0.5rem 0;
    }

    .controls {
        gap: 8px;
        margin: 0.5rem 0;
    }

    .controls button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .mode {
        margin-top: 0.5rem;
        padding: 0.8rem;
    }

    .duration-settings {
        gap: 6px;
    }

    .notification-banner {
        display: none;
    }

    [data-theme="dark"] .container {
        background: rgba(15, 23, 42, 0.95) !important;
    }
} 