* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    min-height: 100vh;
    background: url('lightanime.png') no-repeat center 20% fixed;
    background-size: cover;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: none;
    height: 100vh;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('starrynight.png') no-repeat center 20% fixed;
    background-size: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
    z-index: 0;
}

body.light-mode::after {
    opacity: 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
        rgba(10, 15, 45, 0.5) 0%,
        rgba(26, 35, 126, 0.4) 50%,
        rgba(10, 15, 45, 0.5) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Layout Components */
.top-nav {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: 1rem;
}

.theme-toggle, .top-right {
    display: flex;
    position: relative;
    height: 100%;
    align-items: center;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    height: calc(100vh - 160px); /* Account for top and bottom nav */
    overflow: hidden;
}

.bottom-controls {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.left-controls, .right-controls {
    display: flex;
    gap: 1rem;
}

/* Timer Styles */
.timer {
    font-size: 12rem;
    font-weight: 300;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4),
                 0 0 30px rgba(255, 223, 167, 0.2),
                 0 0 45px rgba(255, 183, 77, 0.1);
    line-height: 1;
    margin-bottom: 1rem;
}

.timer span {
    display: inline-block;
}

.timer #seconds {
    opacity: 0.7;
}

.motivational-text {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 1rem 0 2rem;
    font-style: italic;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Button Base Styles */
.play-button, .mode-btn, .icon-button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: none;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(6px);
}

/* Button Containers */
.mode-buttons {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px;
    border-radius: 15px;
    backdrop-filter: blur(4px);
}

/* Play Button Specific */
.play-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 2.2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(96, 239, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
    padding: 0;
}

.play-button span {
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    transform: translateY(-2px);
}

/* Play symbol positioning */
.play-button[data-state="play"] span {
    transform: translate(3px, -2px);
    font-size: 2.2rem;
}

/* Pause symbol styling using pseudo-elements */
.play-button[data-state="stop"] span {
    transform: translateY(-2px);
}

.play-button[data-state="stop"] span::before,
.play-button[data-state="stop"] span::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 28px;
    background: #fff;
    border-radius: 3px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.play-button[data-state="stop"] span::before {
    left: 7px;
}

.play-button[data-state="stop"] span::after {
    right: 7px;
}

/* Hover effects */
.play-button:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 0 20px rgba(96, 239, 255, 0.6),
        0 0 40px rgba(96, 239, 255, 0.2);
}

.play-button:hover span::before,
.play-button:hover span::after {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.play-button:hover span {
    filter: brightness(1.2);
}

/* Mode & Sound Buttons */
.mode-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.08);
}

/* Icon Button */
.icon-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
}

/* Button Rainbow Border Effect */
.play-button::before,
.mode-btn::before,
.icon-button::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.3),
        rgba(255, 105, 180, 0.3),
        rgba(123, 104, 238, 0.3),
        rgba(0, 255, 255, 0.3)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
    transition: all 0.4s ease;
}

/* Enhanced hover effects for buttons */
.play-button:hover::before,
.mode-btn:hover::before,
.icon-button:hover::before {
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.8),
        rgba(255, 105, 180, 0.8),
        rgba(123, 104, 238, 0.8),
        rgba(0, 255, 255, 0.8)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.2);
}

/* Button States */
.play-button:hover,
.mode-btn:hover,
.icon-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25),
                0 0 20px rgba(255, 215, 0, 0.2),
                0 0 30px rgba(255, 105, 180, 0.2);
}

.play-button:active,
.mode-btn:active,
.icon-button:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.3);
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

@keyframes borderGlow {
    0% { 
        background-position: 0% 50%;
        opacity: 0.6;
    }
    50% { 
        background-position: 100% 50%;
        opacity: 1;
    }
    100% { 
        background-position: 0% 50%;
        opacity: 0.6;
    }
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 48px;
    height: 48px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23FFD700" d="M12 2.58l2.25 4.55c.15.3.44.5.77.55l5.03.73-3.64 3.54c-.24.23-.35.57-.3.9l.86 5-4.5-2.36c-.3-.15-.65-.15-.94 0l-4.5 2.36.86-5c.05-.32-.06-.66-.3-.9L3.95 8.41l5.03-.73c.33-.05.62-.25.77-.55L12 2.58z"/></svg>') no-repeat;
    background-size: contain;
    pointer-events: none;
    transform-origin: center center;
    z-index: 9999;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8)) blur(0.5px);
    animation: starRotate 4s ease-in-out infinite;
}

