body {
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 10px rgba(255, 223, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 223, 0, 0.4);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 223, 0, 0.2);
    }
}

.container {
    text-align: center;
    background-color: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: pulseGlow 3s ease-in-out infinite;
    margin: 1rem;
}

.timer-container {
    position: relative;
    width: 200px;
    margin: 0 auto;
    padding: 5px;
}

.controls {
    margin-top: 0.25rem;
    position: relative;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.mode {
    margin-top: 0.25rem;
    position: relative;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.timer {
    font-size: 3rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.controls button, .mode button {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    margin: 0 0.25rem;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
}

.controls button:hover, .mode button:hover {
    background-color: #45a049;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Start button */
#start {
    background-color: #4CAF50;  /* Green */
    color: white;
}

#start:hover {
    background-color: #45a049;
}

/* Reset button */
#reset {
    background-color: #f44336;  /* Red */
    color: white;
}

#reset:hover {
    background-color: #da190b;
}

/* Work/Break mode buttons */
#work, #break {
    background-color: #2196F3;  /* Blue */
    color: white;
    opacity: 0.7;
}

#work:hover, #break:hover {
    opacity: 0.9;
}

/* Active state for mode buttons */
#work.active, #break.active {
    opacity: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quote-container {
    margin-top: 0.5rem;
    padding: 0.5rem;
}

blockquote {
    position: relative;
    padding: 1rem;
    background: #f9f9f9;
    border-left: 4px solid #4a90e2;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quote {
    font-style: italic;
    color: #555;
    line-height: 1.5;
    font-size: 0.85rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 10px rgba(74, 144, 226, 0.1);
    transition: text-shadow 0.3s ease;
}

.quote:hover {
    text-shadow: 0 0 15px rgba(74, 144, 226, 0.2);
}

blockquote footer {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: right;
    margin-top: 0.5rem;
}

blockquote::before {
    content: '"';
    position: absolute;
    top: 0.25rem;
    left: 0.75rem;
    font-size: 3rem;
    color: #4a90e2;
    opacity: 0.2;
    font-family: Georgia, serif;
}

.quote:empty::after {
    content: "Loading quotes...";
    color: #888;
    font-style: italic;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: #333;
}

.modal-content input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.modal-content button {
    width: 100%;
    background-color: #4CAF50;
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-content button:hover {
    background-color: #45a049;
}

.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.music-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    position: static !important;
}

#toggleMusic {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

#toggleMusic .music-icon {
    font-size: 1.2rem;
    color: #4CAF50;  /* Green color */
    filter: hue-rotate(85deg) saturate(80%);  /* Adjust the hue to make emoji green */
}

#toggleMusic:hover {
    background-color: rgba(76, 175, 80, 0.1);  /* Light green background on hover */
}

/* Dark theme adjustments */
.dark-theme #toggleMusic .music-icon {
    color: #45a049;  /* Slightly darker green for dark theme */
    filter: hue-rotate(85deg) saturate(80%) brightness(0.9);  /* Adjusted for dark theme */
}

.dark-theme #toggleMusic:hover {
    background-color: rgba(76, 175, 80, 0.2);
}

.music-icon {
    font-size: 1.2rem;
    color: #4CAF50;  /* Green color */
}

#volumeSlider {
    width: 80px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .top-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .music-controls {
        flex: 1;
        justify-content: flex-end;
        background: none;
        box-shadow: none;
        padding: 0;
        bottom: auto;
        right: auto;
        position: static !important;
    }

    #toggleMusic {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    #volumeSlider {
        width: 60px;
    }
}

.theme-toggle {
    position: relative;
    top: 0;
    right: 0;
    margin-bottom: 1rem;
    display: flex;
    justify-content: flex-end;
}

.theme-toggle button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.theme-toggle button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Dark theme styles */
body.dark-theme {
    background-color: #1a1a1a;
}

.dark-theme .container {
    background-color: #2d2d2d;
    color: #fff;
    animation: pulseGlow 3s ease-in-out infinite;
}

.dark-theme .theme-toggle button .theme-icon {
    content: "🌙";
}

.dark-theme .timer {
    color: #fff;
}

