:root {
    /* Dark Theme (Default) */
    --primary-bg: #0f172a;
    --accent-1: #7c3aed;
    /* Violet */
    --accent-2: #db2777;
    /* Pink */
    --accent-3: #2563eb;
    /* Blue */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --orb-opacity: 0.6;
    --rope-color: #7c3aed;
    --progress-bg: rgba(255, 255, 255, 0.1);
    --font-stack: 'Outfit', sans-serif;
    --text-gradient-start: #fff;
    --text-gradient-end: #cbd5e1;
}

[data-theme="light"] {
    --primary-bg: #f8fafc;
    --accent-1: #8b5cf6;
    --accent-2: #ec4899;
    --accent-3: #3b82f6;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --orb-opacity: 0.4;
    --rope-color: #475569;
    --progress-bg: rgba(0, 0, 0, 0.1);
    --text-gradient-start: #1e293b;
    --text-gradient-end: #475569;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: var(--font-stack);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Background Animation */
.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    transition: opacity 0.5s ease;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: var(--orb-opacity);
    animation: float-orb 20s infinite ease-in-out alternate;
    transition: opacity 0.5s ease;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-1);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-2);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: var(--accent-3);
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float-orb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

/* Theme Toggle Button (Top Right) */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 50;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: var(--glass-border);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
}

/* Icon Switching */
[data-theme="light"] .moon-icon {
    display: block;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

/* Share Button (Bottom Right) */
.share-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, background-color 0.2s;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

/* Glass Main Container - Premium Polish */
/* Glass Main Container - Premium Polish */
.glass-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 2rem 3rem;
    text-align: center;
    box-shadow:
        0 4px 24px -1px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    max-width: 90%;
    width: 800px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.27), box-shadow 0.4s ease;
    align-items: center;
}

.glass-container:hover {
    transform: translateY(-2px) scale(1.005);
    box-shadow:
        0 20px 48px -12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.year-highlight {
    background: linear-gradient(135deg, #fff 0%, var(--accent-1) 50%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.3));
}

/* Timer */
.timer-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
    width: 100%;
}

.time-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    position: relative;
}

.time-value {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    background: linear-gradient(to bottom, var(--text-gradient-start), var(--text-gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.time-label {
    margin-top: 0.5rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Emoji */
.emoji-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    width: 100%;
}

.emoji-container {
    font-size: 4rem;
    margin: 0;
    animation: bounce 2s infinite ease-in-out;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

/* NEW: Quote Text Style */
.quote-text {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 400;
    font-style: italic;
    margin-top: 0.5rem;
    max-width: 650px;
    line-height: 1.6;
    opacity: 0.85;
    text-align: center;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Progress & Message */
.progress-section {
    width: 100%;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.progress-percentage-text {
    font-family: 'Outfit', monospace;
    /* Switched to Outfit for consistency but monospaced feel */
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--text-primary);
}

/* Thick Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 99px;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
    width: 0%;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 99px;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}

/* Dynamic Message Below Progress Bar */
.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    margin-top: 0.5rem;
    min-height: 1.5em;
    letter-spacing: 0.02em;
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-out forwards;
    opacity: 0;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .glass-container {
        padding: 2rem;
        width: 95%;
        gap: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .timer-container {
        gap: 1rem;
    }

    .time-value {
        font-size: 2.5rem;
    }

    .time-segment {
        min-width: 70px;
    }

    .emoji-container {
        font-size: 3rem;
    }
}