/**
 * Landing Page Styles
 * @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
 */

/* ============================================================================
   LANDING PAGE LAYOUT
   ============================================================================ */

.landing-page {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem 1rem 2rem;
    overflow-y: auto;
    z-index: 100;
    gap: 0;
}
.landing-page > * {
    flex-shrink: 0;
}

.landing-page.hidden {
    display: none;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.landing-hero {
    text-align: center;
    margin-bottom: 0.5rem;
    padding-top: 2rem;
}

.landing-title {
    font-size: 4rem;
    font-weight: 900;
    margin: 0 0 0.5rem 0;
    letter-spacing: -2px;
}

.title-glow {
    background: linear-gradient(135deg, #00ff88 0%, #00ffcc 50%, #00ff88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.landing-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 0.5rem 0;
    font-weight: 300;
}

.landing-tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 1rem 0;
    font-style: italic;
}

/* ============================================================================
   ACTIONS
   ============================================================================ */

.landing-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0;
}

.btn-xl {
    padding: 1rem 3rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.btn-glow {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4), 0 0 40px rgba(0, 255, 136, 0.2);
    animation: btnGlow 2s ease-in-out infinite;
}

@keyframes btnGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.4), 0 0 40px rgba(0, 255, 136, 0.2); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 136, 0.6), 0 0 60px rgba(0, 255, 136, 0.3); }
}

/* Secondary Actions */
.landing-secondary-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.landing-link {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
}
.landing-link:hover { color: #00ff88; }
.landing-link-divider { color: rgba(255,255,255,0.3); }

/* How it works */
.landing-howto {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 0.75rem auto;
    max-width: 700px;
}
.howto-step {
    display: flex;
    align-items: center;
    gap: 10px;
}
.howto-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.4);
    color: #00ff88;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.howto-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* Utility classes (replacing inline styles) */
.card-header-flush { padding-top: 0; }
.landing-content-flush { /* no longer needed — spacing via .landing-content margin */ }
.text-padded { padding: 1rem; }
.landing-card-full { grid-column: 1 / -1; }
.landing-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* ============================================================================
   MINI STATS BAR
   ============================================================================ */

.landing-stats-mini {
    display: flex;
    gap: 1rem;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.stat-item span:first-child {
    color: #00ff88;
    font-weight: 600;
}

.stat-divider {
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================================================
   SOCIAL PROOF COUNTER
   ============================================================================ */

.social-proof {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem auto 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
}

.proof-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.proof-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: #00ff88;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.proof-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================================
   FEATURE HIGHLIGHTS
   ============================================================================ */

.landing-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    margin: 0.5rem auto 0;
    max-width: 700px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

.feature-icon {
    font-size: 1rem;
    line-height: 1;
}

/* ============================================================================
   CONTENT GRID
   ============================================================================ */

.landing-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
    width: 100%;
    max-width: 900px;
    align-items: stretch;
    margin-top: 0.5rem;
}
.landing-content + .landing-content {
    margin-top: 0.625rem;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.landing-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.landing-card:hover {
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow:
        0 0 20px rgba(0, 255, 136, 0.1),
        0 0 40px rgba(0, 255, 136, 0.04),
        0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 255, 136, 0.06);
    border-bottom: 1px solid rgba(0, 255, 136, 0.25);
}

.card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #00ff88;
}

/* ============================================================================
   TAB BUTTONS
   ============================================================================ */

.tab-buttons {
    display: flex;
    gap: 0.25rem;
}

.tab-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tab-btn.active {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    color: #00ff88;
}

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

.leaderboard-content {
    padding: 0.5rem;
    min-height: 0;
}

.leaderboard-empty,
.games-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    transition: background 0.2s;
}

.leaderboard-row:hover {
    background: rgba(0, 255, 136, 0.06);
    box-shadow: inset 3px 0 0 rgba(0, 255, 136, 0.4);
}

.leaderboard-row.top-3 {
    background: rgba(0, 255, 136, 0.1);
}

.lb-rank {
    width: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}

