.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px;
    /* margin-top: 32px;  */
}

body {
    background: url('/assets/img/background.png') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: 'Roboto Mono', monospace;
}

#article-container {
    background: #FFF;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 700px;
}

#article {
    transition: transform 0.25s ease-out;
}

/* ── Result Overlay ── */
#article-container {
    position: relative;
}

.result-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #9dc2ca 0%, #93b6b6 100%);
    border-radius: 8px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    overflow: hidden;
}

.result-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.result-overlay-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 14px 32px 18px;
    box-sizing: border-box;
}

.result-overlay-title {
    font-size: 28px;
    font-weight: 700;
    color: #FFF;
    text-align: center;
    letter-spacing: 8px;
    margin-bottom: 12px;
}

/* Two-column body */
.result-overlay-body {
    display: flex;
    gap: 24px;
    flex: 1;
    min-height: 0;
    border-top: 3px solid white;
    border-bottom: 3px solid white;
    padding: 24px 0;
}

.result-left {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-right {
    flex: 1;
    min-width: 0;
    position: relative;
}

.result-right canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Stat boxes */
.result-box {
    background: rgba(100, 115, 110, 0.55);
    border-radius: 8px;
    padding: 12px 16px;
}

.result-box-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 0;
}

.result-box-row-primary {
    padding-bottom: 4px;
}

.result-box-label {
    font-size: 18px;
    color: #FFF;
    flex: 1;
}

.result-box-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.result-box-row-primary .result-box-value {
    font-size: 26px;
    color: #fff;
}

.result-box-unit {
    font-size: 11px;
    color: #d0d8d5;
}

.result-box-row-primary .result-box-unit {
    font-size: 13px;
}

/* Score row */
.result-score-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.result-score-stars {
    font-size: 24px;
    line-height: 1;
}

.result-score-number {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.result-score-label {
    font-size: 18px;
    color: #eee;
    align-self: flex-end;
    margin-bottom: 4px;
}

/* Action buttons */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-top: 16px;
    padding-top: 12px;
}



.result-btn {
    padding: 19px 38px;
    background: #FFF;
    border: none;
    color: #97a0b7;
    font-family: 'Roboto Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    border-radius: 32px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.result-btn:hover {
    background: #97a0b7;
    color: #FFF;
}

.result-box-row-primary {
    font-size: 24px;
    font-weight: 700;
    border-bottom: 1px solid #48b5dd;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.result-box-row-primary .result-box-label {
    font-size: 24px;
}

/* ── Hero Gauges Row ── */
.result-hero {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 36px;
    margin-bottom: 18px;
    flex-shrink: 0;
}

.result-gauge {
    position: relative;
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.result-gauge-center {
    width: 140px;
    align-items: center;
}

.gauge-svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.result-gauge-center .gauge-svg {
    width: 140px;
    height: 140px;
}

.gauge-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 8;
}

.gauge-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314.16;
    stroke-dashoffset: 314.16;
    transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-fill-accuracy {
    stroke: #f5c842;
}

.gauge-fill-time {
    stroke: rgba(255, 255, 255, 0.7);
}

.gauge-fill-wpm {
    stroke: #7ecfdf;
}

.gauge-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.gauge-value {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.gauge-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 1px;
    margin-top: 2px;
}

.result-stars-row {
    font-size: 22px;
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 4px;
}

.result-hero-score {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 6px;
}

.hero-score-number {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.hero-score-unit {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
}

.hero-score-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 1px;
    margin-top: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 4px;
    width: 100%;
    text-align: center;
}