/* =========================================================
   ESC CARD GENERATOR – VOTING & QUALIFIERS STYLESHEET
   Unifica: voting panel, qualifiers reveal, animations, footer
   ========================================================= */

/* ===== ROOT VARIABLES ===== */

:root {
    --bg1: #1a0f3b;
    --bg2: #2b0f4a;
    --bg3: #0b0e1a;
    --text: #f4f6ff;
    --muted: #c7c9d9;
    --accent: #ff4fd8;
    --accent2: #4fd8ff;
    --panel: rgba(255,255,255,0.10);
    --radius: 20px;
    --font: "Segoe UI", system-ui, sans-serif;
}

/* ===== BODY ===== */

body {
    margin: 0;
    font-family: var(--font);
    background: linear-gradient(160deg, var(--accent) 0%, #7a3bd1 40%, var(--bg3) 100%);
    background-attachment: fixed;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    min-height: 100vh;
}

/* ===== TITLES ===== */

h1 {
    font-size: 48px;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

#subtitle {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
}

/* =========================================================
   VOTING PANEL
   ========================================================= */

.voting-panel {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.12);
    max-width: 900px;
    width: 100%;
    margin: 0 auto 40px;
}

.voting-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    -webkit-background-clip: text;
    color: transparent;
    text-align: center;
}

/* COUNTRY LIST */

.country-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.country-item {
    background: rgba(255,255,255,0.12);
    padding: 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.country-item:hover {
    background: rgba(255,255,255,0.20);
    transform: scale(1.02);
}

.country-item img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

.country-item input {
    transform: scale(1.4);
}

.country-item.selected {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #0b0e1a;
    transform: scale(1.05);
}

/* VOTE BUTTON */

.vote-button {
    width: 100%;
    padding: 14px;
    border-radius: 999px;
    border: none;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #0b0e1a;
    transition: 0.2s;
}

.vote-button:hover {
    filter: brightness(1.2);
}

/* =========================================================
   QUALIFIERS REVEAL
   ========================================================= */

#qualifiers {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 420px;
}

.card {
    background: rgba(255,255,255,0.10);
    border-radius: 10px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.18);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.7s forwards;
    height: 42px;
}

.card img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

#counter {
    margin-top: 18px;
    font-size: 13px;
    opacity: 0.75;
}

#credit-small {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.7;
}

#credit-big {
    margin-top: 2px;
    font-size: 16px;
    font-weight: 600;
    opacity: 0.9;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    60% { opacity: 1; transform: translateY(-3px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   FINAL VOTE ANIMATION
   ========================================================= */

#voteAnimationOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.vote-animation-box {
    text-align: center;
    animation: popIn 0.8s ease forwards;
}

.vote-animation-box img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 0 20px var(--accent2);
}

.vote-animation-box h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.vote-animation-box p {
    font-size: 20px;
    opacity: 0.9;
}

@keyframes popIn {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(10deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); }
}

/* =========================================================
   GLOBAL FOOTER
   ========================================================= */

.global-footer {
    margin-top: 40px;
    padding: 18px 24px;
    background: rgba(0, 0, 0, 0.55);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: #f5f5ff;
    width: 100%;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.footer-brand {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.9;
}

.footer-right {
    display: flex;
    gap: 14px;
}

.footer-link {
    font-size: 14px;
    color: var(--accent2);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(79, 216, 255, 0.4);
    background: rgba(10, 15, 35, 0.6);
    transition: 0.2s ease;
}

.footer-link:hover {
    background: rgba(79, 216, 255, 0.15);
    box-shadow: 0 0 10px rgba(79, 216, 255, 0.5);
    transform: translateY(-1px);
}