.glow {
    position: fixed;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 215, 0, 0.8) 20%,
        rgba(255, 156, 0, 0.6) 40%,
        rgba(255, 105, 180, 0.3) 60%,
        rgba(173, 216, 230, 0) 100%
    );
    border-radius: 50%;
    pointer-events: none;
    filter: blur(5px);
    z-index: 9998;
    mix-blend-mode: screen;
    animation: glowPulse 3s ease-in-out infinite;
}

.particle {
    position: fixed;
    pointer-events: none;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 215, 0, 0.8) 20%,
        rgba(255, 156, 0, 0.6) 40%,
        rgba(255, 105, 180, 0.3) 70%,
        rgba(173, 216, 230, 0) 100%
    );
    border-radius: 50%;
    z-index: 9997;
    opacity: 0;
    filter: blur(1px);
    mix-blend-mode: screen;
    animation: fadeOut 1.5s ease-out forwards;
}

/* Animations */
@keyframes starRotate {
    0% {
        transform: rotate(0deg) scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8)) blur(0.5px) brightness(1);
    }
    25% {
        transform: rotate(90deg) scale(1.1);
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9)) blur(0.3px) brightness(1.2);
    }
    50% {
        transform: rotate(180deg) scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8)) blur(0.5px) brightness(1);
    }
    75% {
        transform: rotate(270deg) scale(1.1);
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9)) blur(0.3px) brightness(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8)) blur(0.5px) brightness(1);
    }
}

@keyframes glowPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }
    25% {
        transform: scale(1.3) rotate(90deg);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.1) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: scale(1.3) rotate(270deg);
        opacity: 0.9;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(1px) brightness(1.2);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.7) rotate(90deg);
        filter: blur(2px) brightness(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) rotate(180deg);
        filter: blur(3px) brightness(1);
    }
}

/* Disabled States */
.play-button:disabled,
.mode-btn:disabled,
.icon-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.theme-toggle .icon-button {
    width: 48px;
    height: 48px;
    border-radius: 20px;
    font-size: 1.4rem;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    transition: all 0.4s ease;
}

.theme-toggle .icon-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

/* Mode Buttons Container */
.mode-buttons {
    display: flex;
    gap: 10px;
    padding: 5px;
    border-radius: 15px;
    backdrop-filter: blur(4px);
    margin-left: 1rem;
    justify-content: center;
}

.mode-btn {
    padding: 0.6rem 2rem;
    border-radius: 20px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
    min-width: 120px;
    text-align: center;
}

/* Top Navigation Layout */
.top-right {
    margin-left: auto;
    display: flex;
    gap: 1rem;
}

.theme-toggle .icon-button[data-theme="light"] {
    display: none;
}

.theme-toggle.light-mode .icon-button[data-theme="dark"] {
    display: none;
}

.theme-toggle.light-mode .icon-button[data-theme="light"] {
    display: flex;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 45, 0.65);
    backdrop-filter: blur(12px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: rgba(20, 20, 35, 0.45);
    border-radius: 20px;
    padding: 2.5rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 40px rgba(96, 239, 255, 0.25),
                inset 0 0 30px rgba(255, 255, 255, 0.08);
    transform: translateY(20px);
    transition: all 0.4s ease;
    backdrop-filter: blur(8px);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 300;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.6),
                 0 0 60px rgba(96, 239, 255, 0.4);
    letter-spacing: 0.5px;
}

.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
                 0 0 40px rgba(96, 239, 255, 0.3);
    letter-spacing: 0.3px;
}

.custom-input {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 25px rgba(96, 239, 255, 0.2),
                inset 0 0 20px rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    backdrop-filter: blur(6px);
    overflow: hidden;
}

