/* ═══════════════════════════════════════════════════════════════
   KIOSK PLAYGROUND - ENHANCED STYLES (React-Inspired)
   ═══════════════════════════════════════════════════════════════ */

/* === BASE ANIMATIONS === */
.animate-in { animation: animateIn 0.5s ease-out forwards; }
.fade-in { animation: fadeIn 0.5s ease-out; }
.slide-up { animation: slideUp 0.5s ease-out; }
.zoom-in { animation: zoomIn 0.3s ease-out; }
@keyframes animateIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* === ATTRACT SCREEN ORB === */
.attract-orb {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(6, 182, 212, 0.4), rgba(139, 92, 246, 0.2), transparent 70%);
    filter: blur(60px);
    animation: orbPulse 4s ease-in-out infinite;
}
@keyframes orbPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* === FLOATING STATS RING === */
.stats-ring {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    border: 1px solid rgba(6, 182, 212, 0.1);
    animation: spin 60s linear infinite;
}
.stats-ring::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #06b6d4;
    border-radius: 50%;
    box-shadow: 0 0 10px #06b6d4;
}

/* === FEATURE CARDS (React-Style) === */
.feature-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(51, 65, 85, 0.5);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 200px;
}
.feature-card:hover, .feature-card:active {
    border-color: rgba(59, 130, 246, 0.5);
    transform: scale(0.98);
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(59, 130, 246, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.feature-card:hover::before { opacity: 1; }
.feature-card.blue { border-color: rgba(59, 130, 246, 0.3); }
.feature-card.blue:hover { border-color: rgba(59, 130, 246, 0.6); }
.feature-card.purple { border-color: rgba(139, 92, 246, 0.3); }
.feature-card.purple:hover { border-color: rgba(139, 92, 246, 0.6); }
.feature-card.amber { border-color: rgba(245, 158, 11, 0.3); }
.feature-card.amber:hover { border-color: rgba(245, 158, 11, 0.6); }
.feature-card.emerald { border-color: rgba(16, 185, 129, 0.3); }
.feature-card.emerald:hover { border-color: rgba(16, 185, 129, 0.6); }

/* Feature Card Icon Container */
.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.5);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Arrow Button on Cards */
.feature-arrow {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(51, 65, 85, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.feature-card:hover .feature-arrow { background: rgba(71, 85, 105, 0.8); }

/* Hub Tile Glow - Legacy Support */
.hub-tile {
    position: relative;
    overflow: hidden;
}
.hub-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(6, 182, 212, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.hub-tile:hover::before, .hub-tile:active::before {
    opacity: 1;
}

/* === HORIZONTAL SCROLL FILTERS === */
.filter-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-btn {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 700;
    transition: all 0.2s ease;
    scroll-snap-align: start;
    border: 2px solid rgba(51, 65, 85, 0.8);
    background: rgba(15, 23, 42, 0.9);
    color: #94a3b8;
}
.filter-btn:active { transform: scale(0.95); }
.filter-btn.active {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* === ENTITY GRID CARDS (React-Style) === */
.entity-grid-card {
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(51, 65, 85, 0.8);
    border-radius: 2rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.entity-grid-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: scale(0.98);
}
.entity-grid-card:active { transform: scale(0.96); }
.entity-grid-card .flag-badge {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.entity-grid-card:hover .flag-badge { opacity: 1; }
.entity-grid-card img {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(51, 65, 85, 0.8);
    transition: border-color 0.3s ease;
}
.entity-grid-card:hover img { border-color: rgba(59, 130, 246, 0.5); }

/* === DETAIL VIEW STYLES === */
.detail-header {
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(51, 65, 85, 0.8);
    border-radius: 3rem;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}
.detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 24rem;
    height: 24rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    filter: blur(60px);
    margin-right: -5rem;
    margin-top: -5rem;
    pointer-events: none;
}

/* Narrative Card */
.narrative-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9));
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 3rem;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}
.narrative-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
}

/* Stats Cards */
.stat-card {
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(51, 65, 85, 0.8);
    border-radius: 2.5rem;
    padding: 2.5rem;
    text-align: center;
    transition: border-color 0.3s ease;
}
.stat-card:hover { border-color: rgba(59, 130, 246, 0.5); }
.stat-card .stat-value {
    font-size: 4.5rem;
    font-weight: 900;
}
.stat-card .stat-label {
    font-size: 1.25rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-top: 1rem;
}

/* === COMPARE VIEW (React-Style) === */
.compare-selector {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem;
    scroll-snap-type: x mandatory;
}
.compare-selector::-webkit-scrollbar { display: none; }
.compare-item {
    flex-shrink: 0;
    width: 18rem;
    padding: 1.5rem;
    border-radius: 2.5rem;
    border: 3px solid rgba(51, 65, 85, 0.8);
    background: rgba(15, 23, 42, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    scroll-snap-align: start;
    opacity: 0.7;
}
.compare-item:active { transform: scale(0.95); }
.compare-item.selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    opacity: 1;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

.compare-card {
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(51, 65, 85, 0.8);
    border-radius: 3rem;
    padding: 2.5rem;
    text-align: center;
}
.compare-card img {
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(15, 23, 42, 0.9);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
}

/* === EXPLORER VIEW === */
.metric-toggle {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(51, 65, 85, 0.8);
    border-radius: 2.5rem;
}
.metric-btn {
    flex: 1;
    padding: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 2rem;
    background: rgba(15, 23, 42, 0.5);
    color: #94a3b8;
    transition: all 0.2s ease;
}
.metric-btn:active { transform: scale(0.95); }
.metric-btn.active {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
}

/* === AI ASSISTANT CARD === */
.ai-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9));
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 3rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ai-card:active { transform: scale(0.99); }
.ai-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 16rem;
    height: 16rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    filter: blur(40px);
    margin-right: -2rem;
    margin-top: -2rem;
    transition: background 0.3s ease;
}
.ai-card:hover::before { background: rgba(59, 130, 246, 0.2); }

