/* globalassets.css — shared across every page: reset, glassmorphism primitives,
   buttons, scrollbar suppression, nav/footer shell. Page-specific look/feel
   (backgrounds, hero layout, per-page accent) lives in assets/css/{slug}.css. */

:root {
    --accent: #5865F2;
    --accent-hover: #4752C4;
    --bg-base: #0b0c10;
    --text-primary: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.68);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.14);
    --font-body: 'Exo', system-ui, -apple-system, sans-serif;
    --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    scrollbar-width: none;
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
}
::-webkit-scrollbar { display: none; width: 0; height: 0; }

img, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

/* ---- Glass primitives ----
   Reflection tokens (lit top edge + shaded bottom edge, both via inset
   box-shadow so they respect border-radius natively — no extra pseudo-element
   or overflow:hidden needed, which would risk clipping dropdowns/popovers
   nested inside a .glass card) + a gentle hover lift. */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(88, 101, 242, 0.55), 0 0 24px rgba(88, 101, 242, 0.35); }
.btn:active { transform: translateY(0); }
.btn.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    box-shadow: none;
}
.btn.btn-outline:hover { background: rgba(255,255,255,0.06); }

/* ---- Nav ---- */
.site-nav {
    position: sticky; top: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1.5rem;
    background: rgba(10, 10, 14, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--glass-border);
    transition: padding 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
/* Condenses once the page scrolls — toggled by app.js. More opaque + a subtle
   shadow so the glass reads clearly against whatever's now scrolled underneath it. */
.site-nav.scrolled {
    padding: 0.55rem 1.5rem;
    background: rgba(8, 8, 12, 0.82);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.site-nav .nav-brand { font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; gap: 0.5rem; }
/* .nav-right groups the links + search + language switcher + hamburger into
   ONE flex child of .site-nav (alongside .nav-brand) — ported from the
   reference site's nav-container structure. On mobile, only the inner
   .nav-links list collapses into the fullscreen menu; search/lang/hamburger
   stay siblings of it, so they remain visible and reachable in the header
   bar at all times instead of getting buried inside the collapsing menu. */
.nav-right { display: flex; align-items: center; gap: 1.4rem; }
.site-nav .nav-links { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.site-nav .nav-links a { font-size: 0.95rem; color: var(--text-muted); transition: color 0.2s; }
.site-nav .nav-links a:hover, .site-nav .nav-links a.active { color: #fff; }
/* position+z-index so the hamburger always paints above the fullscreen
   .nav-links overlay (which uses z-index:999) once it's open — without an
   explicit stacking context here this button would be a statically-positioned
   sibling, which always paints BEHIND any positioned z-index sibling
   regardless of DOM order, making it un-tappable while the menu is open. */
.nav-toggle { display: none; position: relative; z-index: 1000; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .nav-right { gap: 0.6rem; }
    /* Fullscreen centered overlay — ported from www.dannny0117.com's mobile
       nav, which is what "the right size" for a small screen actually looks
       like (big tap targets, generous spacing) instead of a cramped stacked
       list. Our nav has more items than the reference's, so unlike the
       reference's pure justify-content:center (which can strand the top
       items off-screen with no way to scroll up to them on a short viewport),
       this starts from the top with generous padding and scrolls internally
       — same "reachable no matter what" guarantee, adapted for a longer menu. */
    .site-nav .nav-links {
        display: none; position: fixed; inset: 0; flex-direction: column; align-items: center; justify-content: flex-start;
        gap: 1.5rem; padding: 6rem 1.5rem 3rem; font-size: 1.3rem;
        background: rgba(10,10,14,0.97); z-index: 999;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    .site-nav .nav-links.open { display: flex; }
    /* Search and language switcher are no longer DOM children of .nav-links
       (see .nav-right above) — they stay put in the persistent header row on
       every screen size, exactly like the reference site. Their popout panels
       still anchor via "right: 0" to their own button though, and that button
       now sits close to the right edge of a narrow screen, so the panels
       still need pinning to the viewport instead of the button to stay fully
       on screen (position:fixed also escapes any ancestor's overflow clip). */
    .nav-search-panel {
        position: fixed; top: 64px; left: 1rem; right: 1rem; width: auto; max-width: none;
    }
    .lang-dropdown-menu {
        position: fixed; top: 64px; left: 1rem; right: 1rem; width: auto; min-width: 0; max-width: none;
    }
}

/* ---- Language dropdown ---- */
.lang-dropdown { position: relative; }
.lang-dropdown-menu {
    position: absolute; top: calc(100% + .5rem); right: 0; min-width: 170px;
    background: rgba(15,15,15,.97); border: 1px solid var(--glass-border); border-radius: 10px;
    padding: .4rem; display: none; flex-direction: column; gap: .15rem;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(0,0,0,.4); z-index: 1001; max-height: 60vh; overflow-y: auto;
}
.lang-dropdown.open .lang-dropdown-menu { display: flex; }
.lang-dropdown-item {
    background: none; border: none; color: var(--text-muted); font-size: .85rem; font-weight: 500;
    text-align: left; padding: .5rem .65rem; border-radius: 6px; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.lang-dropdown-item:hover  { background: rgba(255,255,255,.08); color: #fff; }
.lang-dropdown-item.active { color: var(--accent); font-weight: 700; }

/* ---- Nav search ---- */
.nav-search { position: relative; }
.nav-search-btn {
    background: none; border: none; color: #fff; font-size: 1.05rem; cursor: pointer;
    width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.nav-search-btn:hover { background: rgba(255,255,255,0.08); }
.nav-search-panel {
    position: absolute; top: calc(100% + 0.5rem); right: 0; width: 320px; max-width: 80vw;
    background: rgba(15,15,15,.97); border: 1px solid var(--glass-border); border-radius: 10px;
    padding: 0.6rem; display: none; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(0,0,0,.4); z-index: 1001;
}
.nav-search.open .nav-search-panel { display: block; }
.nav-search-panel input {
    width: 100%; padding: 0.6rem 0.8rem; border-radius: 8px; border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05); color: #fff; font-size: 0.9rem;
}
.nav-search-results { max-height: 60vh; overflow-y: auto; margin-top: 0.5rem; }
.nav-search-result {
    display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem; border-radius: 8px; transition: background 0.15s;
}
.nav-search-result:hover { background: rgba(255,255,255,0.08); }
.nav-search-result img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.nav-search-result-title { display: block; font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
.nav-search-result-platform { display: block; font-size: 0.7rem; color: var(--text-muted); text-transform: capitalize; }
.nav-search-empty { padding: 0.6rem; color: var(--text-muted); font-size: 0.85rem; text-align: center; }

/* ---- Footer ---- */
.site-footer {
    padding: 3rem 1.5rem 2rem; text-align: center; color: var(--text-muted);
    border-top: 1px solid var(--glass-border); font-size: 0.9rem;
}
.footer-logos {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 1.5rem; max-width: 900px; margin: 0 auto 2rem; align-items: center;
}
.footer-logos img { max-height: 48px; width: auto; margin: 0 auto; object-fit: contain; }
.share-buttons { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; margin: 1rem 0; }
.share-buttons a {
    width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--glass-bg); border: 1px solid var(--glass-border); transition: transform 0.2s, background 0.2s;
}
.share-buttons a:hover { transform: translateY(-3px); background: rgba(255,255,255,0.14); }

/* ---- Utility ---- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Loading-state placeholder: diagonal shimmer band sweeping across a plain
   glass-tinted block, used while showcase feeds fetch their real content. */
.skeleton-shimmer {
    position: relative; overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}
.skeleton-shimmer::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.10) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: d0117Shimmer 1.6s ease-in-out infinite;
}
@keyframes d0117Shimmer { 0% { background-position: 150% 0; } 100% { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton-shimmer::after { animation: none; } }

/* ---- dannny0117 Background — one full-page container; all type-specific
   styling (color/image/parallax/aurora/video) is generated inline per-page
   by core\dannny0117_background.php, ported from the proven working
   implementation on www.dannny0117.com. This is just the base positioning. ---- */
.d0117-bg-root { position: fixed !important; inset: 0 !important; z-index: 0 !important; overflow: hidden !important; background: var(--bg-base); display: block !important; }
/* Everything else on the page sits in .site-content, explicitly stacked above
   the background — deliberately NOT relying on the background using a
   negative z-index (fixed+negative-z-index behaves inconsistently across
   browsers/compositing situations), sidestepping that class of bug by
   construction rather than debugging it per-browser. */
.site-content { position: relative; z-index: 1; }

/* ---- Content sections (shared by every page — hero/richtext/cta/link-grid/showcase) ---- */
.section-hero { padding: 7rem 1.25rem 4rem; text-align: center; }
.hero-eyebrow {
    display: inline-block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em;
    color: var(--accent); text-transform: uppercase; margin-bottom: 0.9rem;
}
.section-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; margin: 0 0 1rem; line-height: 1.1; }
.hero-subtitle { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-muted); max-width: 640px; margin: 0 auto 2rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.section-richtext, .section-cta, .section-link-grid, .section-showcase { padding: 2rem 1.25rem; }
.richtext-card, .cta-card { padding: 2.5rem; margin: 0 auto; max-width: 860px; }
.richtext-card h2, .cta-card h2 { margin-top: 0; font-size: 1.6rem; }
.richtext-card ul, .richtext-card ol { padding-left: 1.3rem; line-height: 1.8; color: var(--text-muted); }
.richtext-card li strong { color: #fff; }
.cta-card { text-align: center; }
.cta-card p { color: var(--text-muted); margin-bottom: 1.6rem; }

.section-link-grid h2, .section-showcase h2 { text-align: center; font-size: 1.6rem; margin-bottom: 1.75rem; }
.link-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; max-width: 980px; margin: 0 auto;
}
.link-grid-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 1.6rem 1rem;
    text-align: center; font-weight: 600; transition: transform 0.2s, background 0.2s;
}
.link-grid-item:hover { transform: translateY(-4px); background: rgba(255,255,255,0.12); }
.link-grid-item i { font-size: 1.6rem; color: var(--accent); }

.showcase-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; max-width: 1100px; margin: 0 auto;
}
/* Vertical mode (admin-configurable per platform, Showcases screen) uses
   taller 9:16 thumbnails and narrower columns so portrait content (Reels/
   TikToks/Stories) isn't cropped down to a 16:9 slice of itself. */
.showcase-grid.vertical { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); max-width: 900px; }

.showcase-card {
    overflow: hidden; display: block; position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.showcase-card:hover { transform: translateY(-6px) scale(1.015); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5); }
/* Diagonal light-sheen sweep on hover — safe here specifically because
   .showcase-card already commits to overflow:hidden and has simple children
   (a thumb wrapper + a title span), unlike the general-purpose .glass class
   where a stray overlay/absolute-positioned child could get clipped. */
.showcase-card::after {
    content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, transparent 45%);
    opacity: 0; transition: opacity 0.35s ease;
}
.showcase-card:hover::after { opacity: 1; }

.showcase-card-thumb { position: relative; overflow: hidden; aspect-ratio: 16/9; background: rgba(255,255,255,0.04); }
.showcase-grid.vertical .showcase-card-thumb { aspect-ratio: 9/16; }
.showcase-card-thumb img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 0.35s ease;
}
.showcase-card-thumb img.loaded { opacity: 1; }