.dark-theme .controls button,
.dark-theme .mode button {
    background-color: #4a4a4a;
    color: #fff;
}

.dark-theme .controls button:hover,
.dark-theme .mode button:hover {
    background-color: #5a5a5a;
}

.dark-theme .mode button.active {
    background-color: #4CAF50;
}

.dark-theme blockquote {
    background: #3d3d3d;
    border-left-color: #4a90e2;
}

.dark-theme .quote {
    color: #ddd;
}

.dark-theme blockquote footer {
    color: #aaa;
}

@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
        gap: 0.25rem;
    }

    .timer {
        font-size: 2.75rem;
        margin: 0.15rem 0;
    }

    .controls button, .mode button {
        font-size: 0.85rem;
        padding: 0.35rem 0.7rem;
    }

    .controls, .mode {
        gap: 0.25rem;
        margin-top: 0.15rem;
    }

    .quote-container {
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        min-width: auto;
        width: 90%;
        padding: 0.5rem;
        gap: 0.2rem;
    }

    .timer {
        font-size: 2.5rem;
        margin: 0.1rem 0;
    }

    .controls, .mode {
        gap: 0.2rem;
        margin-top: 0.1rem;
    }

    .quote {
        font-size: 0.8rem;
        min-height: 40px;
    }
}

@media screen and (max-width: 390px) {
    .container {
        padding: 0.4rem;
        margin: 0.4rem;
        gap: 0.15rem;
    }

    .timer {
        font-size: 2rem;
        margin: 0.1rem 0;
    }

    .controls, .mode {
        gap: 0.15rem;
        margin-top: 0.1rem;
    }
}

/* Additional optimizations for very small screens */
@media (max-width: 480px) {
    .container {
        min-width: auto;
        width: 90%;
        padding: 0.5rem;
    }

    .timer {
        font-size: 2.5rem;
        margin: 0.25rem 0;
    }

    .quote {
        font-size: 0.8rem;
        min-height: 40px;
    }
}

/* Add iPhone-specific optimizations */
@media screen and (max-width: 390px) {
    .container {
        padding: 0.5rem;
        margin: 0.5rem;
    }

    .timer-container {
        width: 160px;
        height: 160px;
    }

    .timer {
        font-size: 2rem;
    }

    .controls, .mode {
        gap: 0.25rem;
    }

    .quote-container {
        margin-top: 0.75rem;
    }
}

/* Add smooth transitions for better mobile experience */
.container, .timer, .controls button, .mode button {
    transition: all 0.3s ease;
}

.timer-container {
    position: relative;
    width: 250px;
    height: auto;
    margin: 1rem auto;
    padding: 10px;
}

.timer {
    font-size: 3.5rem;
    font-weight: bold;
    margin: 1.5rem 0;
}

/* Dark theme adjustments */
.dark-theme .progress-ring__circle {
    stroke: #45a049;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .timer-container {
        width: 200px;
        height: 200px;
    }
    
    .timer {
        font-size: 2.75rem;
    }
}

@media (max-width: 480px) {
    .timer-container {
        width: 180px;
        height: 180px;
    }
    
    .timer {
        font-size: 2.5rem;
    }
}

.dark-theme #toggleMusic:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dark theme adjustments */
.dark-theme blockquote {
    background: #3d3d3d;
    border-left-color: #4a90e2;
}

.dark-theme .quote {
    color: #ddd;
}

.dark-theme blockquote footer {
    color: #aaa;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .quote-container {
        padding: 0.5rem;
    }

    blockquote {
        padding: 1.25rem 1.75rem;
    }

    .quote {
        font-size: 0.9rem;
        min-height: 50px;
    }

    blockquote::before {
        font-size: 2.5rem;
    }
}

/* Dark theme adjustments */
.dark-theme #toggleMusic {
    color: #45a049;  /* Slightly darker green for dark theme */
}

.dark-theme #toggleMusic:hover {
    background-color: rgba(76, 175, 80, 0.2);  /* Adjusted hover for dark theme */
}

.dark-theme .music-icon {
    color: #45a049;  /* Slightly darker green for dark theme */
}