.ai-search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
}

/* === AI CHAT POPUP === */
.ai-chat-overlay {
    position: fixed;
    inset: 0;
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.ai-chat-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.ai-chat-panel {
    width: 95%;
    max-width: 700px;
    max-height: 85vh;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}
.ai-chat-overlay.active .ai-chat-panel {
    transform: scale(1) translateY(0);
}
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}
.ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}
.ai-chat-body::-webkit-scrollbar { width: 4px; }
.ai-chat-body::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.2); border-radius: 2px; }
.ai-welcome-msg {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.ai-welcome-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ai-welcome-bubble {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.6;
}
.ai-suggestions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.ai-suggestion-btn {
    padding: 1rem 1.25rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 1rem;
    color: #94a3b8;
    font-size: 0.9375rem;
    text-align: start;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
}
.ai-suggestion-btn:hover {
    background: rgba(51, 65, 85, 0.6);
    border-color: rgba(59, 130, 246, 0.3);
    color: #e2e8f0;
}
.ai-chat-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}
.ai-chat-input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 9999px;
    padding: 0.5rem 0.5rem 0.5rem 1.25rem;
}
.ai-chat-input-row input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
}
.ai-chat-input-row input::placeholder { color: #64748b; }
.ai-chat-send-btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}
.ai-chat-send-btn:hover { background: #2563eb; }
.ai-chat-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.ai-chat-message.user {
    flex-direction: row-reverse;
}
.ai-chat-message .msg-bubble {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
    padding: 0.875rem 1.25rem;
    color: #cbd5e1;
    font-size: 0.9375rem;
    line-height: 1.5;
    max-width: 80%;
}
.ai-chat-message.user .msg-bubble {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}
.ai-typing {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0;
}
.ai-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #64748b;
    animation: typingDot 1.4s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

/* === MAP STYLES === */
#globe-container {
    position: absolute;
    top: 5rem;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}
#map {
    width: 100%;
    height: 100%;
    background: #0f172a;
}
.leaflet-container { background: #0f172a !important; }
.leaflet-tile-pane {
    filter: saturate(0.8) brightness(0.9);
}
.leaflet-control-zoom {
    border: none !important;
}
.leaflet-control-zoom a {
    background: rgba(15, 23, 42, 0.9) !important;
    color: #06b6d4 !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
}
.leaflet-control-zoom a:hover {
    background: rgba(6, 182, 212, 0.2) !important;
}

/* Country Marker */
.country-marker {
    position: relative;
    cursor: pointer;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.marker-core {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.8), rgba(139, 92, 246, 0.8));
    border: 3px solid rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.marker-core:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 35px rgba(6, 182, 212, 0.8);
}
.marker-core.active {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.9), rgba(245, 158, 11, 0.9));
    box-shadow: 0 0 35px rgba(251, 191, 36, 0.8);
}
.marker-flag {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.marker-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #030712;
    z-index: 2;
}
.marker-pulse {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.3);
    animation: markerPulse 2s ease-out infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* === INFO PANEL === */
.info-panel {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 420px;
    max-height: 85vh;
    border-radius: 2rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid rgba(51, 65, 85, 0.5);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.info-panel.left { left: 2rem; }
.info-panel.right { right: 2rem; }
[dir="rtl"] .info-panel.left { left: auto; right: 2rem; }
[dir="rtl"] .info-panel.right { right: auto; left: 2rem; }
.info-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-30px);
}
.info-panel.right.hidden {
    transform: translateY(-50%) translateX(30px);
}

