/* ============================================================
   LUMIOR — App Detail V3 CSS
   Global-standard App Store quality product page
   ============================================================ */

/* ── Loading ── */
.adv3-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    color: var(--text-secondary);
    gap: 16px;
    position: relative;
    z-index: 5;
    font-size: 15px;
}

.adv3-spinner {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.07);
    border-top-color: var(--app-color, #F4D34F);
    animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Base Section ── */
.adv3-section {
    padding: 64px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    /* Start visible — IntersectionObserver adds the entrance animation class */
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

/* When JS marks the section for animation, start hidden */
.adv3-section.adv3-will-animate {
    opacity: 0;
    transform: translateY(24px);
}

.adv3-section.adv3-revealed {
    opacity: 1;
    transform: translateY(0);
}

.adv3-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--app-color, #F4D34F);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.adv3-section-label::after {
    content: '';
    flex: 0 0 36px;
    height: 1.5px;
    background: rgba(var(--app-rgb, 244 211 79), 0.4);
}

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.adv3-hero {
    position: relative;
    padding: 100px 0 0;
    overflow: hidden;
    min-height: auto;
}

.adv3-hero-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;  /* below the inner content */
}

/* FIX: inner must be positioned above the absolute backdrop */
.adv3-hero-inner {
    position: relative;
    z-index: 4;
}

.adv3-hero-scrim {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 160px;
    background: linear-gradient(to top, var(--bg-primary, #06080d), transparent);
    pointer-events: none;
    z-index: 2;
}

.adv3-hero-inner {
    position: relative;
    z-index: 3;
}

/* Back link */
.adv3-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 0;
    margin-bottom: 40px;
    transition: color 200ms ease, gap 200ms ease;
}

.adv3-back:hover {
    color: var(--text-primary);
    gap: 12px;
}

/* App Identity Row */
.adv3-identity {
    display: flex;
    gap: 36px;
    align-items: flex-start;
    margin-bottom: 48px;
}

/* App Icon */
.adv3-icon-frame {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5),
                0 0 0 1px rgba(255,255,255,0.08),
                0 0 60px rgba(var(--app-rgb, 244 211 79), 0.15);
    animation: iconFloatSoft 5s ease-in-out infinite;
    background: rgba(var(--app-rgb, 244 211 79), 0.07);
}

@keyframes iconFloatSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.adv3-icon-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    display: block;
    border-radius: 26px;
}

.adv3-icon-svg-fallback {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--app-rgb, 244 211 79), 0.06);
    border-radius: 26px;
}

.adv3-icon-svg-fallback svg { width: 80px; height: 80px; }

/* App Info */
.adv3-info { flex: 1; }

.adv3-category-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--app-color, #F4D34F);
    margin-bottom: 6px;
}

.adv3-app-name {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.adv3-developer {
    font-size: 14px;
    color: var(--app-color, #F4D34F);
    font-weight: 600;
    margin-bottom: 14px;
}

/* Meta row */
.adv3-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.adv3-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
}

.adv3-meta-rating.adv3-chip-live {
    background: rgba(34,197,94,0.1);
    border-color: rgba(34,197,94,0.25);
    color: #4ade80;
}

.adv3-meta-rating.adv3-chip-preview {
    background: rgba(148,163,184,0.08);
    border-color: rgba(148,163,184,0.2);
    color: #94a3b8;
}

.adv3-short-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 24px;
    max-width: 580px;
}

/* CTA row */
.adv3-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Store Buttons */
.adv3-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 13px 22px;
    border-radius: 14px;
    text-decoration: none;
    border: 1.5px solid;
    transition: all 300ms cubic-bezier(0.34,1.56,0.64,1);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.adv3-store-txt { display: flex; flex-direction: column; text-align: left; }
.adv3-store-sub { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.65; line-height: 1; }
.adv3-store-main { font-size: 15px; font-weight: 700; line-height: 1.3; }

.adv3-store-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}

