/* ==========================================================================
   GAMEPORTAL — ULTRA-PREMIUM AAA GAMING STYLESHEET
   Dark Obsidian Aesthetic • Glassmorphism • Cyber Neon Accents
   Curated Typography • Micro-Animations • Flawless Bento Grid
   ========================================================================== */

:root {
    /* Premium Obsidian & Cosmic Color System */
    --bg-base: #07090e;
    --bg-surface: #0c101a;
    --bg-surface-elevated: #111726;
    --bg-surface-glass: rgba(14, 20, 34, 0.75);
    --bg-card-bottom: rgba(9, 13, 23, 0.95);
    
    /* Neon & Accent Gradients */
    --accent-cyan: #00f2fe;
    --accent-blue: #4facfe;
    --accent-purple: #8b5cf6;
    --accent-magenta: #ec4899;
    --accent-gold: #f59e0b;
    --accent-gold-light: #fbbf24;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    
    --grad-primary: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    --grad-fire: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --grad-purple: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --grad-gold: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --grad-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --grad-dark-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    
    /* Typography Colors */
    --text-pure: #ffffff;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-gold: #fbbf24;

    /* Border & Glass Tokens */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.22);
    --border-cyan-glow: rgba(0, 242, 254, 0.4);
    
    /* Border Radii */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
    
    /* Atmospheric Shadows */
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 14px 34px -10px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.06);
    --shadow-card-hover: 0 24px 50px -12px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 242, 254, 0.25);
    --shadow-glow-cyan: 0 0 25px rgba(0, 242, 254, 0.4);
    --shadow-glow-gold: 0 0 25px rgba(245, 158, 11, 0.35);

    /* Animation Timing */
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & FOUNDATION
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.8) 0px, transparent 100%),
        radial-gradient(at 100% 100%, rgba(245, 158, 11, 0.06) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* Atmospheric Ambient Lights (Subtle, sleek, non-distracting) */
.bg-pattern-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.18;
    border-radius: 50%;
    animation: pulseMesh 14s infinite alternate ease-in-out;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #00f2fe, #4facfe);
    top: -150px;
    left: -100px;
}

.shape-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #8b5cf6, #ec4899);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #059669, #10b981);
    top: 35%;
    right: 20%;
    animation-delay: -8s;
}

.shape-4, .shape-5 {
    display: none;
}

@keyframes pulseMesh {
    0% { transform: scale(1) translate(0, 0); opacity: 0.14; }
    50% { transform: scale(1.12) translate(30px, -20px); opacity: 0.22; }
    100% { transform: scale(0.95) translate(-20px, 30px); opacity: 0.16; }
}

/* Main Container */
.portal-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 24px 60px 24px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   HEADER / NAVIGATION BAR (Glassmorphism Luxury Bar)
   ========================================================================== */
.portal-header {
    background: rgba(13, 18, 30, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
    transition: var(--ease-smooth) all 0.3s;
}

/* Brand Logo */
.portal-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #07090e;
    font-size: 1.3rem;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
    transition: transform 0.3s var(--ease-spring);
}

.portal-logo:hover .logo-icon {
    transform: rotate(-8deg) scale(1.08);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.6);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-pure);
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
}

.logo-text .highlight {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 2px;
}

/* Search Bar */
.search-container {
    flex: 1;
    max-width: 520px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.2s;
}

#gameSearchInput {
    width: 100%;
    background: rgba(18, 25, 41, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-pill);
    padding: 12px 45px 12px 46px;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text-pure);
    outline: none;
    transition: all 0.25s var(--ease-smooth);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

#gameSearchInput::placeholder {
    color: #64748b;
    font-weight: 400;
}

#gameSearchInput:focus {
    border-color: var(--accent-cyan);
    background: rgba(22, 31, 52, 0.95);
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

#gameSearchInput:focus ~ .search-icon {
    color: var(--accent-cyan);
}

.clear-search-btn {
    position: absolute;
    right: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: all 0.2s;
}

.clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Header Quick Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.action-btn {
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 10px 18px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s var(--ease-smooth);
    text-decoration: none;
}

.random-btn {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.random-btn:hover {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.sound-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 10px 14px;
}

.sound-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateY(-2px);
}

.sound-toggle-btn.muted {
    color: #f43f5e;
}

.profile-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-pill);
    cursor: default;
}

.avatar-circle {
    width: 28px;
    height: 28px;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    position: relative;
}

.avatar-circle::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    right: -1px;
    bottom: -1px;
    border: 2px solid var(--bg-surface);
    box-shadow: 0 0 6px #10b981;
}

