* {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow: hidden;
    background: #000;
    font-family: 'Courier New', Courier, monospace;
    color: #fff;
    user-select: none;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

#gameCanvas {
    display: block;
    width: 100vw;
    height: 100vh;
    transition: filter 0.2s ease;
    touch-action: none;
}

#gameCanvas.inverted {
    filter: invert(1) hue-rotate(180deg);
}

#ui {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000;
    z-index: 10;
    pointer-events: none;
}

.ui-value {
    color: yellow;
}

#highScoreVal {
    color: #00ff00;
}

#speedVal {
    color: #00ffff;
}

.powerup-text {
    display: none;
    color: #ff00de;
    font-size: 30px;
    animation: shake 0.2s infinite;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 20;
    touch-action: pan-y;
}

.start-screen {
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,0.8);
    color: yellow;
}

.leaderboard-screen {
    background: rgba(0,0,0,0.9);
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 20px;
    padding-bottom: 100px; /* Space for fixed button */
    overscroll-behavior: contain;
    /* Override overlay centering to allow scrolling */
    align-items: flex-start;
    justify-content: flex-start;
}

.leaderboard-screen .panel {
    max-width: 100%;
    width: 100%;
    min-height: min-content;
}

#closeLeaderboardBtn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
}

.highlight-row {
    background-color: #ff00de !important;
    color: #000 !important;
    font-weight: bold;
    animation: crazy-jump 0.15s ease-in-out infinite;
    position: relative;
    box-shadow: 0 0 20px #ff00de, 0 0 40px #ff00de;
}

.highlight-row td {
    animation: color-cycle 0.3s linear infinite;
}