.adv3-play {
    background: rgba(78,205,196,0.07);
    border-color: rgba(78,205,196,0.25);
    color: #e2f8f5;
}
.adv3-play:hover { background: rgba(78,205,196,0.13); border-color: rgba(78,205,196,0.5); }

.adv3-apple {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
    color: var(--text-primary);
}
.adv3-apple:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }

.adv3-web {
    background: rgba(var(--app-rgb, 244 211 79),0.07);
    border-color: rgba(var(--app-rgb, 244 211 79),0.25);
    color: var(--app-color, #F4D34F);
}
.adv3-web:hover { background: rgba(var(--app-rgb, 244 211 79),0.13); border-color: rgba(var(--app-rgb, 244 211 79),0.5); }

/* Small store btn */
.adv3-store-sm {
    padding: 8px 14px;
    border-radius: 10px;
    gap: 8px;
}
.adv3-store-sm .adv3-store-sub { display: none; }
.adv3-store-sm .adv3-store-main { font-size: 13px; }

/* Coming soon */
.adv3-coming-soon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    padding: 12px 20px;
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 14px;
}

.pulse-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--app-color, #F4D34F);
    animation: livePing 2s ease-in-out infinite;
}

/* Quick Stats Bar */
.adv3-quick-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 20px 8px;
    margin-bottom: 0;
    backdrop-filter: blur(16px);
}

.adv3-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 2px;
    padding: 0 20px;
}

