/*
 * Landing page styles (group 5 only)
 * Variables remapped to store2 palette.
 * This file is loaded in main.tpl for [group=5] only.
 */

:root {
    --bg-base:        #090909;
    --bg-surface:     #131313;
    --bg-input:       #191919;
    --text-primary:   #eeeeee;
    --text-secondary: #999999;
    --border-color:   #2a2a2a;
    --accent-color:   #ffffff;
    --accent-text:    #000000;
    --disabled-bg:    #333333;
    --disabled-text:  #666666;
    --danger-color:   #ff453a;
    --success-color:  #32d74b;
}

/* --- WRAPPER --- */
.app-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: clip;
}

/* --- BACKGROUND GRADIENT --- */
.bg-gradient {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 90vh;
    background:
        radial-gradient(circle at 15% 0%,  rgba(0,212,255,.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 5%,  rgba(255,0,85,.06)  0%, transparent 50%),
        radial-gradient(circle at 50% -10%,rgba(0,100,255,.12) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
    animation: bg-breathe 15s ease-in-out infinite alternate;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
    mask-image:         linear-gradient(to bottom, black 0%, transparent 100%);
}
@keyframes bg-breathe {
    0%   { transform: translateY(0)     scale(1.1);  opacity: .3; }
    100% { transform: translateY(-10px) scale(1.5);  opacity: 1;  }
}

/* --- FLOATING CLIPS (decorative BG) --- */
.bg-floating-clips {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.bg-float-item {
    position: absolute;
    border-radius: 12px;
    filter: blur(5px) brightness(.45) opacity(.3);
    box-shadow: 0 10px 30px rgba(0,0,0,.8);
    border: 1px solid rgba(255,255,255,.1);
    will-change: transform;
    transform: translateZ(0);
}
.pos-1 { top:18%; left:-4%;  width:160px; animation: bgFloat1 14s ease-in-out infinite alternate; }
.pos-2 { top:32%; right:-2%; width:140px; animation: bgFloat2 17s ease-in-out infinite alternate-reverse; }
.pos-3 { top:48%; left:3%;   width:190px; animation: bgFloat1 15s ease-in-out infinite alternate; }
.pos-4 { top:65%; right:-5%; width:170px; animation: bgFloat2 16s ease-in-out infinite alternate-reverse; }
.pos-5 { top:80%; left:-2%;  width:150px; animation: bgFloat1 13s ease-in-out infinite alternate; }
.pos-6 { top:92%; right:4%;  width:180px; animation: bgFloat2 18s ease-in-out infinite alternate-reverse; }
@keyframes bgFloat1 {
    0%   { transform: translateY(0)     rotate(-15deg) scale(1);    }
    100% { transform: translateY(-60px) rotate(-5deg)  scale(1.05); }
}
@keyframes bgFloat2 {
    0%   { transform: translateY(0)     rotate(10deg)  scale(1);    }
    100% { transform: translateY(-70px) rotate(20deg)  scale(.95);  }
}

/* --- MAIN CONTAINER --- */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 0;
    position: relative;
    z-index: 20;
}
.store-container {
    max-width: 1440px;
    width: 100%;
    padding: 0 32px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- APP HEADER BLOCK --- */
.app-header {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    margin-bottom: 2rem;
}
.app-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg,#222 0%,#111 100%);
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 12px 24px rgba(0,0,0,.5);
    flex-shrink: 0;
    background-image: url({THEME}/imgs/packicon.webp);
    background-size: cover;
    border-radius: 18px;
}
.app-meta    { display: flex; flex-direction: column; justify-content: center; }
.app-title   { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; line-height: 1.1; white-space: nowrap; }
.app-developer { font-size: 13px; font-weight: 500; color: var(--text-secondary); }

/* --- MAIN VIEWER (video embed) --- */
.main-viewer {
    width: 100%; aspect-ratio: 16/9;
    background: #000; border-radius: 16px;
    overflow: hidden; border: 1px solid var(--border-color);
    margin-bottom: 20px; position: relative;
}
.main-viewer img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute; top: 0; left: 0; border: none; display: block;
}

/* --- DETAILS SECTION --- */
.details-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
}
.description-block {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}
.description-block h3 { font-size: 22px; font-weight: 600; margin-bottom: 24px; text-align: center; }
.description-block p  { font-size: 15px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 16px; }