.player-tag {
    font-weight: 700;
    font-size: 0.82rem;
    color: #10b981;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   CATEGORIES PILL BAR (Modern Sleek Capsule Design)
   ========================================================================== */
.categories-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 20px 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-bar::-webkit-scrollbar {
    display: none;
}

.category-pill {
    background: rgba(18, 25, 41, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 9px 18px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.25s var(--ease-smooth);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-pill i {
    font-size: 0.95rem;
    color: var(--accent-cyan);
    transition: color 0.2s;
}

.category-pill:hover {
    background: rgba(28, 38, 62, 0.85);
    color: var(--text-pure);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.category-pill.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.18) 0%, rgba(79, 172, 254, 0.22) 100%);
    color: #ffffff;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.category-pill.active i {
    color: #ffffff;
}

.count-badge {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}

/* ==========================================================================
   GAMES BENTO GRID LAYOUT
   ========================================================================== */
.games-grid-wrapper {
    margin-top: 4px;
}

.grid-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 0 4px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-pure);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--accent-cyan);
    font-size: 1.15rem;
}

.games-counter {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 4px 14px;
    border-radius: var(--radius-pill);
}

/* Bento Grid System: Auto-flow with comfortable row heights */
.games-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 270px;
    gap: 22px;
}

/* ==========================================================================
   BASE GAME CARD (Luxury Glassmorphic Container)
   ========================================================================== */
.game-card {
    background: var(--bg-surface-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s var(--ease-spring);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.game-card:hover {
    transform: translateY(-8px) scale(1.015);
    border-color: rgba(0, 242, 254, 0.35);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 242, 254, 0.2);
    z-index: 3;
}

/* Shimmer beam sweep on card hover */
.game-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
    transform: rotate(25deg) translateY(-100%);
    pointer-events: none;
    transition: transform 0.8s ease;
}

.game-card:hover::after {
    transform: rotate(25deg) translateY(100%);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Badges */
.card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(7, 10, 18, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-pure);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.featured-badge {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(239, 68, 68, 0.9));
    border: none;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

.players-badge {
    left: auto;
    right: 14px;
    background: rgba(14, 20, 34, 0.8);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.25);
}

/* ==========================================================================
   FEATURED HERO CARDS (SPADES, LUDO, POKER: 2x2 Span)
   ========================================================================== */
.card-large {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 560px;
}

/* 1. SPADES HERO CARD */
.card-spades {
    background: radial-gradient(circle at top right, #042f2e 0%, #02201c 60%, #011412 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.card-spades:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(16, 185, 129, 0.3);
}

.visual-spades {
    height: 58%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(6, 78, 59, 0.6) 0%, rgba(2, 44, 34, 0.85) 100%);
}

.spade-bg {
    position: absolute;
    font-size: 22rem;
    color: rgba(0, 0, 0, 0.45);
    font-weight: 900;
    user-select: none;
    top: -50px;
    transform: rotate(-10deg);
}

.cards-fan {
    position: relative;
    width: 220px;
    height: 180px;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s var(--ease-spring);
}

.card-spades:hover .cards-fan {
    transform: scale(1.1) translateY(-6px);
}

.mini-card {
    position: absolute;
    width: 105px;
    height: 155px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 12px;
    font-weight: 900;
    font-size: 1.35rem;
    border: 2px solid #e2e8f0;
}

.card-ace {
    color: #0f172a;
    transform: rotate(12deg) translateX(38px);
    z-index: 3;
}

.card-king {
    color: #0f172a;
    transform: rotate(0deg);
    z-index: 2;
    background: #f8fafc;
}

.card-queen {
    color: #ef4444;
    transform: rotate(-12deg) translateX(-38px);
    z-index: 1;
}

.floating-chip {
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.95rem;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.4);
    border: 3px dashed rgba(255, 255, 255, 0.85);
    z-index: 4;
    animation: chipBounce 3.5s infinite ease-in-out alternate;
}

.chip-gold {
    background: radial-gradient(circle, #fbbf24 0%, #b45309 100%);
    top: 45px;
    right: 45px;
}

.chip-red {
    background: radial-gradient(circle, #f87171 0%, #b91c1c 100%);
    bottom: 30px;
    left: 45px;
    animation-delay: 1.7s;
}

@keyframes chipBounce {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-14px) rotate(16deg); }
}

