body {
    font-family: 'Inter', 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1f2937;
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
    padding-top: 100px;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: none;
    padding-bottom: 1rem;
}

.page-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.page-header p {
    font-size: 1.1rem;
    color: #6b7280;
}

.pomodoro-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.1), 0 8px 16px rgba(0, 0, 0, 0.05);
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.timer-modes {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.mode-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    background-color: transparent;
    color: #6b7280;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.timer-display {
    font-family: 'Roboto Mono', monospace;
    font-size: 7rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

#start-stop-btn {
    padding: 1rem 3.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    border: none;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

#start-stop-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

#start-stop-btn:hover::before {
    opacity: 1;
}

#start-stop-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

#start-stop-btn.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

#start-stop-btn.active:hover {
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.4);
    transform: translateY(-3px);
}

.timer-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.control-btn {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.5rem;
    color: #6366f1;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.timer-stats {
    display: flex;
    gap: 3rem;
    color: #6b7280;
    font-weight: 500;
}

.stat-item {
    text-align: center;
}
.stat-item span:first-child {
    margin-right: 0.5rem;
}

.description-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.1), 0 8px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

/* Control Buttons */
#settings-btn, #fullscreen-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 1rem;
    cursor: pointer;
    color: #6366f1;
    transition: all 0.3s ease;
    padding: 0.6rem 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

#settings-btn:hover, #fullscreen-btn:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.2), 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 1001;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: 1.5rem 1.5rem 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 1.5rem;
    cursor: pointer;
    color: #6366f1;
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.modal-body {
    padding: 2rem;
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1c1e21;
}

.setting-item input[type="number"],
.setting-item select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    color: #1f2937;
    transition: all 0.3s ease;
}

.setting-item input[type="number"]:focus,
.setting-item select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 1);
}

.setting-item input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
    appearance: none;
    height: 0.5rem;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 0.25rem;
    outline: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.setting-item input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.setting-item input[type="range"]::-moz-range-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    cursor: pointer;
    border-radius: 50%;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.setting-item input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

#volume-display {
    font-size: 0.9rem;
    color: #6366f1;
    margin-left: 0.5rem;
    font-weight: 600;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.02), rgba(139, 92, 246, 0.02));
    border-radius: 0 0 1.5rem 1.5rem;
}

.modal-footer button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

#save-settings-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    position: relative;
    overflow: hidden;
}

#save-settings-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

#save-settings-btn:hover::before {
    opacity: 1;
}

#save-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

#cancel-settings-btn {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

#cancel-settings-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* Dark Mode */
body.dark-mode {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    color: #e2e8f0;
}

body.dark-mode .page-header h1 { 
    background: linear-gradient(135deg, #a855f7 0%, #d946ef 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
body.dark-mode .page-header p { color: #94a3b8; }

body.dark-mode .pomodoro-container,
body.dark-mode .description-section {
    background: rgba(30, 30, 60, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: rgba(168, 85, 247, 0.2);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.1), 0 8px 16px rgba(0, 0, 0, 0.3);
}

body.dark-mode .timer-modes { 
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

body.dark-mode .mode-btn { color: #94a3b8; }

body.dark-mode .mode-btn.active {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
    transform: translateY(-2px);
}

body.dark-mode .timer-display { 
    background: linear-gradient(135deg, #a855f7, #d946ef, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}
body.dark-mode .timer-stats { color: #94a3b8; }
body.dark-mode .control-btn, 
body.dark-mode #settings-btn, 
body.dark-mode #fullscreen-btn {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.2);
}
body.dark-mode .control-btn:hover, 
body.dark-mode #settings-btn:hover, 
body.dark-mode #fullscreen-btn:hover {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(168, 85, 247, 0.3);
}
body.dark-mode .setting-item label { color: #e2e8f0; }
body.dark-mode .setting-item input {
    background: rgba(30, 30, 60, 0.8);
    border-color: rgba(168, 85, 247, 0.3);
    color: #e2e8f0;
}

/* Fullscreen Button and Mode Specific Styles */
body.fullscreen-active #navigation-placeholder,
body.fullscreen-active .page-header,
body.fullscreen-active .description-section,
body.fullscreen-active #settings-modal,
body.fullscreen-active .timer-modes,
body.fullscreen-active .timer-stats,
body.fullscreen-active #settings-btn,
body.fullscreen-active #fullscreen-btn {
    display: none;
}

body.fullscreen-active {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

body.fullscreen-active .container {
    padding-top: 0;
    max-width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.fullscreen-active .pomodoro-container {
    box-shadow: none;
    background: transparent;
    height: 100%;
    justify-content: center;
}

body.fullscreen-active .timer-display {
    font-size: 20vw; /* Make font size responsive to viewport width */
}

/* Dark Mode */
body.dark-mode {
    background-color: #1f2937;
    color: #d1d5db;
}

body.dark-mode .page-header {
    border-bottom-color: #4b5563;
}

body.dark-mode .pomodoro-container,
body.dark-mode .description-section {
    background-color: #374151;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

body.dark-mode .mode-btn {
    background-color: #4b5563;
    color: #d1d5db;
    border-color: #6b7280;
}

body.dark-mode .mode-btn.active {
    background-color: #818cf8;
    color: #1e1b4b;
    border-color: #818cf8;
}

body.dark-mode #settings-btn {
    color: #9ca3af;
}

body.dark-mode .modal-content {
    background: rgba(30, 30, 60, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 30px 60px rgba(168, 85, 247, 0.2), 0 20px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .modal-header {
    border-bottom-color: rgba(168, 85, 247, 0.2);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(217, 70, 239, 0.1));
}

body.dark-mode .modal-header h3 {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .close-btn {
    color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

body.dark-mode .close-btn:hover {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

body.dark-mode .modal-footer {
    border-top-color: rgba(168, 85, 247, 0.2);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), rgba(217, 70, 239, 0.05));
}

body.dark-mode .setting-item label {
    color: #e4e6eb;
}

body.dark-mode .setting-item input[type="number"],
body.dark-mode .setting-item select {
    background: rgba(30, 30, 60, 0.8);
    border-color: rgba(168, 85, 247, 0.3);
    color: #e2e8f0;
}

body.dark-mode .setting-item input[type="number"]:focus,
body.dark-mode .setting-item select:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
    background: rgba(30, 30, 60, 1);
}

body.dark-mode .setting-item input[type="range"] {
    background: rgba(168, 85, 247, 0.2);
}

body.dark-mode .setting-item input[type="range"]::-webkit-slider-thumb {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

body.dark-mode .setting-item input[type="range"]::-moz-range-thumb {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

body.dark-mode #volume-display {
    color: #a855f7;
}

body.dark-mode #cancel-settings-btn {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

body.dark-mode #cancel-settings-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    color: #d946ef;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

body.dark-mode .timer-stats {
    color: #9ca3af;
}

body.dark-mode .description-section h2 {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

body.dark-mode .cycle-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-left: 4px solid #6366f1;
    color: #1f2937;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    font-style: italic;
}

body.dark-mode #fullscreen-btn {
    color: #9ca3af;
} 