.custom-input input {
    width: 100%;
    background: rgba(20, 20, 35, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 1.6rem;
    padding: 0.6rem 1rem;
    text-align: center;
    font-weight: 300;
    cursor: text !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
                 0 0 40px rgba(96, 239, 255, 0.3);
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2),
                0 0 20px rgba(96, 239, 255, 0.15);
}

.custom-input:hover {
    box-shadow: 0 0 30px rgba(96, 239, 255, 0.3),
                inset 0 0 25px rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.custom-input input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(20, 20, 35, 0.5);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(96, 239, 255, 0.3);
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.7),
                 0 0 50px rgba(96, 239, 255, 0.4);
}

.spinner-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-right: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.spinner-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer !important;
    padding: 8px;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(96, 239, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.spinner-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.3),
        rgba(255, 105, 180, 0.3),
        rgba(123, 104, 238, 0.3),
        rgba(0, 255, 255, 0.3)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.spinner-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    transform: translateX(-2px);
    box-shadow: 0 0 20px rgba(96, 239, 255, 0.2);
}

.spinner-btn:hover::before {
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.6),
        rgba(255, 105, 180, 0.6),
        rgba(123, 104, 238, 0.6),
        rgba(0, 255, 255, 0.6)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.2);
}

.spinner-btn:active {
    transform: translateX(0);
    background: rgba(255, 255, 255, 0.25);
    transition: all 0.1s ease;
}

.spinner-btn:active::before {
    filter: blur(1px) brightness(0.9);
}

/* Add a subtle pulse animation for the input when value changes */
@keyframes valuePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.custom-input input.value-changed {
    animation: valuePulse 0.3s ease-in-out;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
}

.cancel-btn, .apply-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer !important;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    backdrop-filter: blur(6px);
}

.apply-btn {
    background: rgba(255, 255, 255, 0.15);
}

.cancel-btn:hover,
.apply-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25),
                0 0 20px rgba(255, 215, 0, 0.2),
                0 0 30px rgba(255, 105, 180, 0.2);
}

.cancel-btn:active,
.apply-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.3);
}

.cancel-btn::before,
.apply-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.3),
        rgba(255, 105, 180, 0.3),
        rgba(123, 104, 238, 0.3),
        rgba(0, 255, 255, 0.3)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
    transition: all 0.4s ease;
}

.cancel-btn:hover::before,
.apply-btn:hover::before {
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.8),
        rgba(255, 105, 180, 0.8),
        rgba(123, 104, 238, 0.8),
        rgba(0, 255, 255, 0.8)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.2);
}

/* Override cursor styles for modal */
.modal * {
    cursor: auto;
}

.modal button {
    cursor: pointer;
}

.modal input {
    cursor: text;
}

/* Completion Modal Specific Styles */
.completion-content {
    text-align: center;
    background: rgba(20, 20, 35, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 50px rgba(96, 239, 255, 0.35),
                inset 0 0 40px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 3rem 2rem;
}

.completion-content h2 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.8),
                 0 0 80px rgba(96, 239, 255, 0.6);
    animation: celebrateGlow 2s ease-in-out infinite;
    width: 100%;
    text-align: center;
}

.completion-message {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5),
                 0 0 40px rgba(96, 239, 255, 0.3);
    font-weight: 300;
    letter-spacing: 0.5px;
    width: 100%;
    text-align: center;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: auto;
}

.start-rest-btn {
    padding: 1rem 2.8rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 25px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer !important;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(6px);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 30px rgba(96, 239, 255, 0.2),
                inset 0 0 20px rgba(255, 255, 255, 0.05);
    margin: 0 auto;
}

.start-rest-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(96, 239, 255, 0.4),
        rgba(255, 215, 0, 0.4),
        rgba(123, 104, 238, 0.4),
        rgba(0, 255, 255, 0.4)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
    transition: all 0.4s ease;
}

.start-rest-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(96, 239, 255, 0.4),
                inset 0 0 25px rgba(255, 255, 255, 0.1);
}

.start-rest-btn:hover::before {
    background: linear-gradient(
        45deg,
        rgba(96, 239, 255, 0.8),
        rgba(255, 215, 0, 0.8),
        rgba(123, 104, 238, 0.8),
        rgba(0, 255, 255, 0.8)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.3);
}

