:root {
    --primary-color: #2e8b57; /* SeaGreen */
    --secondary-color: #20b2aa; /* LightSeaGreen */
    --accent-color: #3cb371; /* MediumSeaGreen */
    --text-color: #333;
    --bg-gradient: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --danger-color: #e57373;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-attachment: fixed;
}

.container {
    width: 100%;
    max-width: 800px;
}

.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#lang-select {
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    cursor: pointer;
    font-size: 14px;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

#lang-select:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 20px;
    background: var(--glass-bg);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    margin-top: 40px;
}

h1 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.5px;
}

p {
    margin: 0;
    color: #666;
}

.tool-section {
    background: var(--glass-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:active {
    transform: scale(0.98);
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px rgba(46, 139, 87, 0.4);
}

.btn.primary:hover {
    background-color: #257549;
    box-shadow: 0 6px 20px rgba(46, 139, 87, 0.6);
}

.btn.secondary {
    background-color: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn.secondary:hover {
    background-color: #f0fdf4;
}

.btn.danger {
    background-color: #ffebee;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}
.btn.danger:hover {
    background-color: #ffcdd2;
}

.timers-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.timer-item {
    background: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    flex-wrap: wrap;
    gap: 10px;
}

.timer-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.task-name-input {
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: #444;
    background: transparent;
    padding: 5px;
    flex: 1;
    min-width: 120px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.task-name-input:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
}

.timer-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 20px;
    min-width: 140px;
    text-align: right;
}

.timer-controls {
    display: flex;
    gap: 10px;
}

.timer-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.start-btn {
    background-color: #e8f5e9;
    color: var(--primary-color);
}
.start-btn:hover { background-color: #c8e6c9; }

.pause-btn {
    background-color: #fff3e0;
    color: #ef6c00;
}
.pause-btn:hover { background-color: #ffe0b2; }

.reset-btn {
    background-color: #eceff1;
    color: #546e7a;
}
.reset-btn:hover { background-color: #cfd8dc; }

.delete-btn {
    background-color: #ffebee;
    color: var(--danger-color);
}
.delete-btn:hover { background-color: #ffcdd2; }

.total-time {
    margin-top: 25px;
    text-align: right;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
}

.ad-container {
    margin: 20px 0;
    text-align: center;
    min-height: 100px;
    background: rgba(255,255,255,0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-panel {
    background: var(--glass-bg);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

.description-section h2 {
    color: var(--primary-color);
    margin-top: 0;
}

.description-section h3 {
    color: var(--secondary-color);
    margin-top: 25px;
}

.description-section ul, .description-section ol {
    padding-left: 20px;
    line-height: 1.8;
    color: #555;
}

@media (max-width: 600px) {
    .timer-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .timer-display {
        text-align: center;
        margin: 10px 0;
    }
    
    .timer-controls {
        justify-content: center;
    }
    
    .task-name-input {
        text-align: center;
    }

    h1 { font-size: 24px; }
}
