/* ============================= */
/* CYBERPUNK POKÉMON RED / BLUE */
/* ENHANCED & MOBILE-FRIENDLY   */
/* ============================= */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;900&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
    --poke-red: #ff003c;
    --poke-blue: #0075ff;
    --poke-cyan: #00ffff;
    --dark-bg: #0a0a0f;
    --darker-bg: #050509;
    --card-bg: rgba(20, 20, 35, 0.92);
    --card-bg-hover: rgba(30, 30, 50, 0.95);
    --neon-glow-red: 0 0 15px #ff003c, 0 0 30px #ff003c, 0 0 45px rgba(255, 0, 60, 0.5);
    --neon-glow-blue: 0 0 15px #0075ff, 0 0 30px #0075ff, 0 0 45px rgba(0, 117, 255, 0.5);
    --neon-glow-cyan: 0 0 10px #00ffff, 0 0 20px rgba(0, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.65);
    --border-glow: rgba(0, 117, 255, 0.5);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Rajdhani', 'Orbitron', sans-serif;
    text-align: center;
    background: var(--dark-bg);
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 117, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 0, 60, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #111122 0%, #050509 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Keep footer at viewport bottom on short pages */
.page-vote,
.page-leaderboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-vote .site-footer,
.page-leaderboard .site-footer {
    margin-top: auto;
}

/* Animated grid background */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 117, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 117, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Subtle scanline overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.015),
        rgba(255, 255, 255, 0.015) 1px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 999;
    mix-blend-mode: overlay;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

/* Main content wrapper */
body > * {
    position: relative;
    z-index: 1;
}

/* Title */
h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: clamp(30px, 6vw, 60px);
    text-transform: uppercase;
    letter-spacing: clamp(2px, 1vw, 6px);
    background: linear-gradient(90deg, var(--poke-red), var(--poke-cyan), var(--poke-blue));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    text-shadow: 0 0 30px rgba(255, 0, 60, 0.3);
    line-height: 1.2;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* Container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(20px, 5vw, 80px);
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 1200px;
    padding: 20px;
}

/* Ensure vertical layout on mobile */
@media (max-width: 768px) {
    .container {
        flex-wrap: nowrap;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet vote page: keep footer anchored to viewport bottom */
    .page-vote {
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
    }

    .page-vote .container {
        flex: 1 1 auto;
        min-height: 0;
    }

    .page-vote .site-footer {
        margin-top: auto !important;
        margin-bottom: 0 !important;
    }
}

/* Card Button */
.card {
    background: var(--card-bg);
    border: 2px solid var(--poke-blue);
    border-radius: 20px;
    padding: clamp(25px, 4vw, 40px) clamp(20px, 3vw, 30px);
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    max-width: 300px;
    min-width: 240px;
    position: relative;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 20px rgba(0, 117, 255, 0.3), var(--shadow-lg);
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    overflow: hidden;
    touch-action: manipulation;
}

/* Card hover glow effect */
.card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, var(--poke-blue), var(--poke-cyan), var(--poke-blue));
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition-smooth);
    animation: borderGlow 3s ease infinite;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Alternating red border */
form:nth-child(2) .card {
    border-color: var(--poke-red);
    box-shadow: 0 0 20px rgba(255, 0, 60, 0.3), var(--shadow-lg);
}

