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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

.container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    width: 90%;
    max-width: 500px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

body.dark-theme .container {
    background-color: #1e1e1e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

h1 {
    color: #e74c3c;
    margin-bottom: 0;
    font-size: 2.5rem;
}

.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

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

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

.timer-display {
    margin: 30px 0;
}

#time {
    font-size: 5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    transition: color 0.3s;
}

body.dark-theme #time {
    color: #bb86fc;
}

#mode {
    font-size: 1.5rem;
    color: #7f8c8d;
    transition: color 0.3s;
}

body.dark-theme #mode {
    color: #9e9e9e;
}

.controls {
    margin: 30px 0;
}

.btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 25px;
    margin: 0 10px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.btn:hover:not(:disabled) {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

body.dark-theme .btn:disabled {
    background-color: #555;
}

.session-count {
    margin: 20px 0;
    font-size: 1.2rem;
}

.session-count span {
    font-weight: bold;
    color: #e74c3c;
}

.mode-selector {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    background-color: #ecf0f1;
    color: #7f8c8d;
    border: none;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

body.dark-theme .mode-btn {
    background-color: #333;
    color: #9e9e9e;
}

.mode-btn:hover {
    background-color: #d5dbdb;
}

body.dark-theme .mode-btn:hover {
    background-color: #444;
}

.mode-btn.active {
    background-color: #3498db;
    color: white;
}

body.dark-theme .mode-btn.active {
    background-color: #bb86fc;
    color: #121212;
}

.work-mode {
    color: #e74c3c;
}

.short-break-mode {
    color: #3498db;
}

.long-break-mode {
    color: #2ecc71;
}

.settings {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

body.dark-theme .settings {
    border-top: 1px solid #333;
}

.settings h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

body.dark-theme .settings h3 {
    color: #bb86fc;
}

.setting-group {
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-group label {
    margin-right: 10px;
}

.setting-group input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 60px;
}

body.dark-theme .setting-group input {
    background-color: #333;
    border: 1px solid #555;
    color: #e0e0e0;
}

.save-btn {
    margin-top: 15px;
    background-color: #2ecc71;
}

.save-btn:hover:not(:disabled) {
    background-color: #27ae60;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .theme-toggle {
        margin-top: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #time {
        font-size: 3.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        margin: 5px;
    }
    
    .mode-selector {
        flex-direction: column;
    }
    
    .mode-btn {
        margin: 5px 0;
    }
    
    .setting-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .setting-group input {
        margin-top: 5px;
    }
}