/* 2. LUDO HERO CARD */
.card-ludo {
    background: radial-gradient(circle at top right, #1e1b4b 0%, #0f172a 70%, #090d16 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.card-ludo:hover {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(99, 102, 241, 0.3);
}

.visual-ludo {
    height: 58%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at center, #1e293b 0%, #0b0f19 100%);
}

.ludo-board-preview {
    width: 170px;
    height: 170px;
    background: #0f172a;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    padding: 6px;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.6);
    transform: rotate(45deg);
    transition: transform 0.4s var(--ease-spring);
}

.card-ludo:hover .ludo-board-preview {
    transform: rotate(50deg) scale(1.05);
}

.ludo-quarter {
    border-radius: 12px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
}

.q-red { background: linear-gradient(135deg, #ff4757, #b31221); }
.q-green { background: linear-gradient(135deg, #2ed573, #168a44); }
.q-yellow { background: linear-gradient(135deg, #ffa502, #c77b00); }
.q-blue { background: linear-gradient(135deg, #1e90ff, #0a58ca); }

.ludo-center-star {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 1.6rem;
    z-index: 2;
    filter: drop-shadow(0 0 8px #fbbf24);
}

.dice-3d {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6), inset 0 -3px 0 #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    right: 50px;
    bottom: 35px;
    animation: diceWiggle 4s infinite ease-in-out alternate;
}

.dot-center {
    width: 14px;
    height: 14px;
    background: #ef4444;
    border-radius: 50%;
}

@keyframes diceWiggle {
    0% { transform: rotate(0deg) translateY(0); }
    100% { transform: rotate(18deg) translateY(-10px); }
}

.pawn {
    position: absolute;
    width: 22px;
    height: 38px;
    border-radius: 11px 11px 4px 4px;
    z-index: 3;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
}

.pawn-red { background: #ff4757; left: 45px; top: 40px; }
.pawn-yellow { background: #ffa502; right: 45px; top: 40px; }
.pawn-green { background: #2ed573; left: 65px; bottom: 35px; }
.pawn-blue { background: #1e90ff; right: 65px; bottom: 35px; }

/* 3. POKER COIN MANAGER HERO CARD */
.card-poker {
    background: radial-gradient(circle at top right, #3b0764 0%, #1e1136 60%, #0c0817 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.card-poker:hover {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.35);
}

.visual-poker {
    height: 58%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at center, #2e1065 0%, #0c0817 100%);
}

.poker-felt-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, #581c87 0%, #1e0b38 100%);
    border: 4px dashed rgba(245, 158, 11, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s var(--ease-spring);
}

.card-poker:hover .poker-felt-circle {
    transform: scale(1.08) rotate(5deg);
}

.poker-center-crown {
    font-size: 3.5rem;
    color: #fbbf24;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.7));
}

.poker-chip-1 { background: radial-gradient(circle, #fbbf24, #b45309); top: 35px; right: 45px; }
.poker-chip-2 { background: radial-gradient(circle, #a855f7, #6b21a8); bottom: 35px; left: 45px; animation-delay: 1.2s; }
.poker-chip-3 { background: radial-gradient(circle, #38bdf8, #0369a1); bottom: 45px; right: 40px; animation-delay: 2.2s; }

/* Large Hero Card Bottom Content */
.card-content {
    height: 42%;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(10, 14, 24, 0.95);
    border-top: 1px solid var(--border-glass);
}

.game-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.game-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-rating {
    font-size: 0.85rem;
    font-weight: 800;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-name {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-pure);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.game-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.play-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    transition: all 0.25s var(--ease-smooth);
}

.play-btn-primary {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #07090e;
    box-shadow: 0 4px 18px rgba(0, 242, 254, 0.35);
}

.play-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.55);
    background: linear-gradient(135deg, #22f4ff 0%, #68baff 100%);
}

.fav-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
}

.fav-btn:hover {
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.4);
    color: #f43f5e;
    transform: scale(1.08);
}

.fav-btn.active {
    background: #f43f5e;
    border-color: #f43f5e;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
}

/* ==========================================================================
   CATEGORY WIDE BANNERS (2x1 Span)
   ========================================================================== */
.card-wide {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 120px;
}

.card-category-banner .card-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
}

.card-cat-cards {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.35) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.card-cat-board {
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.3) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.cat-banner-icon {
    width: 58px;
    height: 58px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.cat-banner-text {
    flex: 1;
    padding: 0 20px;
}

.cat-banner-text .sub {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--accent-cyan);
    text-transform: uppercase;
}

.cat-banner-text h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin: 2px 0;
}

.cat-banner-text p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.mini-arrow-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.25s var(--ease-smooth);
}

.card-category-banner:hover .mini-arrow-btn {
    transform: translateX(4px);
    background: var(--accent-cyan);
    color: #07090e;
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.4);
}

/* ==========================================================================
   STANDARD 1x1 BENTO CARDS (CRITICAL FIX FOR TEXT CLIPPING & REDESIGN)
   ========================================================================== */
.card-standard {
    grid-column: span 1;
    grid-row: span 1;
}

.card-standard .card-visual {
    height: 58%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.35s var(--ease-spring);
}

.card-standard:hover .card-visual > * {
    transform: scale(1.12);
}

.card-content-compact {
    height: 42%;
    padding: 12px 16px;
    background: var(--bg-card-bottom);
    border-top: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.game-title-compact {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-pure);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    margin-bottom: 2px;
}

.game-type-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.rating-pill {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    gap: 3px;
}

.quick-play-icon-btn {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    border: none;
    border-radius: 50%;
    color: #07090e;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 242, 254, 0.35);
    transition: all 0.25s var(--ease-smooth);
}

.quick-play-icon-btn:hover {
    transform: scale(1.18);
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.6);
}

/* ==========================================================================
   GAME CARD VISUAL THEMES (Rich Gradients & Stylized Components)
   ========================================================================== */

/* 5. Master Chess 3D */
.visual-chess {
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.chess-piece {
    font-size: 3.5rem;
    user-select: none;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s var(--ease-spring);
}

.chess-piece.king {
    color: #f8fafc;
    margin-right: -10px;
}

.chess-piece.knight {
    color: #64748b;
    margin-left: -10px;
    transform: rotate(5deg);
}

/* 6. Color Cards Match (Uno) */
/* Sports Arena cards */
.visual-sport {
    background: radial-gradient(circle at 50% 35%, var(--sport-2) 0%, var(--sport-1) 70%);
}
.visual-sport::after {
    content: ''; position: absolute; inset: auto 0 0 0; height: 30%;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 22px, transparent 22px 44px);
}
.sport-emblem {
    font-size: 3.4rem; line-height: 1; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.45));
    transition: transform 0.35s var(--ease-spring);
}

.visual-uno {
    background: radial-gradient(circle at center, #831843 0%, #1f0714 100%);
}

.uno-card {
    position: absolute;
    width: 60px;
    height: 90px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.4rem;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s;
}

.card-red-u { background: #ef4444; transform: rotate(-12deg) translateX(-18px); z-index: 1; }
.card-yellow-u { background: #f59e0b; transform: rotate(0deg); z-index: 2; }
.card-blue-u { background: #3b82f6; transform: rotate(14deg) translateX(18px); z-index: 3; }

/* 7. Tic Tac Toe Glow */
.visual-ttt {
    background: radial-gradient(circle at center, #0f172a 0%, #060911 100%);
    gap: 16px;
}

.neon-x, .neon-o {
    font-size: 2.8rem;
    font-weight: 900;
    user-select: none;
    transition: transform 0.3s;
}

.neon-x {
    color: #00f2fe;
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.8), 0 0 30px rgba(0, 242, 254, 0.4);
}

.neon-o {
    color: #ec4899;
    text-shadow: 0 0 15px rgba(236, 72, 153, 0.8), 0 0 30px rgba(236, 72, 153, 0.4);
}

/* 8. 2048 Blocks Rush */
.visual-2048 {
    background: radial-gradient(circle at center, #78350f 0%, #1c0a02 100%);
    gap: 8px;
}

.tile-2048 {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s;
}

.t-512 { background: #edc22e; }
.t-1024 { background: #edc53f; }
.t-2048 { background: #ecc400; box-shadow: 0 0 15px rgba(237, 197, 63, 0.7); }

/* 9. 8 Ball Billiards */
.visual-pool {
    background: radial-gradient(circle at center, #064e3b 0%, #022018 100%);
}

.pool-ball {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6), inset -3px -3px 6px rgba(0, 0, 0, 0.5), inset 3px 3px 6px rgba(255, 255, 255, 0.6);
}

.ball-8 { background: #0f172a; color: #ffffff; margin-right: 6px; }
.ball-9 { background: #fbbf24; color: #0f172a; margin-left: 6px; }

/* 10. Klondike Solitaire */
.visual-solitaire {
    background: radial-gradient(circle at center, #14532d 0%, #052e16 100%);
}

.sol-card {
    position: absolute;
    width: 55px;
    height: 80px;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #cbd5e1;
    transition: transform 0.3s;
}

.sol-k { color: #0f172a; transform: rotate(-12deg) translateX(-20px); z-index: 1; }
.sol-q { color: #ef4444; transform: rotate(0deg); z-index: 2; }
.sol-j { color: #0f172a; transform: rotate(14deg) translateX(20px); z-index: 3; }

/* 11. Snake Arena */
.visual-snake {
    background: radial-gradient(circle at center, #065f46 0%, #022c22 100%);
    gap: 6px;
}

.snake-body {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.s-head { background: #10b981; font-size: 1.1rem; }
.s-1 { background: #34d399; }
.s-2 { background: #6ee7b7; }
.snake-fruit { font-size: 1.4rem; margin-left: 10px; animation: bounce 1.5s infinite alternate; }

@keyframes bounce {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* 12. Connect 4 (Four In A Row) */
.visual-connect4 {
    background: radial-gradient(circle at center, #1e3a8a 0%, #08153b 100%);
    gap: 8px;
}

.grid-slot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.grid-slot.red { background: #ef4444; }
.grid-slot.yellow { background: #f59e0b; }

/* 13. Pencil Party (Draw & Guess) */
.visual-pencil {
    background: radial-gradient(circle at center, #581c87 0%, #1e0938 100%);
    gap: 12px;
}

.pencil-avatar {
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.45), 0 0 15px rgba(236, 72, 153, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transform: rotate(-8deg);
    transition: transform 0.35s var(--ease-spring);
}

.card-standard:hover .pencil-avatar {
    transform: rotate(0deg) scale(1.15);
}

/* ==========================================================================
   NO RESULTS / SEARCH EMPTY STATE
   ========================================================================== */
.no-results-box {
    text-align: center;
    padding: 60px 20px;
    background: rgba(14, 20, 34, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    margin-top: 20px;
}

.no-results-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.no-results-box h3 {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 6px;
}

.no-results-box p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 20px;
}

.reset-search-btn {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #07090e;
    font-weight: 700;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: transform 0.2s;
}

.reset-search-btn:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   QUICK LAUNCH GAME MODAL (Console Launch Window)
   ========================================================================== */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.game-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 7, 13, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.modal-dialog {
    position: relative;
    width: 90%;
    max-width: 520px;
    background: #0f1523;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 242, 254, 0.2);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s var(--ease-spring);
    z-index: 2;
}

.game-modal.active .modal-dialog {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(18, 25, 41, 0.6);
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.5));
}

.modal-title-wrap h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.modal-subtitle {
    font-size: 0.78rem;
    color: var(--accent-cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.close-modal-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: rgba(244, 63, 94, 0.2);
    color: #f43f5e;
}

.modal-body {
    padding: 28px 24px;
}

.modal-preview-zone {
    text-align: center;
}

.modal-actions-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.modal-link-btn {
    display: block;
    padding: 12px;
    text-align: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: color 0.2s;
}

.modal-link-btn:hover {
    color: #ffffff;
}

/* ==========================================================================
   PORTAL FOOTER
   ========================================================================== */
.portal-footer {
    margin-top: 60px;
    padding: 30px 20px 20px 20px;
    border-top: 1px solid var(--border-glass);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    background: rgba(18, 25, 41, 0.6);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.25s var(--ease-smooth);
}

.footer-pill-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.spades-pill:hover { border-color: #10b981; color: #10b981; box-shadow: 0 0 15px rgba(16, 185, 129, 0.2); }
.ludo-pill:hover { border-color: #f59e0b; color: #f59e0b; box-shadow: 0 0 15px rgba(245, 158, 11, 0.2); }
.poker-pill:hover { border-color: #a855f7; color: #a855f7; box-shadow: 0 0 15px rgba(168, 85, 247, 0.2); }

.copyright-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Flawless on Mobile, Tablet & Desktop)
   ========================================================================== */
@media (max-width: 1200px) {
    .games-bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .portal-header {
        flex-wrap: wrap;
        padding: 16px 20px;
    }
    .search-container {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
    .games-bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 250px;
        gap: 16px;
    }
    .card-large {
        grid-column: span 2;
        grid-row: span 2;
        min-height: 480px;
    }
}

@media (max-width: 640px) {
    .portal-container {
        padding: 12px 14px 40px 14px;
    }
    .portal-header {
        border-radius: var(--radius-md);
        padding: 14px;
        gap: 14px;
    }
    .games-bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .card-large {
        grid-column: span 1;
        grid-row: auto;
        min-height: auto;
    }
    .card-large .card-visual {
        height: 240px;
    }
    .card-wide {
        grid-column: span 1;
    }
    .card-standard {
        grid-column: span 1;
        height: 250px;
    }
    .card-standard .card-visual {
        height: 58%;
    }
    .card-content-compact {
        height: 42%;
    }
}