.start-rest-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.3);
}

@keyframes celebrateGlow {
    0%, 100% {
        text-shadow: 0 0 40px rgba(255, 255, 255, 0.8),
                     0 0 80px rgba(96, 239, 255, 0.6);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 60px rgba(255, 255, 255, 0.9),
                     0 0 100px rgba(96, 239, 255, 0.8);
        transform: scale(1.05);
    }
}

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(96, 239, 255, 0.1);
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(96, 239, 255, 0.2);
}

.start-study-btn {
    padding: 1rem 2.8rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 25px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer !important;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(6px);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 30px rgba(96, 239, 255, 0.2),
                inset 0 0 20px rgba(255, 255, 255, 0.05);
    margin: 0 auto;
}

.start-study-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(96, 239, 255, 0.4),
        rgba(255, 215, 0, 0.4),
        rgba(123, 104, 238, 0.4),
        rgba(0, 255, 255, 0.4)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
    transition: all 0.4s ease;
}

.start-study-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(96, 239, 255, 0.4),
                inset 0 0 25px rgba(255, 255, 255, 0.1);
}

.start-study-btn:hover::before {
    background: linear-gradient(
        45deg,
        rgba(96, 239, 255, 0.8),
        rgba(255, 215, 0, 0.8),
        rgba(123, 104, 238, 0.8),
        rgba(0, 255, 255, 0.8)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.3);
}

.start-study-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.3);
}

/* Meteor Shower Effect */
.meteor {
    position: fixed;
    width: 2px;
    height: 2px;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.95),
        rgba(255, 215, 0, 0.8) 20%,
        rgba(255, 156, 0, 0.6) 40%,
        rgba(255, 105, 180, 0.3) 60%,
        transparent
    );
    animation: meteor linear forwards;
    pointer-events: none;
    z-index: 1;
}

@keyframes meteor {
    0% {
        opacity: 1;
        width: 2px;
        transform: translateX(0) translateY(0) rotate(45deg);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.8),
                    0 0 30px rgba(255, 215, 0, 0.6);
    }
    20% {
        opacity: 1;
        width: 100px;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.9),
                    0 0 40px rgba(255, 215, 0, 0.7);
    }
    80% {
        opacity: 1;
        width: 150px;
        box-shadow: 0 0 25px rgba(255, 255, 255, 1),
                    0 0 50px rgba(255, 215, 0, 0.8);
    }
    100% {
        opacity: 0;
        width: 200px;
        transform: translateX(1000px) translateY(1000px) rotate(45deg);
    }
}

.meteor-btn {
    position: relative;
    overflow: visible !important;
}

.meteor-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.4),
        rgba(255, 105, 180, 0.4),
        rgba(123, 104, 238, 0.4),
        rgba(0, 255, 255, 0.4)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
    transition: all 0.4s ease;
}

.meteor-btn.active {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3),
                0 0 30px rgba(255, 215, 0, 0.4);
}

.meteor-btn.active::after {
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.8),
        rgba(255, 105, 180, 0.8),
        rgba(123, 104, 238, 0.8),
        rgba(0, 255, 255, 0.8)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.3);
}

/* Snow Effect Styles */
.snow-btn {
    position: relative;
    overflow: visible !important;
}

.snow-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.4),
        rgba(173, 216, 230, 0.4),
        rgba(135, 206, 235, 0.4),
        rgba(240, 248, 255, 0.4)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
    transition: all 0.4s ease;
}

.snow-btn.active {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3),
                0 0 30px rgba(173, 216, 230, 0.4);
}

.snow-btn.active::after {
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.8),
        rgba(173, 216, 230, 0.8),
        rgba(135, 206, 235, 0.8),
        rgba(240, 248, 255, 0.8)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.3);
}

.snowflake {
    position: fixed;
    pointer-events: none;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: snowfall linear forwards;
    z-index: 1;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
                0 0 20px rgba(173, 216, 230, 0.4);
}

@keyframes snowfall {
    0% {
        opacity: 0;
        transform: translateY(-5vh) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(105vh) scale(0.5);
    }
}

