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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.timer-creator {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

.input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.input-group input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input[type="number"] {
    max-width: 100px;
}

button {
    padding: 12px 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

.timers-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.timer-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.timer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.timer-card.finished {
    border-color: #ff4757;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 71, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

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

.timer-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.delete-timer {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.delete-timer:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.timer-display {
    font-size: 3em;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    color: #333;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.timer-display.warning {
    color: #ff6b35;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

.timer-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.timer-controls button {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
}

.start-btn {
    background: linear-gradient(45deg, #2ed573, #7bed9f);
}

.pause-btn {
    background: linear-gradient(45deg, #ffa502, #ff6348);
}

.stop-btn {
    background: linear-gradient(45deg, #ff4757, #ff3742);
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.controls button {
    min-width: 140px;
}

.timer-status {
    text-align: center;
    margin: 10px 0;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-running {
    color: #2ed573;
}

.status-paused {
    color: #ffa502;
}

.status-stopped {
    color: #ff4757;
}

.status-finished {
    color: #ff4757;
    animation: blink 1s infinite;
}

.sound-settings {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-top: 30px;
    border: 2px solid #e9ecef;
}

.sound-settings h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.setting-group label {
    font-weight: bold;
    color: #333;
    min-width: 80px;
}

.setting-group select,
.setting-group input[type="range"] {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.setting-group select:focus,
.setting-group input[type="range"]:focus {
    outline: none;
    border-color: #667eea;
}

.setting-group input[type="range"] {
    flex: 1;
    min-width: 150px;
}

#volumeDisplay {
    font-weight: bold;
    color: #667eea;
    min-width: 30px;
}

#testSound {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

#testSound:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.push-settings {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    border: 2px solid #e9ecef;
}

.push-settings h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.setting-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.push-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.push-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.push-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.status-text {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.status-text.enabled {
    color: #2ed573;
    background: rgba(46, 213, 115, 0.1);
}

.status-text.disabled {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

.permission-status {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.permission-status.granted {
    color: #2ed573;
    background: rgba(46, 213, 115, 0.1);
}

.permission-status.denied {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

.permission-status.default {
    color: #ffa502;
    background: rgba(255, 165, 2, 0.1);
}

.permission-status.unsupported {
    color: #747d8c;
    background: rgba(116, 125, 140, 0.1);
}

.permission-btn {
    background: linear-gradient(45deg, #ffa502, #ff6348);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.permission-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}



@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input,
    .input-group button {
        width: 100%;
    }
    
    .timers-container {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .timer-display {
        font-size: 2em;
    }
    
    .setting-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .setting-group label {
        min-width: auto;
    }
    
    .setting-group input[type="range"] {
        width: 100%;
    }
}