.adv3-stat-val {
    font-size: 24px;
    font-weight: 700;
    background: var(--app-gradient, linear-gradient(135deg, #F4D34F, #ff9933));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.adv3-stat-stars {
    font-size: 10px;
    color: #F4D34F;
    letter-spacing: 1px;
    line-height: 1;
}

.adv3-stat-lbl {
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.adv3-stat-div {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.07);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   ABOUT SECTION
═══════════════════════════════════════════ */
.adv3-about { background: linear-gradient(180deg, rgba(var(--app-rgb, 244 211 79), 0.025) 0%, transparent 100%); }

.adv3-about-inner { max-width: 820px; }

.adv3-about-text {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.85;
    margin: 0 0 16px;
    white-space: pre-line;
}

.adv3-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.adv3-read-more {
    background: none;
    border: none;
    color: var(--app-color, #F4D34F);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 200ms;
}

.adv3-read-more:hover { opacity: 0.75; }

/* ═══════════════════════════════════════════
   FEATURES GRID
═══════════════════════════════════════════ */
.adv3-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.adv3-feat-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 24px;
    backdrop-filter: blur(14px);
    transition: all 280ms ease;
    opacity: 0;
    transform: translateY(16px);
    animation: featReveal 0.5s ease forwards;
}

@keyframes featReveal {
    to { opacity: 1; transform: translateY(0); }
}

.adv3-feat-card:hover {
    border-color: rgba(var(--app-rgb, 244 211 79), 0.2);
    background: rgba(var(--app-rgb, 244 211 79), 0.04);
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(var(--app-rgb, 244 211 79), 0.07);
}

.adv3-feat-emoji-bg {
    flex-shrink: 0;
    width: 46px; height: 46px;
    border-radius: 12px;
    background: rgba(var(--app-rgb, 244 211 79), 0.1);
    border: 1px solid rgba(var(--app-rgb, 244 211 79), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.adv3-feat-body { flex: 1; }

.adv3-feat-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.adv3-feat-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ═══════════════════════════════════════════
   TECH STACK
═══════════════════════════════════════════ */
.adv3-tech-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.adv3-tech-chip {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 100px;
    background: rgba(var(--app-rgb, 244 211 79), 0.06);
    border: 1px solid rgba(var(--app-rgb, 244 211 79), 0.18);
    color: var(--app-color, #F4D34F);
    letter-spacing: 0.02em;
    transition: all 230ms ease;
    cursor: default;
}

.adv3-tech-chip:hover {
    background: rgba(var(--app-rgb, 244 211 79), 0.14);
    border-color: rgba(var(--app-rgb, 244 211 79), 0.4);
    transform: scale(1.04);
}

/* ═══════════════════════════════════════════
   APP INFO TABLE
═══════════════════════════════════════════ */
.adv3-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.adv3-meta-table {
    width: 100%;
    border-collapse: collapse;
}

.adv3-meta-row { border-bottom: 1px solid rgba(255,255,255,0.05); }
.adv3-meta-row:last-child { border-bottom: none; }

.adv3-meta-key {
    font-size: 13px;
    color: var(--text-tertiary);
    padding: 12px 0;
    white-space: nowrap;
    width: 40%;
}

.adv3-meta-value {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 12px 0 12px 16px;
}

/* Developer Card */
.adv3-dev-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    margin-bottom: 12px;
}

.adv3-dev-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(var(--app-rgb, 244 211 79), 0.08);
    border: 1px solid rgba(var(--app-rgb, 244 211 79), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--app-color, #F4D34F);
}

.adv3-dev-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.adv3-dev-link {
    font-size: 12px;
    color: var(--app-color, #F4D34F);
    text-decoration: none;
    font-weight: 600;
}
.adv3-dev-link:hover { text-decoration: underline; }

.adv3-privacy-link {
    font-size: 13px;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 200ms;
}
.adv3-privacy-link:hover { color: var(--text-secondary); }

/* ═══════════════════════════════════════════
   FINAL CTA
═══════════════════════════════════════════ */
.adv3-final-cta {
    text-align: center;
    padding: 100px 0 140px;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.adv3-final-cta-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.adv3-final-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.adv3-final-icon {
    width: 100px; height: 100px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 48px rgba(var(--app-rgb, 244 211 79), 0.2),
                0 0 0 1.5px rgba(var(--app-rgb, 244 211 79), 0.2);
    animation: iconFloatSoft 5s ease-in-out infinite;
    background: rgba(var(--app-rgb, 244 211 79), 0.07);
}

.adv3-final-icon-img {
    width: 100px; height: 100px;
    object-fit: cover;
    display: block;
    border-radius: 24px;
}

.adv3-final-icon-svg {
    width: 100px; height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
}
.adv3-final-icon-svg svg { width: 68px; height: 68px; }

.adv3-final-heading {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.1;
}

.adv3-final-gradient {
    background: var(--app-gradient, linear-gradient(135deg, #F4D34F, #ff9933));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.adv3-final-sub {
    font-size: 17px;
    color: var(--text-secondary);
    margin: 0;
    max-width: 480px;
}

.adv3-final-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

/* ═══════════════════════════════════════════
   STICKY BAR
═══════════════════════════════════════════ */
.adv3-sticky {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(8,10,16,0.92);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 12px 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5),
                0 0 0 1px rgba(var(--app-rgb, 244 211 79), 0.1);
    transition: bottom 400ms cubic-bezier(0.34,1.56,0.64,1);
    min-width: 360px;
    max-width: 640px;
}

.adv3-sticky-visible { bottom: 24px; }

.adv3-sticky-icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 11px;
    overflow: hidden;
    background: rgba(var(--app-rgb, 244 211 79), 0.08);
    border: 1px solid rgba(var(--app-rgb, 244 211 79), 0.15);
}

.adv3-sticky-icon-img {
    width: 44px; height: 44px;
    object-fit: cover;
    display: block;
    border-radius: 11px;
}

.adv3-sticky-icon-svg {
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
}
.adv3-sticky-icon-svg svg { width: 28px; height: 28px; }

.adv3-sticky-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.adv3-sticky-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adv3-sticky-sub {
    font-size: 11px;
    color: var(--text-tertiary);
}

.adv3-sticky-btns {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* live ping used across */
@keyframes livePing {
    0% { box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
    70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
    100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* ═══════════════════════════════════════════
   LIGHT THEME
═══════════════════════════════════════════ */
[data-theme="light"] .adv3-quick-stats {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .adv3-feat-card {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .adv3-dev-card {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .adv3-sticky {
    background: rgba(255,255,255,0.95);
    border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .adv3-back { color: var(--text-secondary); }
[data-theme="light"] .adv3-hero-scrim {
    background: linear-gradient(to top, var(--bg-primary, #f2f0ea), transparent);
}
[data-theme="light"] .adv3-meta-row .adv3-meta-chip {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .adv3-section {
    border-top-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .adv3-meta-row {
    border-bottom-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .adv3-final-cta {
    border-top-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .adv3-stat-val {
    color: var(--app-dark, #c2410c);
    background: none;
    -webkit-text-fill-color: initial;
}

[data-theme="light"] .adv3-tech-chip {
    background: rgba(var(--app-dark-rgb, 194 65 12), 0.08);
    border-color: rgba(var(--app-dark-rgb, 194 65 12), 0.25);
    color: var(--app-dark, #c2410c);
}

[data-theme="light"] .adv3-tech-chip:hover {
    background: rgba(var(--app-dark-rgb, 194 65 12), 0.15);
    border-color: rgba(var(--app-dark-rgb, 194 65 12), 0.5);
}

[data-theme="light"] .adv3-dev-link,
[data-theme="light"] .adv3-read-more,
[data-theme="light"] .adv3-dev-icon {
    color: var(--app-dark, #c2410c);
}

[data-theme="light"] .adv3-category-label {
    color: var(--app-dark, #c2410c);
}

[data-theme="light"] .adv3-play {
    background: rgba(var(--app-dark-rgb, 194 65 12), 0.08);
    border-color: rgba(var(--app-dark-rgb, 194 65 12), 0.3);
    color: var(--app-dark, #c2410c);
}

[data-theme="light"] .adv3-play:hover {
    background: rgba(var(--app-dark-rgb, 194 65 12), 0.15);
    border-color: rgba(var(--app-dark-rgb, 194 65 12), 0.5);
}

[data-theme="light"] .adv3-feat-emoji-bg {
    background: rgba(var(--app-dark-rgb, 194 65 12), 0.08);
    border-color: rgba(var(--app-dark-rgb, 194 65 12), 0.2);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .adv3-features-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .adv3-hero { padding: 80px 0 0; }
    .adv3-identity { flex-direction: column; align-items: center; text-align: center; }
    .adv3-icon-frame { width: 96px; height: 96px; border-radius: 22px; }
    .adv3-icon-img { width: 96px; height: 96px; border-radius: 22px; }
    .adv3-icon-svg-fallback { width: 96px; height: 96px; border-radius: 22px; }
    .adv3-icon-svg-fallback svg { width: 64px; height: 64px; }
    .adv3-app-name { font-size: clamp(28px, 8vw, 42px); }
    .adv3-short-desc { max-width: 100%; }
    .adv3-meta-row, .adv3-cta-row { justify-content: center; }
    .adv3-quick-stats { flex-wrap: wrap; gap: 0; }
    .adv3-stat-item { padding: 12px 16px; }
    .adv3-stat-div { display: none; }
    .adv3-features-grid { grid-template-columns: 1fr; }
    .adv3-info-grid { grid-template-columns: 1fr; gap: 0; }
    .adv3-info-block + .adv3-info-block { padding-top: 40px; }
    .adv3-final-cta { padding: 60px 0 100px; }
    .adv3-final-heading { font-size: clamp(28px, 7vw, 42px); }
    .adv3-final-btns { flex-direction: column; align-items: center; }
    .adv3-sticky {
        min-width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
        bottom: -140px;
        flex-wrap: wrap;
    }
    .adv3-sticky-visible { bottom: 12px; }
    .adv3-sticky-btns { width: 100%; justify-content: center; }
    .adv3-section { padding: 44px 0; }
}

@media (max-width: 480px) {
    .adv3-cta-row { flex-direction: column; align-items: center; }
    .adv3-store-btn { justify-content: center; width: 100%; max-width: 280px; }
}