form:nth-child(2) .card::before {
    background: linear-gradient(45deg, var(--poke-red), #ff3366, var(--poke-red));
}

/* Hover Effects */
.card:hover,
.card:focus-visible,
.card:active {
    transform: translateY(-12px) scale(1.03);
    box-shadow: var(--neon-glow-blue), var(--shadow-lg);
    background: var(--card-bg-hover);
    border-color: var(--poke-cyan);
}

.card:hover::before,
.card:focus-visible::before {
    opacity: 1;
}

form:nth-child(2) .card:hover,
form:nth-child(2) .card:focus-visible,
form:nth-child(2) .card:active {
    box-shadow: var(--neon-glow-red), var(--shadow-lg);
    border-color: #ff3366;
}

/* Active state for mobile */
.card:active {
    transform: translateY(-8px) scale(1.01);
}

/* Pokémon Image */
.card img {
    width: clamp(120px, 20vw, 180px);
    height: auto;
    margin-bottom: clamp(15px, 3vw, 25px);
    filter: drop-shadow(0 0 15px var(--poke-blue));
    transition: var(--transition-smooth);
    display: block;
    margin-left: auto;
    margin-right: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

form:nth-child(2) .card img {
    filter: drop-shadow(0 0 15px var(--poke-red));
}

.card:hover img,
.card:focus-visible img {
    transform: scale(1.15) rotate(2deg);
    filter: drop-shadow(0 0 25px var(--poke-blue));
}

form:nth-child(2) .card:hover img,
form:nth-child(2) .card:focus-visible img {
    filter: drop-shadow(0 0 25px var(--poke-red));
    transform: scale(1.15) rotate(-2deg);
}

/* Name */
.card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 600;
    letter-spacing: clamp(1px, 0.5vw, 3px);
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Links */
a {
    display: inline-block;
    margin-top: clamp(30px, 5vw, 60px);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 500;
    text-decoration: none;
    color: var(--poke-blue);
    transition: var(--transition-fast);
    position: relative;
    padding: 8px 16px;
    border-radius: 8px;
}

a::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--poke-red), transparent);
    transition: var(--transition-fast);
    box-shadow: 0 0 10px var(--poke-red);
}

a:hover,
a:focus-visible {
    color: var(--poke-red);
    text-shadow: var(--neon-glow-red);
    transform: translateY(-2px);
}

a:hover::after,
a:focus-visible::after {
    transform: translateX(-50%) scaleX(1);
}

/* ========================= */
/* LEADERBOARD CYBERPUNK UI */
/* ========================= */

.leaderboard-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: clamp(50px, 8vw, 80px);
    text-transform: uppercase;
    letter-spacing: clamp(2px, 1vw, 6px);
    background: linear-gradient(90deg, var(--poke-blue), var(--poke-cyan), var(--poke-red));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    line-height: 1.2;
}

.leaderboard {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: clamp(14px, 2.5vw, 24px) 20px 0;
}

.leader-row {
    --leader-media-width: clamp(56px, 12vw, 84px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(14px, 3vw, 20px);
    background: rgba(15, 15, 30, 0.9);
    border-radius: 16px;
    border: 1.5px solid rgba(0, 117, 255, 0.4);
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    box-shadow: 0 0 15px rgba(0, 117, 255, 0.2);
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

.leader-header {
    display: grid;
    grid-template-columns: var(--leader-media-width) 1fr;
    align-items: center;
    column-gap: clamp(12px, 3vw, 20px);
    width: 100%;
    min-width: 0;
}

.leader-header .rank {
    flex-shrink: 0;
}

.leader-header .leader-name {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.leader-content {
    display: grid;
    grid-template-columns: var(--leader-media-width) 1fr;
    align-items: center;
    column-gap: clamp(12px, 3vw, 20px);
    width: 100%;
}

.leader-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--poke-blue), var(--poke-cyan));
    opacity: 0;
    transition: var(--transition-fast);
}

.leader-row:hover,
.leader-row:focus-within {
    transform: translateX(10px);
    border-color: var(--poke-red);
    box-shadow: var(--neon-glow-red);
    background: rgba(20, 15, 35, 0.95);
}

.leader-row:hover::before,
.leader-row:focus-within::before {
    opacity: 1;
}

.rank {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 700;
    color: var(--poke-blue);
    min-width: clamp(40px, 8vw, 60px);
    text-shadow: 0 0 10px rgba(0, 117, 255, 0.5);
    flex-shrink: 0;
}

.leader-row img {
    width: var(--leader-media-width);
    height: auto;
    filter: drop-shadow(0 0 10px var(--poke-blue));
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.leader-row:hover img,
.leader-row:focus-within img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px var(--poke-red));
}

