/* ═══════════════════════════════════════════════════════════
   ZODIAXON GAMES — SHARED PREMIUM STYLES (v3)
   Modal system, arena card, animations, verdict cards
   ═══════════════════════════════════════════════════════════ */

/* ===== LANGUAGE DROPDOWN ===== */
.zg-lang-dropdown { position: relative; display: inline-block; }
.zg-lang-btn {
    display: flex; align-items: center; gap: 6px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 50px; padding: 8px 16px;
    color: var(--text-secondary); font-size: 0.85rem; font-family: inherit;
    cursor: pointer; transition: all 0.25s ease;
}
.zg-lang-btn:hover { border-color: var(--brand-primary-light); color: var(--text-primary); background: rgba(139, 92, 246, 0.14); }
.zg-lang-arrow { font-size: 0.65rem; opacity: 0.6; transition: transform 0.25s ease; }
.zg-lang-menu-open .zg-lang-arrow { transform: rotate(180deg); }
.zg-lang-menu {
    display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px;
    background: rgba(16, 16, 36, 0.98);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(139, 92, 246, 0.25); border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); padding: 6px; z-index: 200001;
}
.zg-lang-menu.zg-lang-menu-open { display: block; animation: zg-fade-in 0.2s ease; }
.zg-lang-item {
    display: block; width: 100%; text-align: left; background: none; border: none;
    border-radius: 8px; padding: 9px 12px; color: var(--text-secondary);
    font-size: 0.85rem; font-family: inherit; cursor: pointer; transition: all 0.15s ease;
}
.zg-lang-item:hover { background: rgba(139, 92, 246, 0.12); color: var(--text-primary); }
.zg-lang-item-active { color: var(--brand-primary-light); font-weight: 600; }

@keyframes zg-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ===== ARENA CARD — landing state boundary (before modal opens) ===== */
.zg-arena-card {
    max-width: 560px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 26px;
    padding: 38px 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.zg-arena-card::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -20%;
    width: 70%;
    height: 140%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 65%);
    pointer-events: none;
}
.zg-arena-card::after {
    content: '';
    position: absolute;
    bottom: -40%;
    right: -20%;
    width: 70%;
    height: 140%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.1), transparent 65%);
    pointer-events: none;
}
.zg-arena-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.zg-arena-inner { position: relative; z-index: 1; }

/* ===== REJOIN BANNER ===== */
.zg-rejoin-banner {
    display: none;
    max-width: 560px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(20, 184, 166, 0.1));
    border: 1px solid var(--brand-primary-light);
    border-radius: 14px;
    padding: 16px 20px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}