.leaderboard-row.top-3 .lb-rank {
    color: #00ff88;
}

.lb-rank.gold { color: #ffd700; }
.lb-rank.silver { color: #c0c0c0; }
.lb-rank.bronze { color: #cd7f32; }

.lb-name {
    flex: 1;
    font-weight: 500;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.lb-wins {
    color: #00ff88;
}

.lb-winrate {
    color: #00ccff;
}

.lb-elo {
    color: #ffcc00;
    font-weight: 600;
}

/* ============================================================================
   ACTIVE GAMES
   ============================================================================ */

.active-games-content {
    padding: 0.5rem;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.game-row {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-row:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.08);
    transform: translateX(2px);
}

.game-info {
    flex: 1;
}

.game-name {
    font-weight: 500;
    color: white;
    margin-bottom: 0.25rem;
}

.game-host {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.game-meta {
    text-align: right;
}

.game-players {
    font-size: 0.9rem;
    color: #00ff88;
    margin-bottom: 0.25rem;
}

.game-state {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
}

.game-state.waiting {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.game-state.playing {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
}

/* ============================================================================
   HOW TO PLAY MODAL
   ============================================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 255, 136, 0.1);
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.modal-header h2 {
    margin: 0;
    color: #00ff88;
}

.modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.rules-section {
    margin-bottom: 1.5rem;
}

.rules-section:last-child {
    margin-bottom: 0;
}

.rules-section h3 {
    color: #00ff88;
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
}

.rules-section p,
.rules-section li {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}

.rules-section ul {
    margin: 0;
    padding-left: 1.5rem;
}

.pill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.pill-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.85rem;
}

.pill-icon {
    font-size: 1.2rem;
}

.pill-name {
    color: white;
    font-weight: 500;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .landing-page {
        padding: 0.75rem;
        padding-top: 44px; /* Space for auth-header */
        gap: 0;
    }

    .landing-hero {
        padding-top: 0.5rem;
    }

    .landing-title {
        font-size: 2rem;
    }

    .landing-subtitle {
        font-size: 0.95rem;
    }

    .landing-tagline {
        font-size: 0.8rem;
    }

    .btn-xl {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }

    .landing-howto {
        flex-direction: column;
        gap: 8px;
        padding: 0 12px;
    }

    .social-proof {
        gap: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    .proof-number {
        font-size: 1.2rem;
    }

    .landing-features {
        gap: 0.4rem 0.75rem;
    }

    .landing-content {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .card-header {
        flex-direction: column;
        gap: 0.4rem;
        align-items: flex-start;
        padding: 0.5rem 0.75rem;
    }

    /* Cards: scrollable content on mobile */
    .landing-card {
        max-height: 60dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .landing-stats-mini {
        font-size: 0.8rem;
    }

    .landing-actions {
        gap: 0.5rem;
    }

    .landing-secondary-actions {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .landing-page {
        padding: 0.5rem;
        padding-top: 40px;
    }

    .landing-hero {
        padding-top: 0.25rem;
    }

    .landing-title {
        font-size: 1.6rem;
    }

    .landing-subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }

    .landing-tagline {
        font-size: 0.75rem;
    }

    .social-proof {
        gap: 0.5rem;
        padding: 0.4rem 0.5rem;
    }

    .proof-number {
        font-size: 1rem;
    }

    .proof-label {
        font-size: 0.6rem;
    }

    .landing-features {
        flex-direction: column;
        gap: 0.3rem;
        align-items: center;
    }

    .feature-item {
        font-size: 0.8rem;
    }

    .landing-actions {
        flex-direction: column;
        gap: 0.4rem;
    }

    .landing-actions .btn {
        width: 100%;
    }

    .landing-card {
        max-height: 55dvh;
    }

    .card-header h3 {
        font-size: 0.9rem;
    }
}

/* ============================================================================
   EXTENDED LEADERBOARD SECTION
   ============================================================================ */

.leaderboard-section {
    width: 100%;
    max-width: 1200px;
    margin-top: 3rem;
    padding-bottom: 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #00ff88;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.title-icon {
    font-size: 2.5rem;
    display: inline-flex;
    align-items: center;
}

.title-icon svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

/* ============================================================================
   LEADERBOARD GROUPS
   ============================================================================ */

.leaderboard-group {
    margin-bottom: 2rem;
}

.group-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.5rem;
}

.map-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.map-badge.mini {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000;
}

.map-badge.small {
    background: linear-gradient(135deg, #00ccff 0%, #0099cc 100%);
    color: #000;
}

.map-badge.medium {
    background: linear-gradient(135deg, #ff9900 0%, #cc7a00 100%);
    color: #000;
}

.map-badge.large {
    background: linear-gradient(135deg, #ff3366 0%, #cc2952 100%);
    color: #fff;
}

/* ============================================================================
   LEADERBOARD CARDS GRID
   ============================================================================ */

.leaderboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.global-stats .leaderboard-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ============================================================================
   LEADERBOARD CARD
   ============================================================================ */

.lb-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);

    /* Scroll Animation - Initial State */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
}

.lb-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation */
.leaderboard-cards .lb-card:nth-child(1) { transition-delay: 0.1s; }
.leaderboard-cards .lb-card:nth-child(2) { transition-delay: 0.2s; }
.leaderboard-cards .lb-card:nth-child(3) { transition-delay: 0.3s; }
.leaderboard-cards .lb-card:nth-child(4) { transition-delay: 0.4s; }

/* Hover Effects */
.lb-card:hover {
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2), 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

.lb-card.visible:hover {
    transform: translateY(-5px);
}

/* ============================================================================
   CARD HEADER
   ============================================================================ */

.lb-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 255, 136, 0.08);
    border-bottom: 1px solid rgba(0, 255, 136, 0.15);
}

.lb-card-icon {
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
}

.lb-card-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.lb-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #00ff88;
}

/* ============================================================================
   CARD CONTENT
   ============================================================================ */

.lb-card-content {
    padding: 0.5rem;
    min-height: 150px;
}

.lb-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.lb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem;
}

.lb-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* ============================================================================
   LEADERBOARD ENTRY
   ============================================================================ */

.lb-entry {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    transition: background 0.2s ease;
}

.lb-entry:hover {
    background: rgba(255, 255, 255, 0.05);
}

.lb-entry.top-1 {
    background: rgba(255, 215, 0, 0.15);
}

.lb-entry.top-2 {
    background: rgba(192, 192, 192, 0.1);
}

.lb-entry.top-3 {
    background: rgba(205, 127, 50, 0.1);
}

.lb-entry-rank {
    width: 1.75rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.lb-entry.top-1 .lb-entry-rank { color: #ffd700; }
.lb-entry.top-2 .lb-entry-rank { color: #c0c0c0; }
.lb-entry.top-3 .lb-entry-rank { color: #cd7f32; }

.lb-entry-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 0.5rem;
}

.lb-entry-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #00ff88;
    min-width: 50px;
    text-align: right;
}

.lb-entry-games {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 0.5rem;
    min-width: 40px;
    text-align: right;
}

/* ============================================================================
   RESPONSIVE - EXTENDED LEADERBOARD
   ============================================================================ */

@media (max-width: 1024px) {
    .leaderboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .leaderboard-section {
        margin-top: 2rem;
        padding: 0 0.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .title-icon {
        font-size: 2rem;
    }

    .title-icon svg {
        width: 26px;
        height: 26px;
    }

    .leaderboard-cards {
        grid-template-columns: 1fr;
    }

    .global-stats .leaderboard-cards {
        grid-template-columns: 1fr;
    }

    .group-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .lb-card-header {
        padding: 0.5rem 0.75rem;
    }

    .lb-card-title {
        font-size: 0.8rem;
    }

    .lb-entry {
        padding: 0.4rem 0.5rem;
    }

    .lb-entry-name {
        font-size: 0.8rem;
    }

    .lb-entry-value {
        font-size: 0.8rem;
    }
}

/* ============================================================================
   HIGHLIGHT CARD (Game of the Day)
   ============================================================================ */

.highlight-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    max-width: 900px;
    margin: 0.5rem 0;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--neon-cyan, #00ffff);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.15), inset 0 0 15px rgba(0, 255, 255, 0.05);
    animation: highlightGlow 3s ease-in-out infinite;
}

.highlight-card.hidden {
    display: none;
}

@keyframes highlightGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 255, 255, 0.15), inset 0 0 15px rgba(0, 255, 255, 0.05); }
    50% { box-shadow: 0 0 25px rgba(0, 255, 255, 0.3), inset 0 0 20px rgba(0, 255, 255, 0.08); }
}

.highlight-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--neon-cyan, #00ffff);
    white-space: nowrap;
}

.highlight-player {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}

.highlight-stat {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--neon-green, #00ff88);
    white-space: nowrap;
}

.highlight-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    margin-left: auto;
}

