* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.5s ease;
}

/* Break session background */
body.break-session {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    min-width: 400px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 300;
}

.timer-container {
    margin-bottom: 40px;
}

.timer-display {
    background: #2c3e50;
    color: white;
    border-radius: 15px;
    padding: 40px 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(44, 62, 80, 0.3);
}

.timer-display #time-display {
    font-size: 4rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.mode-indicator {
    margin-bottom: 30px;
}

.mode-indicator #current-mode {
    font-size: 1.4rem;
    font-weight: 600;
    color: #34495e;
    background: #ecf0f1;
    padding: 10px 25px;
    border-radius: 25px;
    display: inline-block;
}

.controls {
    margin-bottom: 20px;
}

.navigation-controls {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    margin: 0 10px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #27ae60;
    color: white;
}

.btn-primary:hover {
    background: #2ecc71;
}

.btn-secondary {
    background: #f39c12;
    color: white;
}

.btn-secondary:hover {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-nav {
    background: #3498db;
    color: white;
    font-size: 0.9rem;
    padding: 10px 20px;
}

.btn-nav:hover {
    background: #2980b9;
}

.btn-nav:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-nav:disabled:hover {
    background: #bdc3c7;
    transform: none;
    box-shadow: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.session-info {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.session-counter {
    font-size: 1.1rem;
    color: #2c3e50;
}

.session-counter #session-count {
    font-weight: bold;
    color: #27ae60;
}

.settings-button-container {
    text-align: right;
    margin-top: 30px;
}

.btn-settings {
    background: #95a5a6;
    color: white;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 25px;
}

.btn-settings:hover {
    background: #7f8c8d;
}


/* Settings Overlay */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.settings-overlay.active {
    display: flex;
}

.settings-modal {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px;
    border-bottom: 1px solid #ecf0f1;
}

.settings-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.btn-close {
    background: #e74c3c;
    color: white;
    font-size: 1.5rem;
    padding: 5px 10px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.btn-close:hover {
    background: #c0392b;
}

.settings-content {
    padding: 25px;
}

.settings-content .setting-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-content .setting-group label {
    font-weight: 600;
    color: #34495e;
    flex-grow: 1;
}

.settings-content .setting-group input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
}

.settings-content .setting-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Checkbox Styling */
.settings-content .setting-group input[type="checkbox"] {
    width: auto;
    transform: scale(1.3);
    margin-left: auto;
    cursor: pointer;
}

/* Session Sequence Styling */
.session-sequence-section {
    margin-bottom: 30px;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 25px;
}

.session-sequence-section h4,
.general-settings-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.session-sequence-list {
    margin-bottom: 20px;
}

.session-item {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid transparent;
}

.session-item.work {
    border-left-color: #3498db;
}

.session-item.break {
    border-left-color: #f39c12;
}

.session-item-label {
    flex-grow: 1;
    font-weight: 600;
    color: #34495e;
    margin-right: 15px;
}

.session-item-input {
    width: 80px;
    padding: 6px 10px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    margin-right: 10px;
}

.session-item-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.session-item-remove {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.session-item-remove:hover {
    background: #c0392b;
}

.sequence-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-add {
    background: #27ae60;
    color: white;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 6px;
}

.btn-add:hover {
    background: #219a52;
}

.general-settings-section {
    margin-top: 25px;
}

/* Responsive design */
@media (max-width: 480px) {
    .container {
        margin: 20px;
        padding: 20px;
        min-width: unset;
    }
    
    .timer-display #time-display {
        font-size: 2.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        margin: 5px;
        font-size: 0.9rem;
    }
    
    .navigation-controls {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .btn-nav {
        width: 100%;
        max-width: 200px;
    }
    
    .settings-modal {
        width: 95%;
        margin: 20px;
    }
    
    .settings-content .setting-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .settings-content .setting-group input {
        width: 100%;
    }
    
    .session-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .session-item-label {
        margin-right: 0;
    }
    
    .session-item-input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .sequence-controls {
        flex-direction: column;
    }
    
    .btn-add {
        width: 100%;
    }
}
