:root {
    --primary: #6C63FF;
    --primary-light: #8A84FF;
    --secondary: #FF6584;
    --accent: #36D1DC;
    --dark: #2D3047;
    --light: #F8F9FA;
    --success: #4CAF50;
    --warning: #FFC107;
    --danger: #F44336;
    --gray: #A0A0A0;
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--dark);
}

.container {
    width: 100%;
    max-width: 1200px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas:
        "header header"
        "timer tasks"
        "quote sounds"
        "footer footer";
    gap: 0;
}

header {
    grid-area: header;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100" opacity="0.1"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white"/><circle cx="20" cy="20" r="1" fill="white"/><circle cx="80" cy="80" r="1" fill="white"/><circle cx="80" cy="20" r="1" fill="white"/><circle cx="20" cy="80" r="1" fill="white"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.tagline {
    font-style: italic;
    opacity: 0.9;
    font-size: 1.1rem;
    position: relative;
}

.timer-container {
    grid-area: timer;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--card-bg);
}

.timer-display {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 20px 0;
}

.timer-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--success) 0%, var(--light) 0%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.timer-ring::before {
    content: "";
    position: absolute;
    width: 94%;
    height: 94%;
    background: white;
    border-radius: 50%;
    z-index: 1;
}

.timer-content {
    position: absolute;
    width: 220px;
    height: 220px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

#time {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}

#timer-label {
    font-size: 1.2rem;
    color: var(--gray);
    margin-top: 10px;
    font-weight: 600;
}

.timer-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
}

#start {
    background: var(--success);
    color: white;
}

#pause {
    background: var(--warning);
    color: white;
}

#reset {
    background: var(--danger);
    color: white;
}

.timer-settings {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.setting {
    text-align: center;
}

.setting h3 {
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 600;
}

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

.setting-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.setting-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 5px;
    min-width: 30px;
    text-align: center;
}

.tasks-container {
    grid-area: tasks;
    padding: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--card-bg);
}

.tasks-container h2 {
    color: var(--dark);
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
    font-size: 1.8rem;
}

#task-form {
    display: flex;
    margin-bottom: 20px;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#task-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 1rem;
    outline: none;
    background: white;
}

#task-form button {
    border-radius: 0;
    background: var(--primary);
    color: white;
    padding: 15px 25px;
    border: none;
}

#task-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

#task-list li {
    padding: 15px;
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.5s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

#task-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#task-list li.completed {
    opacity: 0.7;
    text-decoration: line-through;
    background: #f0f0f0;
}

.task-text {
    flex: 1;
    font-weight: 500;
}

.task-actions {
    display: flex;
    gap: 10px;
}

.task-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.task-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.task-complete {
    color: var(--success);
}

.task-delete {
    color: var(--danger);
}

.quote-container {
    grid-area: quote;
    padding: 30px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--card-bg);
}

.quote-container h2 {
    color: var(--dark);
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.8rem;
}

#quote {
    font-size: 1.2rem;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: 500;
}

#author {
    font-weight: 600;
    color: var(--primary);
}

#new-quote {
    margin-top: 20px;
    background: var(--primary);
    color: white;
}

.sounds-container {
    grid-area: sounds;
    padding: 30px;
    background: var(--card-bg);
}

.sounds-container h2 {
    color: var(--dark);
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
    font-size: 1.8rem;
}

.sound-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.sound-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.sound-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.sound-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary-light);
}

.sound-btn i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.volume-control label {
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

#volume-slider {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: var(--light);
    outline: none;
    -webkit-appearance: none;
}

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

#volume-value {
    font-weight: 600;
    color: var(--primary);
    min-width: 40px;
}

footer {
    grid-area: footer;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "timer"
            "tasks"
            "quote"
            "sounds"
            "footer";
    }
    
    .timer-container {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .quote-container {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
}

@media (max-width: 768px) {
    .timer-display {
        width: 250px;
        height: 250px;
    }
    
    .timer-content {
        width: 200px;
        height: 200px;
    }
    
    #time {
        font-size: 3rem;
    }
    
    .timer-settings {
        flex-direction: column;
        gap: 20px;
    }
    
    .sound-buttons {
        grid-template-columns: 1fr;
    }
    
    .volume-control {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .volume-control label {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.2rem;
    }
    
    .timer-display {
        width: 220px;
        height: 220px;
    }
    
    .timer-content {
        width: 180px;
        height: 180px;
    }
    
    #time {
        font-size: 2.5rem;
    }
    
    .timer-controls {
        flex-direction: column;
        width: 100%;
        max-width: 250px;
    }
    
    button {
        width: 100%;
        justify-content: center;
    }
    
    #task-form {
        flex-direction: column;
        border-radius: 12px;
    }
    
    #task-form button {
        border-radius: 0 0 12px 12px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}