.zg-rejoin-banner.zg-rejoin-visible { display: flex; animation: zg-fade-in 0.3s ease; }
.zg-rejoin-text { color: var(--text-primary); font-size: 0.92rem; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.zg-rejoin-btn {
    background: var(--gradient-primary); color: white; border: none; border-radius: 50px;
    padding: 9px 18px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: all 0.25s ease; font-family: inherit;
}
.zg-rejoin-btn:hover { box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4); transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════
   STAGE MODE — inline UX pattern (Chemistry Meter, Soulmate Scanner, etc.)
   Wrapper pe .zg-stage-active lagte hi hero aur cross-promo tools section
   chhup jaate hain, taaki game card hi focus mein rahe. Documented as
   already-working shared infra, par ye rule pehle actually exist nahi
   karta tha — is fix se woh documentation sach ban gayi.
   ═══════════════════════════════════════════════════════════ */
.zg-stage-active .zg-hero-section,
.zg-stage-active .zg-tools-section {
    display: none;
}

/* ═══════════════════════════════════════════════════════════
   GAME MODAL — true fullscreen overlay, page ke peeche kuch nahi dikhta
   ═══════════════════════════════════════════════════════════ */
.zg-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 16, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 100000;
    align-items: flex-start;
    justify-content: center;
    padding: 5vh 16px;
    overflow-y: auto;
}
.zg-modal-overlay.zg-modal-open {
    display: flex;
    animation: zg-modal-backdrop-in 0.25s ease;
}
@keyframes zg-modal-backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.zg-modal-content {
    width: 100%;
    max-width: 560px;
    animation: zg-modal-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes zg-modal-pop-in {
    from { opacity: 0; transform: scale(0.9) translateY(24px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.zg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 0 4px;
}
.zg-modal-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.zg-cancel-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.zg-cancel-btn:hover { border-color: #f87171; color: #f87171; background: rgba(248, 113, 113, 0.1); }

/* ===== TOOLS CROSS-PROMOTION SECTION ===== */
.zg-tools-section {
    border-top: 1px solid var(--border-card);
    margin-top: 60px;
    padding-top: 56px;
    padding-bottom: 40px;
    position: relative;
}
.zg-tools-section::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 200px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-primary-light), transparent);
    opacity: 0.5;
}
.zg-tools-header { text-align: center; margin-bottom: 36px; }
.zg-tools-title { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--text-primary); margin-bottom: 8px; }
.zg-tools-subtitle { color: var(--text-secondary); font-size: 0.95rem; }
.zg-tools-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px; max-width: 1100px; margin: 0 auto;
}
.zg-tool-card {
    background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 14px;
    padding: 20px 14px; text-align: center; text-decoration: none;
    transition: all 0.25s ease; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.zg-tool-card:hover { border-color: var(--brand-primary-light); background: rgba(139, 92, 246, 0.08); transform: translateY(-4px); box-shadow: 0 12px 30px rgba(139, 92, 246, 0.15); }
.zg-tool-icon { font-size: 1.8rem; line-height: 1; }
.zg-tool-name { color: var(--text-secondary); font-size: 0.8rem; font-weight: 500; line-height: 1.3; }
.zg-tool-card:hover .zg-tool-name { color: var(--text-primary); }
.zg-tools-viewall { text-align: center; margin-top: 28px; }
.zg-tools-viewall a { color: var(--brand-primary-light); text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: opacity 0.2s ease; }
.zg-tools-viewall a:hover { opacity: 0.8; }

@media (max-width: 600px) {
    .zg-tools-grid { grid-template-columns: repeat(3, 1fr); }
    .zg-tool-card { padding: 16px 10px; }
}

/* ═══════════════════════════════════════════════════════════
   SEO CONTENT SECTION — shared across every game's page
   (heading hierarchy: page h1 = game title, this section's
   h2 = its main heading, h3 = its subheadings — never skips a level)
   ═══════════════════════════════════════════════════════════ */
.zg-seo-section { padding: 12px 0 60px; }
.zg-seo-h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    line-height: 1.25;
    margin-bottom: 18px;
}
.zg-seo-h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 28px 0 12px;
}
.zg-seo-section p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.75;
    margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════
   FUN ANIMATIONS — reusable across every game
   ═══════════════════════════════════════════════════════════ */

/* Bounce-in — reveal moments, verdicts, big announcements */
@keyframes zg-bounce-in {
    0% { transform: scale(0.3) rotate(-8deg); opacity: 0; }
    50% { transform: scale(1.08) rotate(2deg); }
    70% { transform: scale(0.96) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.zg-bounce-in { animation: zg-bounce-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Wiggle — playful attention-grabber (e.g. timer running low, funny icon) */
@keyframes zg-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-6deg); }
    75% { transform: rotate(6deg); }
}
.zg-wiggle { animation: zg-wiggle 0.4s ease-in-out; }

/* Floating emoji ambiance — drifting background emojis during waiting screens */
.zg-float-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
}
.zg-floating-emoji {
    position: absolute;
    font-size: 1.6rem;
    opacity: 0.35;
    animation: zg-float-drift linear infinite;
    will-change: transform;
}
@keyframes zg-float-drift {
    0% { transform: translateY(10%) rotate(0deg); opacity: 0; }
    10% { opacity: 0.35; }
    90% { opacity: 0.35; }
    100% { transform: translateY(-140%) rotate(25deg); opacity: 0; }
}

/* Confetti canvas — full-screen burst overlay */
.zg-confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 200000;
}

/* ═══════════════════════════════════════════════════════════
   VERDICT / SHAREABLE CARD
   ═══════════════════════════════════════════════════════════ */
.zg-verdict-wrap {
    text-align: center;
    margin: 20px 0 8px;
}
.zg-verdict-canvas {
    max-width: min(260px, 65vw) !important;
    width: 100% !important;
    min-width: 0 !important;
    aspect-ratio: 1080 / 1920 !important;
    height: auto !important;
    border-radius: 18px;
    border: 1px solid var(--border-card);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    margin: 0 auto 16px;
    display: block;
}
.zg-verdict-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.zg-download-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 11px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.zg-download-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(139, 92, 246, 0.4); }

