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

:root {
    --primary-color: #e74c3c;
    --mode-primary-color: var(--primary-color);
    --secondary-color: #27ae60;
    --background-color: #282c34;
    --surface-color: #353b48;
    --text-color: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #f39c12;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --border-radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --gradient: linear-gradient(135deg, var(--primary-color), #c0392b);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    transition: all 0.3s ease;
}

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

body[data-theme="ocean"] {
    --primary-color: #3498db;
    --background-color: #1e2a44;
    --surface-color: #2c3e50;
    --gradient: linear-gradient(135deg, #3498db, #2980b9);
}

body[data-theme="forest"] {
    --primary-color: #27ae60;
    --background-color: #22311d;
    --surface-color: #2e3b29;
    --gradient: linear-gradient(135deg, #27ae60, #219653);
}

body[data-theme="light"] {
    --primary-color: #e67e22;
    --background-color: #f5f6fa;
    --surface-color: #ffffff;
    --text-color: #2d3436;
    --text-secondary: #636e72;
    --gradient: linear-gradient(135deg, #e67e22, #d35400);
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--mode-primary-color);
}

.btn-success {
    background: var(--success-color);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

.timer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.mode-selector {
    display: flex;
    gap: 10px;
}

.mode-btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: var(--mode-primary-color);
}

.mode-btn[data-mode="shortBreak"].active {
    background: #3498db;
}

.mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.timer-display {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: var(--surface-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    border: 8px solid var(--mode-primary-color);
}

.timer-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--mode-primary-color) 0deg, transparent 0deg);
    z-index: 1;
}

.timer-time {
    font-size: 48px;
    font-weight: bold;
    color: var(--text-color);
    z-index: 2;
}

.timer-label {
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 10px;
    z-index: 2;
}

.timer-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--mode-primary-color);
    font-size: 24px;
}

.card {
    background: var(--surface-color);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.task-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 14px;
}

.task-input::placeholder {
    color: var(--text-secondary);
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--mode-primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 14px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--mode-primary-color);
    cursor: pointer;
}

.spotify-player {
    margin-top: 15px;
    width: 100%;
    max-width: 350px;
}

.spotify-track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.track-name {
    font-size: 14px;
    font-weight: bold;
}

.track-artist {
    font-size: 12px;
    color: var(--text-secondary);
}

.spotify-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.spotify-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1db954;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.spotify-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.theme-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.theme-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-option:hover {
    transform: scale(1.1);
}

.theme-option.active {
    border: 2px solid var(--text-color);
}

.theme-default {
    background: #e74c3c;
}

.theme-ocean {
    background: #3498db;
}

.theme-forest {
    background: #27ae60;
}

.theme-light {
    background: #e67e22;
}

.notifications {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.notification {
    background: var(--surface-color);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--error-color);
}

@keyframes slideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.hidden {
    display: none !important;
}

.pip-mode-message {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
    text-align: center;
    padding: 20px;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .timer-display {
        width: 280px;
        height: 280px;
    }
    
    .timer-time {
        font-size: 36px;
    }

    .spotify-player {
        max-width: 280px;
    }

    .pip-mode-message {
        font-size: 20px;
        padding: 15px;
        max-width: 280px;
    }
}