.snow-pile {
    position: fixed;
    pointer-events: none;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.7) 30%,
        rgba(255, 255, 255, 0.4) 60%,
        transparent 100%
    );
    border-radius: 50%;
    opacity: 0;
    z-index: 1;
    animation: snowPile 3s ease-out forwards;
}

@keyframes snowPile {
    0% {
        opacity: 0;
        transform: scale(0.2);
    }
    50% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

/* Fireworks Effect */
.firework {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
}

.firework::before, .firework::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    box-shadow: 0 0 20px 2px;
    animation: explode 1s ease-out forwards;
}

.firework-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    animation: particle 1s ease-out forwards;
    opacity: 0;
    z-index: 1000;
}

@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
        box-shadow: 0 0 20px 2px;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
        box-shadow: 0 0 40px 8px;
    }
}

@keyframes particle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
        box-shadow: 0 0 20px 2px;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
        box-shadow: 0 0 0 0;
    }
}

.fullscreen-btn {
    position: relative;
    overflow: visible !important;
}

.fullscreen-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.4),
        rgba(135, 206, 235, 0.4),
        rgba(173, 216, 230, 0.4),
        rgba(255, 255, 255, 0.4)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
    transition: all 0.4s ease;
}

.fullscreen-btn.active {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3),
                0 0 30px rgba(173, 216, 230, 0.4);
}

.fullscreen-btn.active::after {
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.8),
        rgba(135, 206, 235, 0.8),
        rgba(173, 216, 230, 0.8),
        rgba(255, 255, 255, 0.8)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.3);
}

.hide-during-focus {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Ensure play button and fullscreen remain visible */
.play-button.hide-during-focus,
.fullscreen-btn.hide-during-focus {
    opacity: 1;
    pointer-events: auto;
}

/* Tasks Panel Styles */
.tasks-panel {
    position: fixed;
    top: 80px;
    right: -400px;
    width: 400px;
    height: 60vh;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom-left-radius: 15px;
    z-index: 1000;
    transition: right 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(255, 255, 255, 0.05);
}

.tasks-panel.show {
    right: 0;
}

.tasks-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
}

.tasks-header h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 300;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    margin: 0;
}

.close-tasks-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-tasks-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.1);
}

.tasks-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
}

.task-list {
    margin-bottom: 1.5rem;
}

.add-task-btn {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.add-task-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.plus-icon {
    font-size: 1.4rem;
    margin-right: 0.5rem;
}

.tasks-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    border-bottom-left-radius: 15px;
}

.pomodoro-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

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

.hours-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255, 255, 255, 1);
}

.pomo-count {
    color: #fff;
    font-weight: 500;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.finish-time {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.task-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.save-task, .cancel-task {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.save-task {
    background: rgba(255, 255, 255, 0.12);
}

.save-task::before, .cancel-task::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.3),
        rgba(255, 105, 180, 0.3),
        rgba(123, 104, 238, 0.3),
        rgba(0, 255, 255, 0.3)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.save-task:hover, .cancel-task:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2),
                0 0 20px rgba(255, 215, 0, 0.15),
                0 0 30px rgba(255, 105, 180, 0.15);
}

.save-task:hover::before, .cancel-task:hover::before {
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.6),
        rgba(255, 105, 180, 0.6),
        rgba(123, 104, 238, 0.6),
        rgba(0, 255, 255, 0.6)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.2);
}

.save-task:active, .cancel-task:active {
    transform: translateY(1px);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15),
                0 0 15px rgba(255, 215, 0, 0.1),
                0 0 20px rgba(255, 105, 180, 0.1);
    transition: all 0.1s ease;
}

.save-task:active::before, .cancel-task:active::before {
    filter: blur(1px) brightness(0.9);
}

/* Settings Panel Styles */
.settings-panel {
    position: fixed;
    top: 80px;
    left: -400px;
    width: 400px;
    height: 60vh;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom-right-radius: 15px;
    z-index: 1000;
    transition: left 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 30px rgba(255, 255, 255, 0.05);
}

.settings-panel.show {
    left: 0;
}

.settings-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
}

.settings-header h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 300;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    margin: 0;
}

.close-settings-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.1);
}

.settings-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
}