.leader-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.leader-name {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    letter-spacing: clamp(1px, 0.5vw, 2px);
    text-transform: uppercase;
    color: var(--text-primary) !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-align: right;
    display: block;
    visibility: visible;
    opacity: 1;
}

.leader-votes {
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

@media (min-width: 1200px) {
    /* Large screens: keep cards tighter and text more legible */
    .leaderboard {
        max-width: 760px;
    }

    .leader-row {
        padding: 18px 20px;
    }

    .rank {
        font-size: clamp(1.2rem, 1.8vw, 1.6rem);
        min-width: 64px;
    }

    .leader-name {
        font-size: clamp(1.4rem, 1.9vw, 1.8rem);
    }

    .leader-content {
        grid-template-columns: var(--leader-media-width) auto;
        justify-content: start;
        column-gap: 14px;
    }

    .leader-info {
        justify-self: start;
        align-items: flex-start;
        text-align: left;
    }

    .leader-votes {
        font-size: clamp(1rem, 1.2vw, 1.15rem);
    }
}

/* Back link */
.back-link {
    margin-top: clamp(50px, 8vw, 80px);
    margin-bottom: clamp(30px, 5vw, 50px);
}

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--poke-blue);
    text-decoration: none;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 600;
    transition: var(--transition-fast);
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 117, 255, 0.3);
    background: rgba(0, 117, 255, 0.05);
}

.back-link a:hover,
.back-link a:focus-visible {
    color: var(--poke-red);
    text-shadow: var(--neon-glow-red);
    border-color: var(--poke-red);
    background: rgba(255, 0, 60, 0.1);
    transform: translateX(-4px);
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.3);
}

/* ===================== */
/* FOOTER */
/* ===================== */

.site-footer {
    margin-top: clamp(40px, 8vw, 80px);
    padding: clamp(20px, 4vw, 30px) 20px;
    text-align: center;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    background: rgba(10, 10, 20, 0.85);
    border-top: 1px solid rgba(0, 117, 255, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--poke-blue), var(--poke-red), transparent);
    box-shadow: 0 0 10px rgba(0, 117, 255, 0.5);
}

.site-footer p {
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    line-height: 1.8;
}

.site-footer a {
    color: var(--poke-blue);
    text-decoration: none;
    transition: var(--transition-fast);
    font-weight: 600;
    margin: 0 4px;
    padding: 2px 4px;
    border-radius: 4px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--poke-red);
    text-shadow: var(--neon-glow-red);
    background: rgba(255, 0, 60, 0.1);
}

/* ===================== */
/* MOBILE RESPONSIVENESS */
/* ===================== */