/* ============================================================================
   RECENT GAMES
   ============================================================================ */

.recent-games-content {
    padding: 0.5rem;
    min-height: 100px;
}

.recent-game-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    transition: background 0.2s;
}

.recent-game-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.recent-game-winner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.recent-game-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.recent-game-name {
    font-weight: 600;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-game-details {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.recent-game-map {
    color: var(--neon-purple, #aa00ff);
}

.recent-game-points {
    color: var(--neon-green, #00ff88);
}

.recent-game-chain {
    color: var(--neon-cyan, #00ffff);
}

.recent-game-time {
    color: rgba(255, 255, 255, 0.35);
    min-width: 70px;
    text-align: right;
}

/* Responsive */
@media (max-width: 640px) {
    .highlight-card {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .highlight-meta {
        margin-left: 0;
        width: 100%;
    }

    .recent-game-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .recent-game-details {
        gap: 0.5rem;
        flex-wrap: wrap;
        font-size: 0.75rem;
    }
}

/* =========================================================================
   CAMPAIGN LEVELS
   ========================================================================= */

.campaign-levels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.campaign-level {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s, background 0.2s;
}

.campaign-level:hover:not(.locked) {
    border-color: var(--neon-cyan, #00ffff);
    background: rgba(0, 255, 255, 0.03);
}

.campaign-level.completed {
    border-color: rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.03);
}

.campaign-level.locked {
    opacity: 0.4;
    pointer-events: none;
}

.campaign-level-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.campaign-level-num {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--neon-cyan, #00ffff);
    min-width: 2rem;
}

.campaign-level-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.campaign-check {
    margin-left: auto;
    font-size: 1.1rem;
}

.campaign-level-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.campaign-level-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.campaign-star {
    opacity: 0.2;
    font-size: 0.7rem;
}

.campaign-star.active {
    opacity: 1;
}

.campaign-locked-overlay {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    font-weight: 600;
}

.campaign-start-btn {
    width: 100%;
}

/* =========================================================================
   FRIENDS PANEL
   ========================================================================= */

.friend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.friend-row:last-child {
    border-bottom: none;
}

.friend-name {
    font-weight: 500;
}

.friend-online {
    color: #00ff88;
    font-size: 0.75rem;
}

.friend-offline {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

.friend-pending {
    color: #ffaa00;
    font-size: 0.75rem;
}

/* =========================================================================
   CHALLENGE LIST
   ========================================================================= */

.challenge-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
}

/* =========================================================================
   BTN ACCENT (Ranked)
   ========================================================================= */

.btn-accent {
    background: linear-gradient(135deg, var(--neon-pink, #ff00ff), var(--neon-cyan, #00ffff));
    color: #000;
    font-weight: 700;
    border: none;
}

.btn-accent:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* =========================================================================
   PANEL BOTTOM RIGHT (Friends)
   ========================================================================= */

.panel-bottom-right {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 100;
    background: var(--panel-bg, rgba(0, 0, 0, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

/* =========================================================================
   REPLAY LINK
   ========================================================================= */

.recent-game-replay {
    color: var(--neon-cyan, #00ffff);
    font-size: 0.75rem;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    cursor: pointer;
}

.recent-game-replay:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ============================================================================
   QUEST / CHALLENGE ROWS
   ============================================================================ */

.quest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.quest-row:last-child {
    border-bottom: none;
}

.quest-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.quest-desc {
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
}

.quest-progress-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

.quest-target {
    color: #00ff88;
    font-weight: bold;
    font-size: 0.9rem;
    margin-left: 12px;
    flex-shrink: 0;
}

/* Campaign promo card */
.campaign-promo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: linear-gradient(135deg, rgba(0,255,136,0.04) 0%, rgba(170,0,255,0.06) 100%);
    flex: 1;
}

.campaign-level-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ============================================================================
   REDUCED MOTION
   @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    .landing-card:hover,
    .game-row:hover {
        transform: none;
    }
}

/* MOBILE PORTRAIT LANDING FIXES */
@media (max-width: 390px) {
    .landing-hero { padding-top: 0; margin-bottom: 0.25rem; }
    .landing-title { font-size: 1.5rem; margin-bottom: 0.2rem; }
    .landing-subtitle { font-size: 0.8rem; }
    .landing-tagline { display: none; }
    .social-proof { padding: 0.3rem 0.5rem; gap: 0.4rem; margin: 0.3rem auto; }
    .proof-number { font-size: 0.9rem; }
    .proof-label { font-size: 0.55rem; }
    .landing-features { display: none; }
    .landing-card { max-height: 45dvh; }
}
/* Replay-Watch Button */
.btn-replay-watch {
    background: none;
    border: 1px solid rgba(255, 140, 50, 0.3);
    color: var(--color-primary, #ff8c32);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-replay-watch:hover {
    background: rgba(255, 140, 50, 0.15);
    border-color: rgba(255, 140, 50, 0.6);
}

@media (max-width: 600px) {
    .landing-content { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* =========================================================================
 * MAP EDITOR MODAL
 * ========================================================================= */
.map-editor-modal-content {
    max-width: 900px;
    width: 95%;
}

.map-editor-body {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1rem;
    padding: 1rem;
}

.map-editor-canvas-wrap {
    background: #0a0a14;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

#map-editor-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.map-editor-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.map-editor-hint {
    font-size: 0.85rem;
    color: var(--text-muted, #aaa);
    margin: 0;
    line-height: 1.4;
}

.map-editor-stats {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    font-size: 0.9rem;
}

.map-editor-warning {
    display: block;
    margin-top: 0.5rem;
    color: var(--warning, #f5a623);
    font-size: 0.8rem;
}

.map-editor-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map-editor-buttons .btn {
    width: 100%;
}

.map-editor-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.map-editor-actions .btn {
    flex: 1;
}

@media (max-width: 700px) {
    .map-editor-body {
        grid-template-columns: 1fr;
    }
    .map-editor-canvas-wrap {
        max-height: 50vh;
    }
}

/* Saved Maps in Map Editor */
.map-editor-saved-maps {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
}

.map-editor-saved-title {
    font-size: 0.8rem;
    color: var(--text-muted, #aaa);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.map-editor-saved-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 140px;
    overflow-y: auto;
}

.map-editor-saved-empty {
    font-size: 0.75rem;
    color: var(--text-muted, #777);
    padding: 0.5rem;
    text-align: center;
    font-style: italic;
}

.map-editor-saved-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    font-size: 0.8rem;
    transition: background 0.15s;
}

.map-editor-saved-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.map-editor-saved-name {
    flex: 1;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-editor-saved-meta {
    font-size: 0.7rem;
    color: var(--text-muted, #888);
}

.map-editor-saved-delete {
    background: none;
    border: none;
    color: var(--text-muted, #888);
    cursor: pointer;
    padding: 0 0.3rem;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.15s;
}

.map-editor-saved-delete:hover {
    color: var(--error, #e74c3c);
}