/* Entity Card (in panels) */
.entity-card {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1.25rem;
    border: 1px solid rgba(6, 182, 212, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
}
.entity-card:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateX(4px);
}
[dir="rtl"] .entity-card:hover {
    transform: translateX(-4px);
}

/* Leaderboard Row */
.lb-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}
.lb-row:hover {
    background: rgba(6, 182, 212, 0.1);
    transform: scale(1.02);
    border-color: rgba(6, 182, 212, 0.2);
}
.lb-rank {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.125rem;
}
.lb-rank.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1e1b4b; }
.lb-rank.silver { background: linear-gradient(135deg, #94a3b8, #64748b); color: #1e1b4b; }
.lb-rank.bronze { background: linear-gradient(135deg, #d97706, #b45309); color: white; }
.lb-rank.other { background: rgba(255, 255, 255, 0.1); color: #94a3b8; }

/* QR Modal */
.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.qr-modal.active {
    opacity: 1;
    pointer-events: auto;
}

/* Navigation Dots */
.nav-dots {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 100;
}
.nav-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}
.nav-dot.active {
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    box-shadow: 0 0 12px #06b6d4;
}
.nav-dot:hover {
    background: rgba(6, 182, 212, 0.5);
}

/* Inactivity Warning */
.inactivity-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(3, 7, 18, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.inactivity-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* === HERO GRADIENT TEXT === */
.hero-gradient {
    background: linear-gradient(135deg, #60a5fa, #818cf8, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === DECORATIVE BLURS === */
.blur-decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

/* Hide scrollbar but keep functionality */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ═══════════════════════════════════════════════════════════════
   ENHANCED INNER VIEW STYLES
   ═══════════════════════════════════════════════════════════════ */

/* === UNIFIED INNER PAGE HEADER === */
.inner-header {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(20px);
}
.inner-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

/* Back Button Enhanced */
.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(99, 102, 241, 0.9));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}
.back-btn:active { transform: scale(0.95); }

/* Page Title */
.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

/* === GLASS PANEL ENHANCED === */
.glass-panel {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 1.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.glass-panel-lg {
    border-radius: 2rem;
    padding: 2rem;
}

/* === PREMIUM CARD STYLES === */
.premium-card {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.premium-card:hover::before { opacity: 1; }
.premium-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
}

/* === METRIC CARD === */
.metric-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1.25rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.3;
}
.metric-card.cyan::before { color: #06b6d4; }
.metric-card.purple::before { color: #8b5cf6; }
.metric-card.amber::before { color: #f59e0b; }
.metric-card.emerald::before { color: #10b981; }
.metric-card:hover {
    transform: scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Metric Value */
.metric-value {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1;
}
.metric-value.large { font-size: 3.5rem; }
.metric-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin-top: 0.75rem;
}

/* === ENTITY CARD ENHANCED === */
.entity-card-enhanced {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.entity-card-enhanced::after {
    content: '';
    position: absolute;
    right: 1.25rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.entity-card-enhanced:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(4px);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.8));
}
[dir="rtl"] .entity-card-enhanced:hover { transform: translateX(-4px); }
.entity-card-enhanced:hover::after { opacity: 1; }

.entity-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    object-fit: cover;
    border: 2px solid rgba(59, 130, 246, 0.2);
    transition: border-color 0.3s ease;
}
.entity-card-enhanced:hover .entity-avatar {
    border-color: rgba(59, 130, 246, 0.5);
}

/* === TAB BUTTONS ENHANCED === */
.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-radius: 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}
.tab-btn:hover {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
}
.tab-btn.active {
    color: white;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.2));
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}
.tab-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

/* === SEARCH INPUT ENHANCED === */
.search-input-enhanced {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    font-size: 1.125rem;
    color: white;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
    outline: none;
    transition: all 0.3s ease;
}
.search-input-enhanced::placeholder { color: #475569; }
.search-input-enhanced:focus {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* === LEADERBOARD ROW ENHANCED === */
.lb-row-enhanced {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
    border: 1px solid rgba(51, 65, 85, 0.3);
    border-radius: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.lb-row-enhanced::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.3s ease;
}
.lb-row-enhanced:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: scale(1.01);
}
.lb-row-enhanced:hover::before {
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
}
.lb-row-enhanced.top-3::before {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.rank-badge {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.125rem;
    flex-shrink: 0;
}
.rank-badge.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e1b4b;
    box-shadow: 0 4px 15px rgba(251,191,36,0.3);
}
.rank-badge.silver {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #1e1b4b;
}
.rank-badge.bronze {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}
.rank-badge.default {
    background: rgba(51, 65, 85, 0.5);
    color: #94a3b8;
}

/* === COMPARE SELECTOR ENHANCED === */
.compare-selector-item {
    flex-shrink: 0;
    width: 14rem;
    padding: 1.25rem;
    border-radius: 1.25rem;
    border: 2px solid rgba(51, 65, 85, 0.5);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}
.compare-selector-item:hover { opacity: 0.9; }
.compare-selector-item.selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.1));
    opacity: 1;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

/* === COMPARE CARD ENHANCED === */
.compare-card-enhanced {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 2rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.compare-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}
.compare-card-enhanced img {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(59, 130, 246, 0.2);
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* === PLATFORM CARD ENHANCED === */
.platform-card-enhanced {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.platform-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--platform-color, #3b82f6);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.platform-card-enhanced:hover::before { opacity: 1; }
.platform-card-enhanced:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.platform-icon-lg {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* === EXPLORER BAR ENHANCED === */
.explorer-bar {
    position: relative;
    height: 3.5rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(51, 65, 85, 0.6));
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}
.explorer-bar:hover {
    transform: scale(1.01);
}
.explorer-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 1rem;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
}

/* === ENTITY BROWSER NEW DESIGN === */
.browser-header {
    padding: 1rem 2.5rem 0.75rem;
}
.browser-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}
.browser-subtitle {
    font-size: 1rem;
    color: #94a3b8;
}
.browser-search {
    position: relative;
    width: 320px;
}
.browser-search input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 9999px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}
.browser-search input::placeholder {
    color: #64748b;
}
.browser-search input:focus {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(30, 41, 59, 0.8);
}
.browser-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

/* Filter Pills Row */
.filter-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 2.5rem;
    margin-bottom: 1rem;
}
.filter-icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    flex-shrink: 0;
}
.filter-pill {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.5);
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.filter-pill:hover {
    background: rgba(51, 65, 85, 0.6);
    border-color: rgba(100, 116, 139, 0.5);
}
.filter-pill.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: transparent;
    color: white;
    font-weight: 600;
}
.filter-pill .country-code {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}
.filter-pill.active .country-code {
    color: rgba(255, 255, 255, 0.7);
}

