* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e74c3c;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --background: #1a1a2e;
    --card-bg: #16213e;
    --text-primary: #eee;
    --text-secondary: #aaa;
    --border-color: #0f3460;
    --hover-color: #0f3460;
    --work-color: #e74c3c;
    --short-break-color: #27ae60;
    --long-break-color: #3498db;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
}

/* Theme: Purple Gradient (Default) */
body[data-theme="purple"] {
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
}

/* Theme: Ocean Blue */
body[data-theme="ocean"] {
    --gradient-start: #2E3192;
    --gradient-end: #1BFFFF;
}

/* Theme: Sunset */
body[data-theme="sunset"] {
    --gradient-start: #FF6B6B;
    --gradient-end: #FFD93D;
}

/* Theme: Forest Green */
body[data-theme="forest"] {
    --gradient-start: #134E5E;
    --gradient-end: #71B280;
}

/* Theme: Dark Mode */
body[data-theme="dark"] {
    --gradient-start: #232526;
    --gradient-end: #414345;
}

/* Theme: Rose Gold */
body[data-theme="rose"] {
    --gradient-start: #ED4264;
    --gradient-end: #FFEDBC;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    transition: background 0.5s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.theme-switcher {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
}

.theme-btn {
    width: 35px;
    height: 35px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-btn:hover {
    transform: scale(1.15);
    border-color: rgba(255,255,255,0.8);
}

.theme-btn.active {
    border-color: #fff;
    border-width: 3px;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

.theme-btn i {
    font-size: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.theme-btn[data-theme="purple"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-btn[data-theme="ocean"] {
    background: linear-gradient(135deg, #2E3192 0%, #1BFFFF 100%);
}

.theme-btn[data-theme="sunset"] {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFD93D 100%);
}

.theme-btn[data-theme="forest"] {
    background: linear-gradient(135deg, #134E5E 0%, #71B280 100%);
}

.theme-btn[data-theme="dark"] {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
}

.theme-btn[data-theme="rose"] {
    background: linear-gradient(135deg, #ED4264 0%, #FFEDBC 100%);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    animation: fadeIn 0.8s ease;
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Timer Section */
.timer-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timer-card, .todo-card, .music-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mode-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    font-weight: bold;
}

/* Timer Display */
.timer-display {
    text-align: center;
    margin: 40px 0;
}

.time {
    font-size: 6rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    letter-spacing: 0.05em;
}

.session-info {
    margin-top: 15px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
}

/* Timer Controls */
.timer-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.control-btn {
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.start-btn {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.reset-btn {
    background: rgba(255,255,255,0.2);
}

.reset-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px);
}

/* Settings Button */
.settings-toggle {
    text-align: center;
}

.settings-btn {
    padding: 10px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* Music Section */
.music-section h3 {
    margin-bottom: 15px;
    color: #fff;
}

.music-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.music-select {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
}

.music-select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

.music-toggle-btn {
    padding: 12px 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.music-toggle-btn:hover {
    background: rgba(255,255,255,0.2);
}

.music-player {
    border-radius: 12px;
    overflow: hidden;
    min-height: 80px;
}

.music-player iframe {
    width: 100%;
    height: 352px;
    border: none;
    border-radius: 12px;
}

/* Todo Section */
.todo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.todo-header h2 {
    color: #fff;
    font-size: 1.8rem;
}

.task-count {
    padding: 6px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Todo Input */
.todo-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.todo-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.todo-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.15);
}

.todo-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.add-todo-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-todo-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.1);
}

.filter-btn.active {
    color: #fff;
    background: rgba(255,255,255,0.2);
    font-weight: bold;
}

/* Todo List */
.todo-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

.todo-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.todo-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--success-color);
}

.todo-text {
    flex: 1;
    font-size: 1rem;
    color: var(--text-primary);
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.todo-actions {
    display: flex;
    gap: 8px;
}

.edit-btn, .delete-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.edit-btn {
    background: rgba(52, 152, 219, 0.3);
    color: #3498db;
}

.edit-btn:hover {
    background: rgba(52, 152, 219, 0.5);
}

.delete-btn {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.delete-btn:hover {
    background: rgba(231, 76, 60, 0.5);
}

/* Todo Footer */
.todo-footer {
    text-align: center;
}

.clear-btn {
    padding: 10px 20px;
    border: 2px solid rgba(231, 76, 60, 0.5);
    border-radius: 10px;
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: rgba(231, 76, 60, 0.4);
    border-color: rgba(231, 76, 60, 0.7);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.modal-header h2 {
    color: #fff;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg);
    color: #e74c3c;
}

.modal-body {
    padding: 25px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 500;
}

.setting-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-size: 1rem;
}

.setting-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--success-color);
}

.modal-footer {
    padding: 25px;
    border-top: 2px solid rgba(255,255,255,0.2);
    text-align: center;
}

.save-btn {
    padding: 12px 40px;
    border: none;
    border-radius: 30px;
    background: rgba(255,255,255,0.9);
    color: #333;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,255,255,0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .time {
        font-size: 4rem;
    }
    
    .control-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .todo-header h2 {
        font-size: 1.5rem;
    }
}