.showcase-card-title { display: block; padding: 0.8rem 1rem; font-size: 0.9rem; font-weight: 600; }
.showcase-loading { text-align: center; color: var(--text-muted); grid-column: 1 / -1; }

/* ---- Showcase item detail pages (/youtube/{slug}, /minecraft/{slug}) ---- */
.detail-container { max-width: 840px; padding: 6rem 1.25rem 4rem; }
.detail-back-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.detail-back-link:hover { color: #fff; }
.detail-title { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; margin: 0 0 1.5rem; line-height: 1.2; }
.detail-embed-wrap { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; margin-bottom: 1.5rem; }
.detail-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.detail-image-wrap { padding: 0.6rem; margin-bottom: 1.5rem; }
.detail-image-wrap img { width: 100%; border-radius: 10px; display: block; }
.detail-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.detail-price { font-size: 1.2rem; font-weight: 800; color: var(--accent); }
.detail-description { padding: 1.75rem; margin-bottom: 1.5rem; }
.detail-description h2 { margin-top: 0; font-size: 1.2rem; }
.detail-description p { color: var(--text-muted); line-height: 1.7; }
.detail-tags { margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.detail-tags-label { color: var(--text-muted); font-size: 0.85rem; margin-right: 0.3rem; }
.tag-chip { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 0.3rem 0.8rem; font-size: 0.78rem; color: var(--text-muted); }
.detail-prevnext { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--glass-border); flex-wrap: wrap; }
.detail-nav-link { font-size: 0.9rem; color: var(--text-muted); max-width: 45%; }
.detail-nav-link:hover { color: #fff; }

/* ---- Live status (nav badge + /live platform cards) ---- */
.nav-live-badge {
    background: #f04747; color: #fff; font-size: 0.65rem; font-weight: 800;
    padding: 0.1rem 0.4rem; border-radius: 6px; margin-left: 0.35rem; letter-spacing: 0.03em;
    animation: liveBadgePulse 1.6s ease-in-out infinite;
}
@keyframes liveBadgePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.live-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; max-width: 900px; margin: 0 auto; }
.live-status-card { padding: 1.4rem; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; text-align: center; }
.live-status-dot { width: 10px; height: 10px; border-radius: 50%; background: #6b7280; margin-bottom: 0.3rem; }
.live-status-card.is-live .live-status-dot { background: #f04747; animation: liveBadgePulse 1.6s ease-in-out infinite; }
.live-status-platform { font-weight: 700; }
.live-status-state { font-size: 0.85rem; color: var(--text-muted); }
.live-status-card.is-live .live-status-state { color: #f04747; font-weight: 700; }
.live-status-detail { font-size: 0.8rem; color: var(--text-muted); min-height: 1.1em; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
