body {
    margin: 0;
    font-family: Helvetica, Arial, sans-serif;
    background: var(--page-bg);
    color: var(--ink);
}

.container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 50px 20px;
    flex: 1;
}


/* =========================
   Header
   ========================= */

.header {
    margin-bottom: 28px;
    text-align: center;
}

.header h1 {
    margin: 0 0 10px;
    font-size: 40px;
    color: var(--brand);
    font-style: italic;
}

.header p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}


/* =========================
   Instrument Toggle
   ========================= */

.instrument-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 26px;
}

.instrument-toggle input {
    display: none;
}

.toggle {
    position: relative;
    display: flex;
    align-items: center;
    width: 280px;
    height: 48px;
    padding: 4px;
    overflow: hidden;
    background: var(--brand-pale);
    border: 2px solid var(--brand);
    border-radius: 25px;
    box-shadow: 0 5px 12px rgba(0, 134, 154, 0.13);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.toggle span:not(.toggle-slider) {
    z-index: 2;
    width: 50%;
    text-align: center;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 0.15px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
    transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.25s ease;
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: 38px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brand-deep), var(--brand) 70%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.25, 1.15);
}

#instrument-toggle:checked + .toggle .toggle-slider {
    transform: translateX(100%);
}

#instrument-toggle:not(:checked) + .toggle span:nth-child(1),
#instrument-toggle:checked + .toggle span:nth-child(2) {
    color: #ffe7a2;
    text-shadow: 0 1px 1px rgba(85, 55, 0, 0.45), 0 0 11px rgba(255, 209, 99, 0.65);
    transform: scale(1.04);
    animation: gold-shimmer 2.4s ease-in-out infinite;
}

@keyframes gold-shimmer {
    50% {
        color: #fff2bd;
        text-shadow: 0 1px 1px rgba(85, 55, 0, 0.45), 0 0 15px rgba(255, 222, 128, 0.9);
    }
}

@media (prefers-reduced-motion: reduce) {
    .toggle,
    .toggle-slider,
    .toggle span:not(.toggle-slider) {
        transition: none;
        animation: none;
    }
}


/* =========================
   Wiki Box (Container Principal)
   ========================= */

.wiki-box {
    background: #ffffff;
    border: 1px solid var(--line);
    border-top: 6px solid var(--brand);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.wiki-box-header {
    background: var(--brand);
    padding: 14px 18px 11px;
    text-align: center;
    border-bottom: 3px solid var(--accent);
}

.wiki-box-header h2,
.wiki-box-header h3 {
    margin: 0;
    font-size: 21px;
    font-weight: bold;
    font-style: italic;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.wiki-box-content {
    padding: 30px 34px;
}


/* =========================
   Candidates Cards
   ========================= */

.candidates {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.candidate {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 188px;
    padding: 16px 34px 6px;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transition: none;
}

.candidate + .candidate {
    border-left: 1px solid var(--line);
}

.candidate::before {
    position: static;
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
    border-radius: 50%;
    color: var(--brand-deep);
    content: "♫";
    background: var(--brand-pale);
    text-align: center;
    font-size: 22px;
    line-height: 34px;
}

.candidate-name {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
    color: var(--brand-deep);
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}


/* =========================
   Buttons & Media
   ========================= */

audio {
    width: 100%;
    margin-bottom: 15px;
}

.audio-button {
    width: 100%;
    margin-top: auto;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid var(--brand);
    border-radius: 2px;
    background: #ffffff;
    color: var(--brand-deep);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.audio-button:hover {
    background: var(--brand-pale);
}

.vote-button {
    width: 100%;
    padding: 11px 20px;
    border: 0;
    border-bottom: 3px solid var(--accent-deep);
    border-radius: 2px;
    background: var(--brand);
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.vote-button:hover {
    background: var(--brand-deep);
}

.vote-button:active {
    transform: scale(0.98);
}


/* =========================
   Vote Result Section
   ========================= */

.vote-result {
    margin-top: 36px;
    text-align: center;
}

.vote-confirmation {
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 18px;
}

.vote-confirmation strong {
    color: var(--brand-deep);
}

.results-section {
    max-width: 650px;
    margin: 0 auto;
    border: 0;
    border-top: 1px solid var(--line);
    box-shadow: none;
    background: transparent;
}

.results-section .wiki-box-header {
    padding: 15px 0 10px;
    background: transparent;
    border-bottom: 3px solid var(--accent);
}

.results-section .wiki-box-header h3 {
    color: var(--brand);
}

.results-section .wiki-box-content {
    padding: 24px 0 0;
}


/* =========================
   Candidates Showcase (Winner / Loser)
   ========================= */

.candidates-showcase {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 28px;
    margin: 0 0 25px;
    padding: 8px 0 18px;
    border-bottom: 1px solid var(--line);
}

.showcase-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 88px;
    transition: all 0.3s ease;
}

.showcase-card img {
    display: block;
    object-fit: cover;
    object-position: top;
    background: var(--brand-pale);
    border-radius: 50%;
}

/* Vencedora */
.showcase-card.winner img {
    width: 118px;
    height: 118px;
    border: 4px solid var(--brand);
    box-shadow: 0 0 0 4px var(--white), 0 0 0 6px var(--line), 0 8px 16px rgba(0, 134, 154, 0.22);
}

.showcase-card.winner::before {
    order: -1;
    margin-bottom: 7px;
    padding: 3px 9px;
    border-radius: 20px;
    color: #ffffff;
    content: "CURRENT SOLOIST";
    background: var(--brand-deep);
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 0.7px;
}

.showcase-card.winner .showcase-name {
    margin-top: 8px;
    font-size: 15px;
    font-weight: bold;
    color: var(--brand-deep);
}

/* Perdedora */
.showcase-card.loser {
    opacity: 0.72;
}

.showcase-card.loser img {
    width: 78px;
    height: 78px;
    border: 2px solid var(--line);
    filter: saturate(0.75);
}

.showcase-card.loser .showcase-name {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}


/* =========================
   Progress Bars
   ========================= */

.result {
    margin-bottom: 20px;
    text-align: left;
}

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

.result-header strong {
    font-size: 16px;
    color: var(--ink);
}

.result-header span {
    color: var(--brand-deep);
    font-size: 14px;
    font-weight: bold;
}

.result-bar {
    width: 100%;
    height: 13px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--brand-pale);
}

.result-bar-fill {
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-deep), var(--brand));
    box-shadow: inset -1px 0 0 rgba(0, 134, 154, 0.24);
    transition: width 0.5s ease;
}

.hidden {
    display: none;
}

/* =========================
   Mobile Responsive
   ========================= */

@media (max-width: 650px) {
    .container {
        padding-top: 25px;
    }

    .header h1 {
        font-size: 30px;
    }

    .candidates {
        grid-template-columns: 1fr;
    }

    .wiki-box-content {
        padding: 24px 20px;
    }

    .candidate {
        min-height: 0;
        padding: 20px 8px 26px;
    }

    .candidate + .candidate {
        padding-top: 26px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .toggle {
        width: 240px;
    }

}
