* {
    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, #2c1810 0%, #4a2c1a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #f5f5f5;
    transition: background 0.3s ease;
}

body.light-mode {
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d4c0 100%);
    color: #2c1810;
}

.container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

body.light-mode .container {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
    color: #f0e6d2;
    letter-spacing: 1px;
    flex: 1;
    transition: color 0.3s ease;
}

body.light-mode h1 {
    color: #4a2c1a;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 20px;
}

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

.lang-toggle,
.theme-toggle {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    opacity: 0.7;
}

body.light-mode .lang-toggle,
body.light-mode .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #6b7280;
}

.lang-toggle:hover,
.theme-toggle:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

body.light-mode .lang-toggle:hover,
body.light-mode .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.timer-display {
    text-align: center;
    font-size: 72px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-bottom: 40px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-family: "Courier New", monospace;
    transition:
        color 0.3s ease,
        text-shadow 0.3s ease;
}

body.light-mode .timer-display {
    color: #2c1810;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.controls {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

button {
    flex: 1;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.btn-start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-pause {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-reset {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-crack {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    width: 100%;
    margin-bottom: 12px;
    padding: 20px;
    font-size: 18px;
}

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

.btn-drop {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    width: 100%;
    margin-bottom: 30px;
    padding: 20px;
    font-size: 18px;
}

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

.info-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: background 0.3s ease;
}

body.light-mode .info-section {
    background: rgba(0, 0, 0, 0.05);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease;
}

body.light-mode .info-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

body.light-mode .info-label {
    color: #6b7280;
}

.info-value {
    font-size: 20px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-family: "Courier New", monospace;
    transition: color 0.3s ease;
}

body.light-mode .info-value {
    color: #2c1810;
}

.highlight {
    color: #fbbf24;
}

.development {
    color: #34d399;
}

.drop {
    color: #f472b6;
}

.cooling {
    color: #60a5fa;
}

.target-time-section {
    margin-bottom: 20px;
    text-align: center;
}

.target-label {
    display: block;
    font-size: 14px;
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

body.light-mode .target-label {
    color: #6b7280;
}

#targetTime {
    width: 120px;
    padding: 12px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-family: "Courier New", monospace;
    transition: all 0.3s ease;
}

body.light-mode #targetTime {
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #2c1810;
}

#targetTime:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(255, 255, 255, 0.15);
}

body.light-mode #targetTime:focus {
    background: rgba(0, 0, 0, 0.08);
    border-color: #8b5cf6;
}

@media (max-width: 480px) {
    .container {
        padding: 24px;
    }

    .timer-display {
        font-size: 56px;
    }

    h1 {
        font-size: 20px;
    }

    .header {
        margin-bottom: 30px;
    }

    .lang-toggle,
    .theme-toggle {
        padding: 5px 8px;
        font-size: 10px;
    }
}
