* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: #0f0f0f;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 950px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
}

.header-content h1 {
    font-size: 2.2em;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.header .subtitle {
    font-size: 0.95em;
    color: #999;
    font-weight: 400;
    line-height: 1.5;
}

/* Stats Panel */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
}

.stat-label {
    font-size: 0.75em;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #00d97e;
}

.stat-unit {
    font-size: 0.9em;
    color: #888;
    font-weight: 400;
    margin-left: 2px;
}

/* Settings Panel */
.settings-panel {
    display: flex;
    justify-content: center;
    padding: 16px;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 48px;
    height: 24px;
    background: #444;
    border-radius: 12px;
    position: relative;
    transition: background 0.25s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #e0e0e0;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: #00d97e;
}

.toggle-switch input:checked + .toggle-slider::before {
    left: 26px;
}

.toggle-label {
    font-size: 0.95em;
    color: #e0e0e0;
    font-weight: 500;
}

/* Message Area */
.message-area {
    text-align: center;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #333;
}

.message-area p {
    color: #e0e0e0;
    font-size: 1.1em;
    margin: 0;
}

.message-area.correct {
    background: #0d3d1a;
    border-left-color: #00d97e;
}

.message-area.correct p {
    color: #00ff99;
}

.message-area.incorrect {
    background: #3d0d0d;
    border-left-color: #ff4444;
}

.message-area.incorrect p {
    color: #ff6666;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Bar Card */
.bar-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 240px;
}

.bar-visual {
    width: 100%;
    max-width: 100%;
    height: auto;
}

.bar-stub {
    transition: fill 0.2s ease;
}

.collar {
    transition: fill 0.2s ease;
}

.plate {
    filter: url(#plateShadow);
    transition: all 0.2s ease;
}

.plate-label {
    font-size: 13px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
    fill: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    user-select: none;
}

/* Plate Colors */
.plate-25 { fill: #e53935; }
.plate-20 { fill: #1e40af; }
.plate-15 { fill: #f59e0b; }
.plate-10 { fill: #16a34a; }
.plate-5 { fill: #ffffff; stroke: #999; stroke-width: 1.5; }
.plate-2\.5 { fill: #1a1a1a; }
.plate-1\.25 { fill: #d3d3d3; stroke: #999; stroke-width: 1; }

.plate-label-25,
.plate-label-20,
.plate-label-15,
.plate-label-10,
.plate-label-2\.5 { fill: white; }

.plate-label-5,
.plate-label-1\.25 { fill: #333; }

.plate-label { display: none; }
.plate-label.visible { display: block; }

/* Controls Panel */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.guess-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    font-size: 1em;
    border: 1px solid #444;
    border-radius: 6px;
    background: #2a2a2a;
    color: #e0e0e0;
    transition: all 0.2s ease;
    font-weight: 500;
}

.guess-input::placeholder {
    color: #666;
}

.guess-input:focus {
    outline: none;
    border-color: #00d97e;
    box-shadow: 0 0 0 3px rgba(0, 217, 126, 0.1);
}

.guess-input:disabled {
    background: #1a1a1a;
    color: #666;
    cursor: not-allowed;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    font-size: 0.95em;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.btn-start {
    background: #00d97e;
    color: #ffffff;
    width: 100%;
}

.btn-start:hover:not(:disabled) {
    background: #00ff99;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 217, 126, 0.3);
}

.btn-start:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 217, 126, 0.2);
}

.btn-submit {
    background: #00d97e;
    color: #ffffff;
    flex: 0 0 auto;
    min-width: 140px;
    font-weight: 700;
}

.btn-submit:hover:not(:disabled) {
    background: #00ff99;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 217, 126, 0.3);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 217, 126, 0.2);
}

.btn-submit:disabled {
    background: #444;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-next-round {
    background: #00d97e;
    color: #ffffff;
    width: 100%;
    font-weight: 700;
}

.btn-next-round:hover:not(:disabled) {
    background: #00ff99;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 217, 126, 0.3);
}

.btn-next-round:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 217, 126, 0.2);
}

.btn-next-round:disabled {
    background: #444;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Feedback Area */
.feedback-area {
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    padding: 20px;
    min-height: 50px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-area.correct {
    color: #00ff99;
    background: #0d3d1a;
}

.feedback-area.incorrect {
    color: #ff6666;
    background: #3d0d0d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.8em;
    }

    .header .subtitle {
        font-size: 0.9em;
    }

    .stats-panel {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .stat {
        padding: 14px 10px;
    }

    .stat-label {
        font-size: 0.7em;
    }

    .stat-value {
        font-size: 1.6em;
    }

    .bar-card {
        padding: 20px 15px;
        min-height: 200px;
    }

    .input-group {
        flex-direction: column;
    }

    .guess-input {
        width: 100%;
    }

    .btn-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 15px;
        margin-bottom: 25px;
    }

    .header-content h1 {
        font-size: 1.5em;
    }

    .header .subtitle {
        font-size: 0.8em;
    }

    .stats-panel {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat {
        padding: 12px 8px;
    }

    .stat-label {
        font-size: 0.65em;
    }

    .stat-value {
        font-size: 1.4em;
    }

    .bar-card {
        padding: 15px 10px;
        min-height: 160px;
    }

    .btn {
        font-size: 0.85em;
        padding: 10px 16px;
    }
}