/* --- COMPARISON --- */
.comparison-section    { margin-top: 48px; }
.comparison-section h3 { margin-bottom: 24px; text-align: center; }
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.comparison-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px; padding: 24px;
    display: flex; flex-direction: column; gap: 16px;
    position: relative; overflow: hidden;
}
.comparison-card.before { border-top: 3px solid rgba(255,69,58,.4); }
.comparison-card.after  {
    border-top: 3px solid rgba(0,212,255,.6);
    border-color: rgba(0,212,255,.15);
    background: linear-gradient(180deg, rgba(0,212,255,.03) 0%, rgba(20,20,20,0) 100%), var(--bg-surface);
}
.comparison-header { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.comparison-card.before .comparison-header { color: var(--danger-color); opacity: .8; }
.comparison-card.after  .comparison-header { color: #00d4ff; }
.comparison-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.comparison-list li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; }
.comparison-card.before .comparison-list li { color: var(--text-secondary); }
.comparison-card.after  .comparison-list li { color: var(--text-primary); }
.icon-cross, .icon-check { width: 18px; height: 18px; flex-shrink: 0; }
.icon-cross { fill: var(--text-secondary); opacity: .5; }
.icon-check { fill: #00d4ff; }

/* --- ACTION SECTION (video grid) --- */
.action-section    { margin-top: 48px; }
.action-section h3 { margin-bottom: 24px; text-align: center; }
.video-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.video-thumb {
    aspect-ratio: 9/16; border-radius: 12px; overflow: hidden;
    background: var(--bg-surface); border: 1px solid var(--border-color);
    position: relative; cursor: pointer;
}
.video-thumb img      { width: 100%; height: 100%; object-fit: cover; opacity: .7; transition: opacity .3s, transform .3s; pointer-events: none; }
.video-thumb:hover img { opacity: 1; transform: scale(1.05); }
.play-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 48px; height: 48px; background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    border: 1px solid rgba(255,255,255,.2); pointer-events: none;
}
.play-icon svg { width: 20px; height: 20px; fill: #fff; margin-left: 4px; }

/* --- PACK CONTENTS ACCORDION --- */
.pack-contents    { margin-top: 48px; }
.pack-contents h3 { margin-bottom: 24px; text-align: center; }
.pack-unified-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: column;
}
.asset-category-section { border-bottom: 1px solid var(--border-color); }
.asset-category-section:last-child { border-bottom: none; }
.category-header {
    padding: 16px 20px;
    background: rgba(255,255,255,.02);
    border-bottom: 1px solid transparent;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none; transition: background .2s;
}
.category-header:hover { background: rgba(255,255,255,.05); }
.asset-category-section.expanded .category-header { border-bottom-color: var(--border-color); }
.category-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.category-header-right { display: flex; align-items: center; gap: 12px; }
.category-badge {
    background: rgba(255,255,255,.08); color: var(--text-secondary);
    font-size: 12px; font-weight: 700; padding: 4px 10px;
    border-radius: 8px; line-height: 1.2; white-space: nowrap; flex-shrink: 0;
}
.accordion-chevron { width: 20px; height: 20px; fill: var(--text-secondary); transition: transform .3s; }
.category-content {
    padding: 0 20px;
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
}
.asset-category-section.expanded .category-content  { padding: 20px; max-height: 2500px; }
.asset-category-section.expanded .accordion-chevron { transform: rotate(180deg); }
.asset-category-section.bonus-category .category-header {
    background: linear-gradient(180deg,rgba(50,215,75,.05) 0%,transparent 100%);
    border-top: 1px solid rgba(50,215,75,.3); margin-top: -1px;
}
.asset-category-section.bonus-category .category-header:hover {
    background: linear-gradient(180deg,rgba(50,215,75,.08) 0%,transparent 100%);
}
.asset-category-section.bonus-category .category-title  { color: var(--success-color); }
.asset-category-section.bonus-category .category-badge  { background: rgba(50,215,75,.2); color: var(--success-color); }
.asset-list {
    list-style: none;
    display: grid; grid-template-columns: 1fr; gap: 8px;
}
.asset-item {
    display: flex; align-items: stretch; gap: 14px;
    padding: 0 16px 0 0;
    background: var(--bg-base); border: 1px solid var(--border-color);
    border-radius: 10px; cursor: pointer; overflow: hidden;
    transition: border-color .2s, background-color .2s;
}
.asset-item:hover       { border-color: #555; background: #1a1a1a; }
.asset-item.no-hover    { cursor: default; }
.asset-item.no-hover:hover { border-color: var(--border-color); background: var(--bg-base); }
.asset-icon {
    width: 75px; min-height: 44px;
    background-color: #000; background-size: cover;
    background-position: center; background-repeat: no-repeat;
    border-right: 1px solid var(--border-color);
    display: flex; justify-content: center; align-items: center; flex-shrink: 0;
}
.asset-icon svg { width: 20px; height: 20px; fill: var(--text-secondary); }
.asset-name {
    align-self: center; font-size: 14px; font-weight: 500;
    padding: 12px 0; line-height: 1.4;
}
.asset-desc {
    align-self: center; font-size: 12px; color: var(--text-secondary);
    margin-left: auto; white-space: nowrap; flex-shrink: 0;
}

/* --- CHECKOUT SECTION --- */
.checkout-section {
    width: 100%; max-width: 600px;
    margin: 64px auto 32px;
    display: flex; flex-direction: column; gap: 32px;
    position: relative; z-index: 25;
}
.checkout-header { text-align: center; display: flex; flex-direction: column; gap: 12px; }
.checkout-header h2 { font-size: 32px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; }
.checkout-header p  { font-size: 16px; color: var(--text-secondary); line-height: 1.5; }
.checkout-card {
    background: var(--bg-surface); border-radius: 18px; padding: 32px;
    display: flex; flex-direction: column; gap: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0,0,0,.35);
    position: relative; overflow: hidden;
}
.info-block { display: flex; flex-direction: column; gap: 14px; }
.info-row {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-color); padding-bottom: 14px;
}
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-label { font-size: 14px; color: var(--text-secondary); }
.info-value { font-size: 14px; font-weight: 600; }
.payment-block { border-top: 1px solid var(--border-color); padding-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.price-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 4px; }
.old-price { font-size: 16px; color: var(--text-secondary); text-decoration: line-through; line-height: 1; }
.current-price-row { display: flex; align-items: flex-start; gap: 12px; justify-content: center; }
.price { font-size: 48px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; }
.sale-badge {
    background: var(--danger-color); color: #fff;
    font-size: 14px; font-weight: 800; padding: 6px 8px;
    border-radius: 8px; letter-spacing: .5px; line-height: 1; margin-top: 4px;
}
.countdown-wrapper {
    background: rgba(255,69,58,.04); border: 1px solid rgba(255,69,58,.15);
    border-radius: 12px; padding: 16px;
}
.countdown-title  { font-size: 13px; color: var(--danger-color); margin-bottom: 10px; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: .5px; }
.countdown-timer  { display: flex; justify-content: center; align-items: flex-start; gap: 8px; }
.time-box         { display: flex; flex-direction: column; align-items: center; width: 48px; }
.time-box span    { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.time-box small   { font-size: 10px; color: var(--text-secondary); margin-top: 4px; text-transform: uppercase; font-weight: 600; }
.colon            { font-size: 20px; font-weight: 800; color: var(--text-secondary); line-height: 1; margin-top: 2px; }
.payment-hint     { font-size: 14px; line-height: 1.5; color: var(--text-secondary); text-align: center; }
.payment-hint span { font-weight: 600; color: var(--text-primary); }

/* Main buy button — gradient with pulse + shine */
.btn-buy-main {
    width: 100%;
    background: var(--c-accent,#0080FF);
    color: #fff; border: none;
    padding: 18px 24px; border-radius: 12px;
    font-family: inherit;
    font-weight: 700; font-size: 16px; cursor: pointer;
    text-align: center;
    transition: transform .2s, filter .2s;
    animation: pulse-shadow 2.6s ease-in-out infinite;
}
.btn-buy-main:hover  { transform: translateY(-2px); filter: brightness(1.08); }
.btn-buy-main:active { transform: translateY(1px); }
@keyframes pulse-shadow {
    0%   { box-shadow: 0 0 0 0  rgba(0,128,255,.45); }
    70%  { box-shadow: 0 0 0 12px rgba(0,128,255,0); }
    100% { box-shadow: 0 0 0 0  rgba(0,128,255,0); }
}
.trust-badges {
    display: flex; justify-content: center; align-items: center;
    flex-wrap: wrap; gap: 8px 14px; margin-top: 2px;
}
.trust-badge { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; color: var(--text-secondary); }
.trust-badge svg { width: 12px; height: 12px; fill: var(--text-secondary); opacity: .65; }

/* --- LANDING FOOTER --- */
.site-footer { border-top: 1px solid var(--border-color); padding: 32px 0; margin-top: auto; position: relative; z-index: 20; }
.footer-content {
    max-width: 1040px; width: 100%; margin: 0 auto; padding: 0 32px;
    display: flex; justify-content: space-between; align-items: center;
    color: var(--text-secondary); font-size: 13px;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--text-primary); }

/* --- MODALS --- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.95); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-container {
    max-width: 960px; width: 100%;
    background: var(--bg-surface); border: 1px solid var(--border-color);
    border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
    transform: scale(.95); transition: transform .3s; max-height: 95vh;
}
.modal-overlay.active .modal-container { transform: scale(1); }
.modal-header {
    padding: 16px 24px; border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-surface); flex-shrink: 0; z-index: 10;
}
.modal-title { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80%; }
.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 28px; cursor: pointer; line-height: 1; padding: 0; }
.modal-close:hover { color: var(--text-primary); }
.modal-body-wrapper {
    position: relative; flex: 1; display: flex;
    background: #000; min-height: 0; flex-direction: column;
}
.modal-body-gallery { display: flex; justify-content: center; align-items: center; width: 100%; flex: 1; padding: 0; position: relative; min-height: 0; }
#modalIframeContainer { display: none; position: relative; margin: 0 auto; max-width: 100%; max-height: 100%; }
#modalIframeContainer.ratio-16-9 { max-width: calc((95vh - 150px) * 16 / 9); aspect-ratio: 16/9; width: 100%; }
#modalIframeContainer.ratio-9-16 { max-width: calc((95vh - 150px) * 9 / 16); aspect-ratio: 9/16; width: 100%; }
.modal-description-box {
    background: rgba(20,20,20,.9); backdrop-filter: blur(10px);
    padding: 16px 48px; text-align: center;
    font-size: 14px; line-height: 1.5; color: var(--text-secondary);
    border-top: 1px solid rgba(255,255,255,.1); display: none;
}
.modal-description-box.active { display: block; }
.modal-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.4); color: white;
    border: 1px solid rgba(255,255,255,.1);
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 20; transition: background .3s, transform .2s, border-color .3s;
    backdrop-filter: blur(4px);
}
.modal-nav:hover { background: rgba(0,0,0,.8); border-color: rgba(255,255,255,.5); transform: translateY(-50%) scale(1.1); }
.modal-nav svg { width: 24px; height: 24px; fill: currentColor; }
.modal-nav.left  { left: 16px; }
.modal-nav.right { right: 16px; }
.modal-footer {
    padding: 16px 24px; border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: flex; justify-content: center; flex-shrink: 0; z-index: 10;
}
.btn-modal-cta {
    width: 100%; max-width: 400px;
    background: var(--accent-color); color: var(--accent-text);
    padding: 14px 24px; border-radius: 10px;
    font-weight: 800; font-size: 15px;
    text-transform: uppercase; letter-spacing: .5px;
    border: none; cursor: pointer;
    animation: cta-pulse-modal 2s infinite;
    transition: transform .1s;
}
.btn-modal-cta:active { transform: scale(.96); }
@keyframes cta-pulse-modal {
    0%   { box-shadow: 0 0 0 0  rgba(255,255,255,.4); }
    70%  { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0  rgba(255,255,255,0); }
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .comparison-grid   { grid-template-columns: 1fr; }
    .details-section   { gap: 40px; padding-top: 24px; }
    .main-content      { padding: 1rem 0; }
    .store-container   { gap: 32px; padding: 0 16px; }
    .app-icon          { width: 72px; height: 72px; border-radius: 16px; }
    .app-title         { font-size: 19px; white-space: nowrap; margin-bottom: 2px; }
    .app-developer     { font-size: 12px; margin-bottom: 10px; }
    .category-header   { padding: 14px 16px; }
    .category-content  { padding: 0 16px; }
    .asset-category-section.expanded .category-content { padding: 16px; }
    .category-title    { font-size: 14px; }
    .asset-item        { padding: 0 12px 0 0; gap: 12px; }
    .asset-name        { font-size: 13px; line-height: 1.3; }
    .asset-icon        { width: 65px; min-height: 40px; }
    .checkout-header h2 { font-size: 26px; }
    .checkout-card     { padding: 24px 16px; }
    .footer-content    { padding: 0 20px; flex-direction: column; gap: 16px; text-align: center; }
    .modal-container   { width: 100%; height: 100%; border-radius: 0; border: none; max-height: 100vh; }
    .modal-nav         { width: 36px; height: 36px; }
    .modal-nav.left    { left: 8px; }
    .modal-nav.right   { right: 8px; }
    #modalIframeContainer.ratio-16-9 { max-width: calc((100vh - 140px) * 16 / 9); }
    #modalIframeContainer.ratio-9-16 { max-width: calc((100vh - 140px) * 9 / 16); }
    .modal-description-box { font-size: 12px; padding: 12px 16px; }
    .pos-1 { width: 100px; left: -10%; }
    .pos-2 { width: 90px;  right: -10%; }
    .pos-3 { width: 110px; left: -5%; }
    .pos-4 { width: 120px; right: -5%; }
    .pos-5 { width: 100px; left: -10%; }
    .pos-6 { width: 90px;  right: -5%; }
}
@media (max-width: 600px) {
    .video-grid         { grid-template-columns: repeat(2,1fr); }
    .btn-modal-cta      { font-size: 13px; padding: 12px 16px; }
    .price              { font-size: 38px; }
    .trust-badges       { flex-direction: column; align-items: center; gap: 12px; }
}
