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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

.card {
    background: #2c3e50;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.title {
    color: #ecf0f1;
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
}

.timer-display {
    color: #3498db;
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: #34495e;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.time-inputs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.input-group label {
    color: #ecf0f1;
    font-size: 14px;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #34495e;
    color: #ecf0f1;
    font-size: 16px;
    text-align: center;
    font-weight: bold;
}

.input-group input:focus {
    outline: none;
    background: #3d566e;
}

.sound-section {
    margin-bottom: 20px;
}

.sound-section label {
    color: #ecf0f1;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.sound-select {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #34495e;
    color: #ecf0f1;
    font-size: 14px;
    margin-bottom: 10px;
    cursor: pointer;
}

.sound-select:focus {
    outline: none;
    background: #3d566e;
}

.audio-status {
    color: #27ae60;
    font-size: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.audio-status.error {
    color: #e74c3c;
}

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

.btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-start {
    background: #27ae60;
}

.btn-start:hover:not(:disabled) {
    background: #229954;
}

.btn-stop {
    background: #e74c3c;
}

.btn-stop:hover:not(:disabled) {
    background: #c0392b;
}

.btn-test {
    width: 100%;
    background: #f39c12;
    margin-top: 10px;
}

.btn-test:hover {
    background: #e67e22;
}

.status {
    color: #95a5a6;
    text-align: center;
    font-size: 14px;
    margin-bottom: 20px;
    min-height: 20px;
}

.info-box {
    background: #34495e;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.info-box h3 {
    color: #ecf0f1;
    font-size: 16px;
    margin-bottom: 10px;
}

.info-box ul {
    color: #bdc3c7;
    font-size: 13px;
    line-height: 1.8;
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 5px;
}

@media (max-width: 600px) {
    .card {
        padding: 30px 20px;
    }
    
    .title {
        font-size: 28px;
    }
    
    .timer-display {
        font-size: 40px;
    }
    
    .time-inputs {
        flex-direction: column;
        gap: 15px;
    }
    
    .input-group {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .input-group label {
        margin-bottom: 0;
        margin-right: 10px;
        flex: 0 0 80px;
    }
    
    .input-group input {
        flex: 1;
    }
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: #bdc3c7;
    font-size: 13px;
}

.footer p {
    margin: 10px 0;
}

.footer-link {
    color: #2ecc71;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
}

.footer-link:hover {
    background: rgba(46, 204, 113, 0.15);
    transform: translateY(-2px);
}

/* Focus Mode: Hide controls when timer is running */
.card.running .time-inputs,
.card.running .sound-section,
.card.running .title,
.card.running .audio-status,
.card.running .info-box,
.card.running .footer {
    display: none;
}

.card.running .timer-display {
    font-size: 64px;
    margin: 60px 0;
}

.card.running .controls {
    justify-content: center;
}

.card.running .btn-stop {
    max-width: 250px;
}