/* Entity Card New Design */
.entity-card-new {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(30, 41, 59, 0.5));
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.entity-card-new:hover {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.7), rgba(51, 65, 85, 0.5));
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}
.entity-card-new .entity-image {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(71, 85, 105, 0.5);
    flex-shrink: 0;
}
.entity-card-new:hover .entity-image {
    border-color: rgba(59, 130, 246, 0.5);
}
.entity-card-new .entity-info {
    flex: 1;
    min-width: 0;
}
.entity-card-new .entity-name {
    font-size: 1.375rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.375rem;
    line-height: 1.3;
}
.entity-card-new .entity-category {
    font-size: 0.9375rem;
    color: #94a3b8;
}
.entity-card-new .country-badge {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

/* Filters Wrap Container */
.filters-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.filter-pill .flag-img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

/* === EMPTY STATE ENHANCED === */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}
.empty-state-icon {
    width: 6rem;
    height: 6rem;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty-state-icon .material-symbols-outlined {
    font-size: 3rem;
    color: #3b82f6;
}

/* === ANIMATIONS FOR INNER VIEWS === */
.slide-in-left {
    animation: slideInLeft 0.4s ease-out;
}
.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}
.slide-in-up {
    animation: slideInUp 0.4s ease-out;
}
.stagger-item {
    animation: staggerFade 0.4s ease-out backwards;
}
.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }
.stagger-item:nth-child(7) { animation-delay: 0.35s; }
.stagger-item:nth-child(8) { animation-delay: 0.4s; }
.stagger-item:nth-child(9) { animation-delay: 0.45s; }
.stagger-item:nth-child(10) { animation-delay: 0.5s; }

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes staggerFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === SPINNER ENHANCED === */
.spinner-lg {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === SECTION DIVIDER === */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    margin: 2rem 0;
}

/* === INFO PANEL ENHANCED === */
.info-panel-enhanced {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 400px;
    max-height: 85vh;
    border-radius: 1.5rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.info-panel-enhanced.right { right: 1.5rem; }
.info-panel-enhanced.left { left: 1.5rem; }
.info-panel-enhanced.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(30px);
}
.info-panel-enhanced.left.hidden {
    transform: translateY(-50%) translateX(-30px);
}
