/* Base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #0c2d48;
    background: #f5f9fb;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

/* Banner */
.banner {
    background: #f5f9fb;
    padding: 0;
}

.banner .container {
    width: 100%;
    margin: 0;
}

.banner img {
    width: 100%;
    border-radius: 0;
    display: block;
    box-shadow: 0 12px 30px rgba(11, 45, 72, 0.18);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #0b79b7, #0ea5e9);
    color: #ffffff;
    padding: 40px 0 60px;
}

.toast {
    position: sticky;
    top: 12px;
    z-index: 2;
    padding: 10px 14px;
    border-radius: 12px;
    background: #e7f6ff;
    color: #0c2d48;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.toast-show {
    opacity: 1;
    transform: translateY(0);
}

.toast.toast-error {
    background: #fee2e2;
    color: #7f1d1d;
}

/* Finalists title */
.finalists-title {
    margin: 6px 0 20px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Candidates */
.candidates-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.candidate-card {
    background: #ffffff;
    color: #0c2d48;
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 10px 20px rgba(11, 45, 72, 0.12);
    border: 2px solid transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.candidate-card::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 24px;
    bottom: 24px;
    width: 4px;
    border-radius: 999px;
    background: #06b6d4;
}

.candidate-card.is-selected {
    border-color: #0ea5e9;
    box-shadow: 0 14px 24px rgba(14, 165, 233, 0.35);
}

.candidate-media {
    position: relative;
}

.candidate-media video {
    width: 100%;
    border-radius: 18px;
    background: #0c2d48;
    aspect-ratio: 9 / 16;
    object-fit: cover;
}

.video-play-btn {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: rgba(12, 45, 72, 0.85);
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 18px rgba(12, 45, 72, 0.35);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.video-play-btn:hover {
    transform: scale(1.05);
}

.video-play-btn.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.video-placeholder {
    width: 100%;
    background: #e9f6ff;
    color: #3b556b;
    border-radius: 18px;
    padding: 28px 10px;
    text-align: center;
    font-size: 14px;
}

.vote-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #06b6d4;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.candidate-name {
    font-weight: 700;
    font-size: 18px;
}

.candidate-country {
    font-size: 13px;
    color: #5b7387;
}

.vote-btn {
    margin-top: 8px;
    background: #0c2d48;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
}

.vote-btn:hover {
    background: #123a5a;
}

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

.candidate-votes {
    margin-top: 6px;
    font-size: 14px;
    color: #0c2d48;
}

/* Campaign info */
.campaign-info {
    background: #ffffff;
    color: #0c2d48;
    padding: 50px 0 70px;
}

.campaign-info h2 {
    font-size: 26px;
    margin: 0 0 12px;
}

.campaign-info h3 {
    margin: 24px 0 10px;
    font-size: 18px;
}

.campaign-info p {
    margin: 0 0 12px;
    color: #344b5d;
    line-height: 1.6;
}

.campaign-info ul,
.campaign-info ol {
    margin: 0 0 14px 20px;
    padding: 0;
    color: #344b5d;
    line-height: 1.6;
}

.campaign-info li {
    margin-bottom: 6px;
}

.campaign-footer {
    margin-top: 18px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 980px) {
    .candidates-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .candidate-card::before {
        left: 16px;
        top: -8px;
        right: 16px;
        bottom: auto;
        height: 4px;
        width: auto;
    }
}

@media (max-width: 640px) {
    .candidates-panel {
        grid-template-columns: 1fr;
    }
}