.settings-buttons {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.apply-settings {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.apply-settings::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.3),
        rgba(255, 105, 180, 0.3),
        rgba(123, 104, 238, 0.3),
        rgba(0, 255, 255, 0.3)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.apply-settings:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2),
                0 0 20px rgba(255, 215, 0, 0.15),
                0 0 30px rgba(255, 105, 180, 0.15);
}

.apply-settings:hover::before {
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.6),
        rgba(255, 105, 180, 0.6),
        rgba(123, 104, 238, 0.6),
        rgba(0, 255, 255, 0.6)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.2);
}

.apply-settings:active {
    transform: translateY(1px);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15),
                0 0 15px rgba(255, 215, 0, 0.1),
                0 0 20px rgba(255, 105, 180, 0.1);
    transition: all 0.1s ease;
}

.settings-btn {
    position: relative;
    font-size: 1.4rem;
    padding: 8px;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px) rotate(45deg);
}

.settings-btn.active {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px) rotate(90deg);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25),
                0 0 20px rgba(255, 215, 0, 0.2);
}

.setting-group {
    margin-bottom: 2rem;
}

.setting-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
                 0 0 40px rgba(96, 239, 255, 0.3);
    letter-spacing: 0.3px;
}

.custom-select {
    position: relative;
    background: rgba(20, 20, 35, 0.3);
    border-radius: 15px;
    border: none;
    margin-bottom: 1rem;
    overflow: visible;
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.2),
                inset 0 0 15px rgba(0, 0, 0, 0.2);
}

.select-header {
    padding: 0.8rem 1rem;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.select-header::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.3),
        rgba(255, 105, 180, 0.3),
        rgba(123, 104, 238, 0.3),
        rgba(0, 255, 255, 0.3)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.select-header:hover::before {
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.6),
        rgba(255, 105, 180, 0.6),
        rgba(123, 104, 238, 0.6),
        rgba(0, 255, 255, 0.6)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.2);
}

.select-arrow {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.select-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: rgba(20, 20, 35, 0.95);
    border: none;
    border-radius: 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 1001;
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.1),
                0 4px 15px rgba(0, 0, 0, 0.2),
                0 0 20px rgba(0, 0, 0, 0.3),
                inset 0 0 15px rgba(0, 0, 0, 0.2);
}

.custom-select.open .select-options {
    max-height: 300px;
    overflow: visible;
}

.custom-select.open .select-arrow {
    transform: rotate(180deg);
}

.select-option {
    padding: 0.8rem 1rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 1002;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-option:last-child {
    border-bottom: none;
}

.select-option:hover {
    background: rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.select-option.selected {
    background: rgba(255, 255, 255, 0.15);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.select-option::after {
    content: '★';
    color: rgba(255, 215, 0, 0.8);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.select-option.selected::after {
    opacity: 1;
    transform: scale(1);
}

.select-option:hover::after {
    opacity: 0.5;
    transform: scale(0.9);
}

.select-option.selected:hover::after {
    opacity: 1;
    transform: scale(1.1);
}

.sound-select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(20, 20, 35, 0.3);
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    outline: none;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.sound-select option {
    background: rgba(20, 20, 35, 0.95);
    color: #fff;
    padding: 0.8rem;
}

.sound-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.test-sound-btn,
.stop-sound-btn,
.test-music-btn,
.stop-music-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.test-sound-btn::before,
.stop-sound-btn::before,
.test-music-btn::before,
.stop-music-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    z-index: -1;
    background-size: 400%;
    border-radius: 20px;
    filter: blur(5px) brightness(0.7);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.test-sound-btn:hover::before,
.stop-sound-btn:hover::before,
.test-music-btn:hover::before,
.stop-music-btn:hover::before {
    opacity: 1;
}

.test-sound-btn:hover,
.stop-sound-btn:hover,
.test-music-btn:hover,
.stop-music-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 223, 175, 0.5),
                0 0 25px rgba(255, 192, 203, 0.5);
}

.test-sound-btn:active,
.stop-sound-btn:active,
.test-music-btn:active,
.stop-music-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.08);
}