/* ═══════════════════════════════════════════════════════════
   SHARE SHEET — window.ZodiaxonShare, shared across every game
   Bottom sheet on mobile, centered card on desktop.
   ═══════════════════════════════════════════════════════════ */
.zg-share-backdrop {
    position: fixed; inset: 0; background: rgba(5,5,16,0.75);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 200000; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.zg-share-backdrop.zg-share-open { opacity: 1; pointer-events: all; }

.zg-share-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 420px;
    background: rgba(16,16,36,0.99);
    border: 1px solid var(--border-card);
    border-bottom: none;
    border-radius: 24px 24px 0 0;
    padding: 10px 22px 26px;
    z-index: 200001;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -20px 60px rgba(0,0,0,0.5);
    max-height: 85vh;
    overflow-y: auto;
}
.zg-share-sheet.zg-share-open { transform: translate(-50%, 0); }

@media (min-width: 640px) {
    .zg-share-sheet {
        bottom: 50%;
        transform: translate(-50%, calc(50% + 24px)) scale(0.96);
        border-radius: 20px;
        border-bottom: 1px solid var(--border-card);
        opacity: 0;
    }
    .zg-share-sheet.zg-share-open { transform: translate(-50%, 50%) scale(1); opacity: 1; }
}

.zg-share-handle {
    width: 36px; height: 4px; background: rgba(255,255,255,0.15); border-radius: 4px;
    margin: 8px auto 14px;
}
@media (min-width: 640px) { .zg-share-handle { display: none; } }

.zg-share-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.zg-share-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--text-primary); }
.zg-share-close {
    background: rgba(255,255,255,0.06); border: none; color: var(--text-secondary);
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s ease;
}
.zg-share-close:hover { background: rgba(255,255,255,0.14); color: var(--text-primary); }

.zg-share-native-row { margin-bottom: 14px; }
.zg-share-native-btn {
    width: 100%; background: var(--gradient-primary); color: white; border: none;
    border-radius: 14px; padding: 13px; font-size: 0.95rem; font-weight: 600;
    cursor: pointer; font-family: inherit; display: flex; align-items: center;
    justify-content: center; gap: 8px; transition: all 0.25s ease;
}
.zg-share-native-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(139,92,246,0.35); }

.zg-share-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px;
}
.zg-share-platform-btn {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-card); border-radius: 14px;
    padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px;
    cursor: pointer; font-family: inherit; transition: all 0.2s ease;
}
.zg-share-platform-btn:hover { border-color: var(--brand-primary-light); background: rgba(139,92,246,0.08); transform: translateY(-2px); }
.zg-share-platform-icon { font-size: 1.5rem; }
.zg-share-platform-label { font-size: 0.72rem; color: var(--text-secondary); text-align: center; }

.zg-share-copy-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.zg-share-copy-row { display: flex; gap: 8px; }
.zg-share-copy-input {
    flex: 1; background: rgba(255,255,255,0.03); border: 1px solid var(--border-card);
    border-radius: 10px; padding: 10px 12px; color: var(--text-secondary); font-size: 0.82rem;
    font-family: inherit; outline: none; min-width: 0;
}
.zg-share-copy-btn {
    background: rgba(139,92,246,0.12); border: 1px solid var(--brand-primary-light);
    color: var(--brand-primary-light); border-radius: 10px; padding: 0 18px; font-size: 0.85rem;
    font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s ease; white-space: nowrap;
}
.zg-share-copy-btn:hover { background: rgba(139,92,246,0.2); }
.zg-share-copy-btn.zg-share-copied { background: rgba(52,211,153,0.15); border-color: #34D399; color: #34D399; }

/* Small "Share" trigger buttons used on the landing card + near the QR code */
.zg-share-trigger-btn {
    background: rgba(255,255,255,0.04); border: 1px solid var(--border-card);
    color: var(--text-primary); border-radius: 50px; padding: 10px 20px; font-size: 0.85rem;
    font-weight: 600; cursor: pointer; font-family: inherit; display: inline-flex;
    align-items: center; gap: 6px; transition: all 0.25s ease;
}
.zg-share-trigger-btn:hover { border-color: var(--brand-primary-light); background: rgba(139,92,246,0.08); transform: translateY(-1px); }

/* Small game-name kicker label shown between the section-label and the H1,
   so the page reads clearly as "this game/tool" right at the top of the hero. */
.zg-game-name-tag {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    text-align: center; width: 100%;
    font-size: 1.05rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
    color: var(--brand-primary-light, #a78bfa); margin: 4px auto 2px;
}