/* Mobile: Vertical stack - Pokemon 1 → VS → Pokemon 2 → Footer */
/* Layout: Header 7% | Pokemon 1 40% | VS 6% | Pokemon 2 40% | Footer 7% */
@media (max-width: 768px) {
    html {
        height: auto;
        overflow-x: hidden;
    }

    body {
        padding: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
    }

    /* Hide overlays on mobile to prevent covering header */
    body::before {
        display: none;
    }

    body::after {
        display: none;
    }

    h1 {
        height: 8vh;
        min-height: 8vh;
        max-height: 8vh;
        font-size: clamp(1rem, 2.5vh, 1.3rem) !important;
        margin: 0 !important;
        padding: 0 12px;
        line-height: 1.1 !important;
        letter-spacing: 0.5px !important;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(10, 10, 20, 0.95) !important;
        border-bottom: 2px solid rgba(0, 117, 255, 0.4);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        position: sticky;
        top: 0;
        z-index: 1001 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        /* Ensure gradient text is visible */
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
        background-image: linear-gradient(90deg, var(--poke-red), var(--poke-cyan), var(--poke-blue)) !important;
        background-size: 200% auto !important;
    }

    h1::after {
        display: none !important; /* Remove overlay that covers header text */
    }

    .container {
        flex-direction: column;
        gap: 0;
        padding: 0;
        flex: 1;
        justify-content: flex-start;
        align-items: stretch;
        min-height: 0;
        width: 100%;
        overflow-y: auto;
    }

    .vote-form {
        margin: 0;
        padding: 12px 16px;
        width: 100%;
        flex: 0 0 auto;
        min-height: 35vh;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .card {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 16px 12px !important;
        border-radius: 16px;
        border-width: 2px;
        border: 2px solid var(--poke-blue);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0;
        transition: var(--transition-smooth);
        position: relative;
        box-shadow: 0 0 20px rgba(0, 117, 255, 0.3), var(--shadow-lg);
    }

    .vote-form:nth-child(3) .card {
        border-color: var(--poke-red);
        box-shadow: 0 0 20px rgba(255, 0, 60, 0.3), var(--shadow-lg);
    }

    .card img {
        width: auto !important;
        max-width: 80%;
        max-height: 60%;
        height: auto;
        margin-bottom: 8px !important;
        object-fit: contain;
    }

    .card h3 {
        font-size: clamp(0.8rem, 2.5vh, 1.2rem) !important;
        letter-spacing: 0.5px;
        line-height: 1.2;
        margin: 0;
    }

    .card:hover,
    .card:focus-visible {
        transform: translateY(-2px) scale(1.01);
        box-shadow: var(--neon-glow-blue), var(--shadow-lg);
    }

    .card:active {
        transform: translateY(0) scale(0.98);
    }

    .vote-form:nth-child(3) .card:hover,
    .vote-form:nth-child(3) .card:focus-visible {
        box-shadow: var(--neon-glow-red), var(--shadow-lg);
    }

    .vs-divider {
        height: 5vh;
        min-height: 5vh;
        max-height: 5vh;
        margin: 0;
        flex-shrink: 0;
        width: 100%;
        display: flex !important;
        justify-content: center;
        align-items: center;
        flex: 0 0 5vh;
    }

    .vs-text {
        width: clamp(35px, 8vw, 50px) !important;
        height: clamp(35px, 8vw, 50px) !important;
        font-size: clamp(0.65rem, 2vh, 0.9rem) !important;
        letter-spacing: 1px;
        padding: 4px;
        border-width: 2px;
    }


    .leaderboard-link {
        display: block !important;
        margin: 10px 16px !important;
        flex-shrink: 0;
        padding: 0;
    }

    .leaderboard-link a {
        display: block;
        width: 100%;
        padding: 14px 20px;
        font-size: clamp(0.85rem, 2vh, 1rem) !important;
        font-weight: 600;
        text-align: center;
        text-decoration: none;
        color: var(--text-primary);
        background: rgba(20, 20, 35, 0.9);
        border: 2px solid var(--poke-cyan);
        border-radius: 12px;
        transition: var(--transition-smooth);
        box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
        letter-spacing: 0.5px;
        text-transform: uppercase;
    }

    .leaderboard-link a:hover,
    .leaderboard-link a:focus-visible {
        background: rgba(30, 30, 50, 0.95);
        border-color: var(--poke-cyan);
        box-shadow: var(--neon-glow-cyan);
        transform: translateY(-2px);
    }

    .leaderboard-link a:active {
        transform: translateY(0) scale(0.98);
    }

    .site-footer {
        min-height: 6vh;
        margin: 0 !important;
        padding: 8px 10px !important;
        font-size: clamp(0.5rem, 1.5vh, 0.7rem) !important;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-top: 2px solid rgba(0, 117, 255, 0.3);
        background: rgba(10, 10, 20, 0.8);
    }

    .site-footer p {
        line-height: 1.3;
        margin: 0;
    }

    .leaderboard {
        width: 85%;
        max-width: none;
        margin: 0 auto;
        gap: 12px;
        padding: 14px 0 0;
    }

    .leader-row {
        padding: 16px 14px;
        gap: 12px;
    }

    .leader-header {
        width: 100%;
        align-items: center;
        justify-content: space-between;
    }

    .leader-header .rank {
        width: auto;
        margin-bottom: 0;
        text-align: left;
    }

    .leader-header .leader-name {
        flex: 1;
        min-width: 0;
        text-align: right;
        font-size: 1.1rem;
    }

    .leader-row:hover,
    .leader-row:focus-within {
        transform: translateX(6px);
    }

    .leader-info {
        gap: 3px;
    }

    .leader-name {
        font-size: 1.1rem;
    }

    .leader-votes {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    /* Same viewport-based layout for smaller phones */
    body {
        padding: 0;
    }

    h1 {
        height: 8vh !important;
        min-height: 8vh !important;
        max-height: 8vh !important;
        line-height: 1.1 !important;
        font-size: clamp(0.7rem, 2.2vh, 1rem) !important;
        letter-spacing: 0.4px !important;
        padding: 0 8px !important;
    }

    .card img {
        max-width: 75%;
        max-height: 55%;
    }

    .leaderboard-link a {
        padding: 12px 16px;
        font-size: clamp(0.8rem, 1.8vh, 0.95rem) !important;
    }

    .leaderboard-title {
        font-size: 0.9rem;
        margin-bottom: 20px;
        letter-spacing: 1px;
    }

    .leaderboard {
        width: 85%;
        padding-top: 12px;
    }
}

@media (max-width: 768px) {
    /* Voting page only: keep all interactive elements visible in one viewport */
    .page-vote {
        display: flex;
        flex-direction: column;
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }

    .page-vote h1 {
        height: 9dvh;
        min-height: 9dvh;
        max-height: 9dvh;
        line-height: 1.1 !important;
        font-size: clamp(0.85rem, 2.1vh, 1.05rem) !important;
    }

    .page-vote .container {
        height: 67dvh;
        min-height: 67dvh;
        max-height: 67dvh;
        overflow: hidden;
        gap: 0;
    }

    .page-vote .vote-form {
        min-height: 31dvh;
        max-height: 31dvh;
        padding: 8px 12px;
    }

    .page-vote .vs-divider {
        height: 5dvh;
        min-height: 5dvh;
        max-height: 5dvh;
        flex: 0 0 5dvh;
    }

    .page-vote .card {
        padding: 10px 8px !important;
    }

    .page-vote .card img {
        max-width: 72%;
        max-height: 58%;
        margin-bottom: 6px !important;
    }

    .page-vote .card h3 {
        font-size: clamp(0.9rem, 2.1vh, 1.1rem) !important;
    }

    .page-vote .leaderboard-link {
        margin: 6px 12px !important;
        padding: 0;
        flex-shrink: 0;
    }

    .page-vote .leaderboard-link a {
        padding: 10px 14px;
        font-size: clamp(0.78rem, 1.8vh, 0.9rem) !important;
    }

    .page-vote .site-footer {
        min-height: 8dvh;
        max-height: 8dvh;
        margin-top: auto !important;
        margin-bottom: 0 !important;
        padding: 6px 8px !important;
        font-size: clamp(0.5rem, 1.3vh, 0.62rem) !important;
    }
}

/* ===================== */
/* ACCESSIBILITY & FOCUS */
/* ===================== */

*:focus-visible {
    outline: 2px solid var(--poke-cyan);
    outline-offset: 4px;
    border-radius: 4px;
}

button:focus-visible,
.card:focus-visible {
    outline: none;
}

/* ===================== */
/* LOADING STATES */
/* ===================== */

.card:disabled,
.card[aria-busy="true"] {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}

/* ===================== */
/* REDUCE MOTION */
/* ===================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body::after,
    body::before {
        animation: none;
    }
}

/* ===================== */
/* PRINT STYLES */
/* ===================== */

@media print {
    body::before,
    body::after {
        display: none;
    }

    .card,
    .leader-row {
        box-shadow: none;
        border: 1px solid #333;
    }
}