@keyframes glowing {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 400% 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* Stats Panel Styles */
.stats-panel {
    position: fixed;
    top: 80px;
    right: -400px;
    width: 400px;
    height: 60vh;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom-left-radius: 15px;
    z-index: 1000;
    transition: right 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(255, 255, 255, 0.05);
}

.stats-panel.show {
    right: 0;
}

.stats-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
}

.stats-header h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 300;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    margin: 0;
}

.close-stats-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-stats-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.1);
}

.stats-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
}

.daily-stats, .weekly-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.daily-stats h3, .weekly-stats h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0 0 1rem 0;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.time-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.daily-time {
    color: #fff;
    font-size: 2rem;
    font-weight: 500;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.week-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.day-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.day-stat:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.day-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 500;
}

.day-time {
    color: #fff;
    font-size: 0.9rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Add custom scrollbar for week grid */
.week-grid::-webkit-scrollbar {
    width: 8px;
}

.week-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.week-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.week-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Adjust daily stats for consistency */
.daily-stats {
    margin-bottom: 2rem;
}

.time-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.time-stats:hover {
    background: rgba(255, 255, 255, 0.08);
}

.daily-time {
    color: #fff;
    font-size: 2rem;
    font-weight: 500;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.reset-stats-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reset-stats-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.3),
        rgba(255, 105, 180, 0.3),
        rgba(123, 104, 238, 0.3),
        rgba(0, 255, 255, 0.3)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.reset-stats-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.reset-stats-btn:hover::before {
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.6),
        rgba(255, 105, 180, 0.6),
        rgba(123, 104, 238, 0.6),
        rgba(0, 255, 255, 0.6)
    );
    animation: borderGlow 2s ease-in-out infinite;
    filter: blur(0.5px) brightness(1.2);
}

.reset-stats-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    body {
        background: url('lightanime.png') no-repeat 35% 20% fixed;
        background-size: cover;
    }

    body::after {
        background: url('starrynight.png') no-repeat 35% 20% fixed;
        background-size: cover;
    }

    .top-nav {
        padding: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .mode-buttons {
        flex-wrap: wrap;
        justify-content: center;
        padding: 5px;
    }

    .mode-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .timer {
        font-size: 8rem;
    }

    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .icon-button {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }

    .bottom-controls {
        padding: 1.5rem;
        justify-content: center;
        gap: 1.5rem;
    }

    .tasks-panel {
        width: 90%;
        max-width: 400px;
    }

    .settings-panel {
        width: 90%;
        max-width: 400px;
    }

    .stats-panel {
        width: 90%;
        max-width: 400px;
    }

    .info-container {
        width: 90%;
        margin: 60px auto;
        padding: 1.5rem;
    }

    .info-section {
        padding: 1rem;
    }

    .info-section h2 {
        font-size: 1.5rem;
    }

    /* Custom button specific styling */
    #custom {
        width: 100px !important;
        height: 40px !important;
        font-size: 1rem !important;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 0.5rem;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        backdrop-filter: blur(6px);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        box-shadow: none;
    }

    #custom:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }
}

@media screen and (max-width: 480px) {
    .timer {
        font-size: 6rem;
    }

    .mode-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.75rem;
    }

    .play-button {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .icon-button {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }

    .motivational-text {
        font-size: 1rem;
        text-align: center;
        padding: 0 1rem;
    }

    .info-section h2 {
        font-size: 1.3rem;
    }

    .info-section p {
        font-size: 0.9rem;
    }

    .meteor-btn,
    .snow-btn,
    .tasks-btn,
    .stats-btn,
    .fullscreen-btn {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .meteor-btn::after,
    .snow-btn::after,
    .tasks-btn::after,
    .stats-btn::after,
    .fullscreen-btn::after {
        font-size: 1.8rem;
    }

    .left-controls, .right-controls {
        gap: 1.5rem;
    }

    .bottom-controls {
        padding: 2rem 1rem;
        gap: 2rem;
    }

    /* Make custom button even bigger on smaller screens */
    #custom {
        width: 110px !important;
        height: 45px !important;
        font-size: 1.1rem !important;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 14px;
    }

    #custom:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }
}

/* Fix for horizontal scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Ensure content stays within viewport */
.main-content {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}
  