@keyframes crazy-jump {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    25% { transform: translateY(-8px) rotate(-2deg) scale(1.02); }
    50% { transform: translateY(0) rotate(0deg) scale(1); }
    75% { transform: translateY(-6px) rotate(2deg) scale(1.01); }
    100% { transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes color-cycle {
    0% { background-color: #ff00de; color: #ffff00; }
    33% { background-color: #ffff00; color: #00ffff; }
    66% { background-color: #00ffff; color: #ff00de; }
    100% { background-color: #ff00de; color: #ffff00; }
}

.panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.start-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

h1 {
    font-size: 60px;
    color: yellow;
    text-shadow: 4px 4px #ff00de;
    margin: 0;
    animation: shake 0.5s infinite;
}

.subtitle {
    font-size: 20px;
}

.killer-line {
    font-size: 18px;
    color: #ff4444;
    text-transform: uppercase;
    animation: pulse-red 0.5s ease-in-out infinite alternate;
}

@keyframes pulse-red {
    from { color: #ff4444; text-shadow: 0 0 10px #ff0000; }
    to { color: #ff8888; text-shadow: 0 0 20px #ff0000; }
}

.scoreline {
    font-size: 24px;
    color: #00ff00;
}

button {
    background: #ff00de;
    color: yellow;
    border: 4px solid yellow;
    padding: 15px 30px;
    font-size: 24px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    margin-top: 10px;
    text-transform: uppercase;
    box-shadow: 4px 4px 0px #fff;
    transition: transform 0.1s;
    touch-action: manipulation;
}

button:hover {
    background: yellow;
    color: #ff00de;
    border-color: #ff00de;
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
}

button.selected {
    background: yellow;
    color: #ff00de;
    border-color: #fff;
    transform: scale(1.05);
}

button.inline {
    margin-top: 0;
}

input {
    padding: 10px;
    font-size: 20px;
    font-family: 'Courier New', Courier, monospace;
    border: 2px solid #ff00de;
    background: #000;
    color: yellow;
    text-align: center;
    width: 200px;
    margin: 20px 0 10px;
}

#leaderboardScreen table {
    border-collapse: collapse;
    width: 80%;
    max-width: 600px;
    margin-top: 20px;
    font-size: 18px;
}

#leaderboardScreen th,
#leaderboardScreen td {
    border: 1px solid #ff00de;
    padding: 10px;
    text-align: left;
}

#leaderboardScreen th {
    background-color: #ff00de;
    color: yellow;
}

#leaderboardScreen tr:nth-child(even) {
    background-color: #1a0010;
}

.version-badge {
    position: absolute;
    right: 20px;
    bottom: 20px;
    padding: 8px 12px;
    font-size: 14px;
    background: yellow;
    color: #ff00de;
    border: 3px solid #ff00de;
    border-radius: 10px;
    box-shadow: 3px 3px 0px #fff;
    text-shadow: 1px 1px #000;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* Villain Designer */
.villain-designer {
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    touch-action: none;
}

.villain-designer .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: #ff3333;
    border: 3px solid yellow;
    color: yellow;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 3px 3px 0px #fff;
    z-index: 100;
}

.villain-designer .close-btn:hover,
.villain-designer .close-btn.selected {
    background: yellow;
    color: #ff3333;
    transform: scale(1.1);
}

/* Designer layout - arrows on sides */
.designer-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* Side arrows container */
.side-arrows {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
}

/* Side arrow buttons */
.side-arrow {
    width: 44px;
    height: 44px;
    background: yellow;
    border: 3px solid #ff00de;
    color: #ff00de;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.5);
    transition: all 0.1s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.side-arrow:hover {
    background: #ff00de;
    color: yellow;
    transform: scale(1.15);
}

.side-arrow.selected {
    background: #ff00de;
    color: yellow;
    box-shadow: 0 0 15px #ff00de, 3px 3px 0px rgba(0,0,0,0.5);
}

.side-arrow:active,
.side-arrow.flash {
    background: #fff;
    color: #ff00de;
    transform: scale(0.9);
}

/* Villain frame */
.villain-frame {
    position: relative;
    width: min(55vw, 55vh);
    height: min(55vw, 55vh);
    min-width: 200px;
    min-height: 200px;
    background: linear-gradient(to bottom, #1a0010 0%, #2a001a 100%);
    border: 5px solid #ff00de;
    border-radius: 20px;
    box-shadow: 0 0 40px #ff00de;
}

#villainPreview {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

/* Villain name input */
.villain-name-input {
    margin-bottom: 20px;
    text-align: center;
}

.villain-name-input.selected input {
    border-color: #ff00de;
    box-shadow: 0 0 20px #ff00de;
}

.villain-name-input input {
    width: 85%;
    max-width: 400px;
    padding: 12px 20px;
    font-size: 18px;
    font-family: inherit;
    text-align: center;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #ff00de;
    color: #fff;
    outline: none;
}

.villain-name-input input::placeholder {
    color: #888;
}

.villain-name-input input:focus {
    border-color: yellow;
    box-shadow: 0 0 15px yellow;
}

.villain-name-input input.highlight-crazy {
    animation: crazy-input 0.15s ease-in-out infinite;
    border-color: #ff00de;
    box-shadow: 0 0 30px #ff00de, 0 0 60px #ff00de;
}

@keyframes crazy-input {
    0% { transform: translateX(0) scale(1); background-color: #ff00de; color: #000; }
    25% { transform: translateX(-5px) scale(1.02); background-color: yellow; color: #ff00de; }
    50% { transform: translateX(5px) scale(1); background-color: #00ffff; color: #000; }
    75% { transform: translateX(-3px) scale(1.01); background-color: #ff00de; color: yellow; }
    100% { transform: translateX(0) scale(1); background-color: #ff00de; color: #000; }
}

/* Bottom buttons */
.designer-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.designer-buttons button {
    padding: 15px 40px;
    font-size: 22px;
}

.designer-buttons button.selected {
    transform: scale(1.1);
    box-shadow: 0 0 20px yellow;
}

#cancelVillainBtn {
    background: #333;
    border-color: #666;
}

#cancelVillainBtn:hover,
#cancelVillainBtn.selected {
    background: #666;
    color: yellow;
}

/* Mobile adjustments */
@media (max-width: 500px) {
    .designer-layout {
        gap: 8px;
    }

    .villain-frame {
        width: 60vw;
        height: 60vw;
        min-width: 150px;
        min-height: 150px;
    }

    .side-arrows {
        gap: 12px;
        padding: 10px 0;
    }

    .side-arrow {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .designer-buttons button {
        padding: 10px 25px;
        font-size: 18px;
    }
}

/* ============================================
   WANTED POSTER - Neo-Future Steckbrief
   ============================================ */

.wanted-poster {
    background: radial-gradient(ellipse at center, rgba(10, 0, 20, 0.95) 0%, rgba(0, 0, 0, 0.98) 100%);
    backdrop-filter: blur(10px);
    z-index: 25;
}

.wanted-frame {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: linear-gradient(135deg, #0a0015 0%, #1a0030 50%, #0a0015 100%);
    border: 3px solid #ff00de;
    border-radius: 20px;
    padding: 25px;
    box-shadow:
        0 0 30px rgba(255, 0, 222, 0.5),
        0 0 60px rgba(255, 0, 222, 0.3),
        inset 0 0 30px rgba(255, 0, 222, 0.1);
    animation: poster-pulse 2s ease-in-out infinite;
}

@keyframes poster-pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 0, 222, 0.5), 0 0 60px rgba(255, 0, 222, 0.3), inset 0 0 30px rgba(255, 0, 222, 0.1); }
    50% { box-shadow: 0 0 50px rgba(255, 0, 222, 0.7), 0 0 100px rgba(255, 0, 222, 0.4), inset 0 0 50px rgba(255, 0, 222, 0.2); }
}

/* Corner decorations */
.wanted-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #00ffff;
}

.wanted-corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.wanted-corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.wanted-corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.wanted-corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

/* Header */
.wanted-header {
    text-align: center;
    margin-bottom: 20px;
}

.wanted-glitch {
    font-size: 48px;
    font-weight: bold;
    color: #ff00de;
    text-shadow:
        0 0 10px #ff00de,
        0 0 20px #ff00de,
        0 0 40px #ff00de;
    letter-spacing: 10px;
    animation: glitch 0.5s infinite;
    position: relative;
}

.wanted-glitch::before,
.wanted-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wanted-glitch::before {
    color: #00ffff;
    animation: glitch-1 0.3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.wanted-glitch::after {
    color: #ffff00;
    animation: glitch-2 0.3s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); opacity: 0.8; }
    20% { transform: translate(3px, 0); }
    40% { transform: translate(-3px, 0); }
    60% { transform: translate(3px, 0); }
    80% { transform: translate(-3px, 0); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); opacity: 0.8; }
    20% { transform: translate(-3px, 0); }
    40% { transform: translate(3px, 0); }
    60% { transform: translate(-3px, 0); }
    80% { transform: translate(3px, 0); }
}

.wanted-subtitle {
    font-size: 12px;
    color: #00ffff;
    letter-spacing: 5px;
    margin-top: 5px;
    text-shadow: 0 0 10px #00ffff;
}

/* Villain container */
.wanted-villain-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    background: linear-gradient(45deg, #1a0030 0%, #2a0040 100%);
    border: 2px solid #ff00de;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(255, 0, 222, 0.3);
}

#wantedPosterCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.wanted-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    animation: scanline-move 0.1s linear infinite;
}

@keyframes scanline-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(3px); }
}

/* Info section */
.wanted-info {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ffff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.wanted-info > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.wanted-info > div:last-child {
    border-bottom: none;
}

.wanted-label {
    font-size: 11px;
    color: #888;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.wanted-value {
    font-size: 16px;
    font-weight: bold;
}

.villain-name {
    color: #ff00de;
    text-shadow: 0 0 10px #ff00de;
    animation: name-pulse 1s ease-in-out infinite;
}

@keyframes name-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.creator-name {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.kill-count {
    color: #ff4444;
    text-shadow: 0 0 15px #ff0000;
    font-size: 20px;
    animation: kill-shake 0.5s ease-in-out infinite;
}

@keyframes kill-shake {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Rank container */
.wanted-rank-container {
    text-align: center;
    padding: 15px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 0, 222, 0.2) 50%, transparent 100%);
    border-radius: 10px;
    margin-bottom: 15px;
}

.wanted-rank-label {
    font-size: 10px;
    color: #888;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.wanted-rank {
    font-size: 22px;
    font-weight: bold;
    color: #ffff00;
    text-shadow:
        0 0 10px #ffff00,
        0 0 20px #ffff00,
        0 0 40px #ff8800;
    letter-spacing: 3px;
    animation: rank-glow 1.5s ease-in-out infinite;
}

@keyframes rank-glow {
    0%, 100% {
        text-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00, 0 0 40px #ff8800;
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 20px #ffff00, 0 0 40px #ffff00, 0 0 80px #ff8800;
        transform: scale(1.02);
    }
}

/* Rank tier colors */
.wanted-rank.rare {
    color: #44aaff;
    text-shadow: 0 0 10px #44aaff, 0 0 20px #44aaff, 0 0 40px #0066ff;
}

.wanted-rank.epic {
    color: #aa44ff;
    text-shadow: 0 0 10px #aa44ff, 0 0 20px #aa44ff, 0 0 40px #6600ff;
    animation: rank-glow-epic 1s ease-in-out infinite;
}

@keyframes rank-glow-epic {
    0%, 100% { text-shadow: 0 0 10px #aa44ff, 0 0 20px #aa44ff, 0 0 40px #6600ff; }
    50% { text-shadow: 0 0 20px #aa44ff, 0 0 40px #aa44ff, 0 0 80px #6600ff; }
}

.wanted-rank.mythic {
    color: #ff8800;
    text-shadow: 0 0 10px #ff8800, 0 0 20px #ff8800, 0 0 40px #ff4400;
    animation: rank-glow-mythic 0.8s ease-in-out infinite;
}

@keyframes rank-glow-mythic {
    0%, 100% { text-shadow: 0 0 10px #ff8800, 0 0 20px #ff8800, 0 0 40px #ff4400; transform: scale(1); }
    50% { text-shadow: 0 0 30px #ff8800, 0 0 60px #ff8800, 0 0 100px #ff4400; transform: scale(1.05); }
}

.wanted-rank.legendary {
    background: linear-gradient(90deg, #ff00de, #ffff00, #00ffff, #ff00de);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rank-rainbow 2s linear infinite, rank-shake-legendary 0.3s ease-in-out infinite;
    font-size: 24px;
    text-shadow: none;
    filter: drop-shadow(0 0 10px #ff00de) drop-shadow(0 0 20px #ffff00);
}

@keyframes rank-rainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes rank-shake-legendary {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-2px) rotate(-1deg); }
    75% { transform: translateX(2px) rotate(1deg); }
}

/* Footer */
.wanted-footer {
    text-align: center;
}

.wanted-dismiss {
    font-size: 14px;
    color: #888;
    letter-spacing: 2px;
    animation: dismiss-blink 1s ease-in-out infinite;
}

@keyframes dismiss-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Mobile adjustments for wanted poster */
@media (max-width: 500px) {
    .wanted-frame {
        padding: 20px;
        max-width: 95%;
    }

    .wanted-glitch {
        font-size: 36px;
        letter-spacing: 6px;
    }

    .wanted-villain-container {
        width: 150px;
        height: 150px;
    }

    .wanted-rank {
        font-size: 18px;
    }

    .wanted-rank.legendary {
        font-size: 20px;
    }
}

/* ============================================
   LEADERBOARD TABS
   ============================================ */

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    background: transparent;
    border: 2px solid #ff00de;
    color: #ff00de;
    padding: 10px 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    margin: 0;
}

.tab-btn:hover {
    background: rgba(255, 0, 222, 0.2);
    transform: none;
}

.tab-btn.active {
    background: #ff00de;
    color: yellow;
    box-shadow: 0 0 20px rgba(255, 0, 222, 0.5);
}

.tab-content {
    display: none;
    width: 100%;
    text-align: center;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================
   VILLAIN LIST
   ============================================ */

.villain-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 10px 0;
    max-height: 60vh;
    overflow-y: auto;
}

.villain-card {
    background: linear-gradient(135deg, #1a0030 0%, #2a0040 100%);
    border: 2px solid #ff00de;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.villain-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(255, 0, 222, 0.6);
    border-color: #00ffff;
}

.villain-card-preview {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    border: 1px solid #ff00de;
    flex-shrink: 0;
}

.villain-card-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.villain-card-name {
    font-size: 16px;
    font-weight: bold;
    color: #ff00de;
    text-shadow: 0 0 10px #ff00de;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.villain-card-creator {
    font-size: 11px;
    color: #00ffff;
    margin-bottom: 6px;
}

.villain-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.villain-card-kills {
    font-size: 14px;
    color: #ff4444;
    font-weight: bold;
}

.villain-card-rank {
    font-size: 10px;
    color: #ffff00;
    text-transform: uppercase;
    letter-spacing: 1px;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.villain-card-rank.rare { color: #44aaff; }
.villain-card-rank.epic { color: #aa44ff; }
.villain-card-rank.mythic { color: #ff8800; }
.villain-card-rank.legendary {
    background: linear-gradient(90deg, #ff00de, #ffff00, #00ffff);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rank-rainbow 2s linear infinite;
}

.villain-list-empty {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-size: 16px;
}

.villain-list-loading {
    text-align: center;
    color: #ff00de;
    padding: 40px 20px;
    font-size: 18px;
    animation: pulse-glow 1s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px #ff00de; }
    50% { opacity: 0.5; text-shadow: 0 0 20px #ff00de; }
}

#villainSearch {
    margin-bottom: 15px;
}

/* Search field focus/selected state */
#leaderboardSearch:focus,
#villainSearch:focus {
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* Back button selected in leaderboard */
#closeLeaderboardBtn.selected {
    background: yellow;
    color: #ff00de;
    box-shadow: 0 0 20px yellow;
}

/* Mobile adjustments for villain list */
@media (max-width: 500px) {
    .villain-list {
        grid-template-columns: 1fr;
    }

    .villain-card {
        padding: 12px;
    }

    .villain-card-preview {
        width: 50px;
        height: 50px;
    }

    .tab-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}
