/* ===== FORTNITE ITEM SHOP — REAL IMAGES THEME ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --fn-blue: #1A78F2;
    --fn-blue-dark: #0f4c9b;
    --fn-yellow: #F3AF19;
    --fn-yellow-hover: #ffd359;
    --fn-cyan: #00E5FF;
    --fn-purple: #A653EF;
    --fn-lava: #FF6B00;
    --fn-dark: #0a0d14;
    --fn-card: rgba(18, 22, 34, 0.92);
    --fn-card-solid: #121622;
    --border-w: 3px;
    --font-head: 'Luckiest Guy', cursive;
    --font-body: 'Open Sans', sans-serif;
}

body {
    background-color: var(--fn-dark);
    color: #fff;
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* ===== LAYERED BACKGROUND ===== */
.fn-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -3;
    background: url('fn-bg.png') center center / cover no-repeat;
    filter: brightness(0.65) saturate(1.4);
}

.fn-bg-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2;
    background: 
        radial-gradient(ellipse at 50% 50%, rgba(10, 13, 20, 0.2) 0%, rgba(10, 13, 20, 0.6) 80%);
}

.grid-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1;
    background-image: 
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveGrid 25s linear infinite;
}

@keyframes moveGrid {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Floating skins removed */

/* ===== HEADER ===== */
.logo-wrapper {
    text-align: center;
    padding: 30px 0 10px;
    position: relative; z-index: 2;
}

.vbucks-hero-icon {
    width: 80px; height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.5));
    margin: 0 auto 10px;
    display: block;
    animation: pulseCoin 2s ease-in-out infinite;
}
@keyframes pulseCoin { 0%,100%{transform:scale(1);} 50%{transform:scale(1.1);} }

.fn-logo {
    font-family: var(--font-head);
    font-size: 52px;
    color: var(--fn-yellow);
    letter-spacing: 3px;
    text-shadow: 4px 4px 0px #000, 0 0 30px rgba(243, 175, 25, 0.4);
    line-height: 1;
    margin-bottom: 10px;
}

.fn-badge {
    display: inline-block;
    background: var(--fn-cyan);
    color: #000;
    font-family: var(--font-head);
    padding: 6px 20px;
    font-size: 18px;
    letter-spacing: 1px;
    border: 3px solid #000;
    box-shadow: 3px 3px 0 #000;
    transform: skewX(-5deg);
}

/* Trust Banner */
.trust-banner {
    display: flex; align-items: center; gap: 10px; justify-content: center;
    background: linear-gradient(90deg, rgba(0,229,255,0.08), rgba(0,229,255,0.15), rgba(0,229,255,0.08));
    border: 1px solid rgba(0,229,255,0.2); border-radius: 40px;
    padding: 8px 24px; margin-top: 20px; margin-bottom: 5px;
    font-size: 13px; font-weight: 700; color: #94a3b8;
    backdrop-filter: blur(10px);
    animation: trustPulse 3s ease-in-out infinite;
}
.trust-banner strong { color: #00e5ff; }
.trust-icon { font-size: 18px; }
@keyframes trustPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(0,229,255,0); }
    50% { box-shadow: 0 0 20px rgba(0,229,255,0.15); }
}

/* Countdown Timer */
.countdown-strip {
    display: flex; align-items: center; gap: 12px; justify-content: center;
    margin-top: 12px; font-family: var(--font-head);
    font-size: 16px; color: #94a3b8;
    letter-spacing: 1px;
}
.timer-digits {
    color: #ef4444; font-size: 22px;
    text-shadow: 0 0 12px rgba(239,68,68,0.5);
    letter-spacing: 3px;
    animation: timerBlink 1s step-end infinite;
}
@keyframes timerBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===== MAIN LAYOUT ===== */
.main-content {
    width: 100%; max-width: 950px;
    padding: 0 15px 50px;
    display: flex; flex-direction: column; align-items: center;
    position: relative; z-index: 1;
}

.fn-card {
    background: var(--fn-card);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    position: relative;
}

.wizard-box {
    width: 100%;
    padding: 40px;
    margin-top: 20px;
}

.step { display: none; width: 100%; }
.step.active { display: block; animation: fnPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes fnPop { 
    from { opacity: 0; transform: scale(0.95) translateY(20px); } 
    to { opacity: 1; transform: scale(1) translateY(0); } 
}

.fn-heading {
    font-family: var(--font-head);
    font-size: 36px; text-align: center; margin-bottom: 10px;
    color: #fff; letter-spacing: 2px;
    text-shadow: 3px 3px 0px #000;
}
.pulse-text { animation: pulseTxt 1.5s infinite; }
@keyframes pulseTxt { 0%,100%{transform:scale(1);} 50%{transform:scale(1.05);} }

.fn-sub {
    font-size: 15px; color: #94a3b8; text-align: center; margin-bottom: 30px;
    font-weight: 700; max-width: 600px; margin-left: auto; margin-right: auto;
}

/* ===== SKIN CARDS GRID ===== */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-bottom: 25px;
}

.gift-card {
    width: calc(33.333% - 15px);
    min-width: 250px;
    max-width: 300px;
    height: 340px;
    position: relative;
    background: radial-gradient(circle at top, #1e2640 0%, #141b30 70%);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; flex-direction: column;
}

.gift-card::before {
    content:''; position: absolute; top:0; left:0; width:100%; height:4px;
    background: var(--fn-blue);
}
.gift-card.gc-epic::before { background: var(--fn-purple); }
.gift-card.gc-legendary::before { background: linear-gradient(90deg, var(--fn-lava), #FFD700); }

.gift-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}
.gift-card.selected {
    border-color: var(--fn-cyan);
    box-shadow: 0 0 30px rgba(0,229,255,0.3), 0 15px 40px rgba(0,0,0,0.5);
}
.gift-card.gc-epic.selected { border-color: var(--fn-purple); box-shadow: 0 0 30px rgba(166,83,239,0.3); }
.gift-card.gc-legendary.selected { border-color: var(--fn-lava); box-shadow: 0 0 30px rgba(255,107,0,0.3); }

.gc-rarity {
    position: absolute; top: 12px; left: 12px;
    font-family: var(--font-head); font-size: 12px; letter-spacing: 1px;
    padding: 4px 10px; border-radius: 6px; z-index: 5;
}
.gc-rarity.rare { background: var(--fn-blue); color: #fff; }
.gc-rarity.epic { background: var(--fn-purple); color: #fff; }
.gc-rarity.legendary { background: linear-gradient(135deg, var(--fn-lava), #FFD700); color: #000; }

.gc-badge {
    position: absolute; top: 12px; right: 12px;
    background: var(--fn-yellow); color: #000; font-family: var(--font-head);
    font-size: 11px; padding: 4px 10px; border-radius: 6px; z-index: 5;
}

.gc-skin-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    position: absolute; overflow: hidden;
    padding: 15px; /* Just a tiny padding so they don't hit the very edges */
    background: radial-gradient(circle at 50% 50%, rgba(0,229,255,0.08) 0%, transparent 80%);
}
.gc-skin-img img {
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s, filter 0.3s;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.7));
}
.gift-card:hover .gc-skin-img img { transform: scale(1.08); }
.gift-card.selected .gc-skin-img img { filter: drop-shadow(0 15px 35px rgba(0,229,255,0.5)); }

.gc-info {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 40px 15px 15px; text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 40%, transparent 100%);
    border-top: none;
    z-index: 10;
}
.gc-name { font-family: var(--font-head); font-size: 22px; color: #fff; text-shadow: 2px 2px 0 #000; margin-bottom: 4px; }
.gc-vbucks { font-family: var(--font-head); font-size: 16px; color: var(--fn-cyan); margin-bottom: 4px; }
.gc-tag { font-size: 11px; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

/* Shopping Style Overrides */
.shop-timer {
    position: absolute; top: 12px; left: 12px;
    background: rgba(0,0,0,0.6); color: #fff;
    font-family: var(--font-head); font-size: 13px;
    padding: 4px 10px; border-radius: 6px; z-index: 5;
    border: 1px solid rgba(255,255,255,0.1);
}

.shop-price-row {
    display: flex; justify-content: center; align-items: center; gap: 10px;
    margin-bottom: 6px;
}

.old-price {
    display: flex; align-items: center; gap: 4px;
    font-family: var(--font-head); font-size: 16px; color: #94a3b8;
    position: relative;
}
.old-price del {
    text-decoration: line-through; text-decoration-color: #ef4444; text-decoration-thickness: 2px;
}
.vbucks-icon-sm { width: 16px; height: 16px; filter: grayscale(0.2); opacity: 0.8; }
.new-price {
    font-family: var(--font-head); font-size: 18px; color: var(--fn-yellow);
    text-shadow: 1px 1px 0 #000;
}

/* ===== FEATURED SHOWCASE ===== */
.featured-showcase {
    display: flex; gap: 20px; align-items: center;
    background: linear-gradient(135deg, rgba(26,120,242,0.1), rgba(166,83,239,0.05));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px; padding: 20px; margin-top: 5px;
}
.showcase-left { flex-shrink: 0; }
.showcase-skin-large {
    height: 150px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.6));
    animation: floatCard 4s ease-in-out infinite;
}
@keyframes floatCard { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-8px);} }

.showcase-right { flex: 1; }
.showcase-badge {
    display: inline-block; font-family: var(--font-head); font-size: 12px;
    background: var(--fn-yellow); color: #000; padding: 3px 12px; border-radius: 6px;
    margin-bottom: 8px;
}
.showcase-name { font-family: var(--font-head); font-size: 28px; color: #fff; text-shadow: 2px 2px 0 #000; margin-bottom: 6px; }
.showcase-desc { font-size: 13px; color: #94a3b8; font-weight: 700; line-height: 1.5; margin-bottom: 12px; }
.showcase-stats { display: flex; gap: 20px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-head); font-size: 18px; color: var(--fn-cyan); }
.stat-label { font-size: 10px; color: #64748b; font-weight: 700; text-transform: uppercase; }

/* ===== FORM INPUTS ===== */
.input-group { margin-bottom: 25px; }
.input-group label, .label-platform {
    display: block; font-family: var(--font-head); font-size: 18px; color: #fff;
    text-shadow: 2px 2px 0 #000; margin-bottom: 10px; letter-spacing: 1px;
}
.fn-input {
    width: 100%; background: rgba(0,0,0,0.4); border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 16px 20px; font-family: var(--font-head); font-size: 22px; color: var(--fn-yellow);
    outline: none; transition: 0.2s;
}
.fn-input:focus { border-color: var(--fn-cyan); box-shadow: 0 0 15px rgba(0,229,255,0.2); }
.fn-input::placeholder { color: #334155; font-family: var(--font-head); }

/* Device Selector */
.device-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 30px;
}
.device-btn {
    background: rgba(0,0,0,0.3); border: 2px solid rgba(255,255,255,0.1); border-radius: 10px;
    padding: 15px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px;
    cursor: pointer; color: #94a3b8; transition: all 0.2s;
}
.plat-icon { height: 45px; max-width: 80px; transition: 0.2s; filter: grayscale(0.2) opacity(0.9); object-fit: contain; margin-bottom: 2px; }
.device-btn span { font-family: var(--font-head); font-size: 14px; letter-spacing: 0.5px; }
.device-btn:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.05); color: #fff; }
.device-btn:hover .plat-icon { filter: grayscale(0) opacity(1) drop-shadow(0 0 10px rgba(255,255,255,0.4)); transform: scale(1.1); }
.device-btn.selected {
    background: rgba(0,229,255,0.15); border-color: var(--fn-cyan); color: #fff;
    box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.1);
}
.device-btn.selected .plat-icon { filter: grayscale(0) opacity(1) drop-shadow(0 0 15px rgba(0,229,255,0.6)); transform: scale(1.15); }

.step-buttons { text-align: center; margin-top: 25px; display:flex; gap:15px; justify-content:center; }

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--fn-yellow); color: #000; font-family: var(--font-head);
    border: none; border-radius: 10px; padding: 18px 40px; font-size: 24px; letter-spacing: 2px;
    cursor: pointer; transition: 0.2s; display: inline-block; position: relative; overflow: hidden;
    box-shadow: 0 6px 20px rgba(243,175,25,0.3);
}
.btn-primary span { display: block; position: relative; z-index: 2; }
.btn-primary::after {
    content:''; position: absolute; top:0; left:-100%; width: 50%; height: 100%;
    background: rgba(255,255,255,0.3); transform: skewX(-20deg); transition: 0s;
}
.btn-primary:hover:not(:disabled) { background: var(--fn-yellow-hover); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(243,175,25,0.4); }
.btn-primary:hover:not(:disabled)::after { left: 200%; transition: 0.5s ease-in-out; }
.btn-primary:disabled { background: #333; cursor: not-allowed; box-shadow: none; color: #555; }

.btn-primary.error-btn { background: #FF4A4A; color: #fff; box-shadow: 0 6px 20px rgba(255,74,74,0.3); }
.btn-primary.error-btn:hover:not(:disabled) { background: #ff6b6b; }

.btn-back {
    background: transparent; color: #94a3b8; font-family: var(--font-head);
    border: 2px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 18px 25px; font-size: 18px;
    cursor: pointer; transition: 0.2s;
}
.btn-back:hover { background: rgba(255,255,255,0.05); color: #fff; }

/* ERROR SHAKE */
.shake { animation: shake 0.4s ease; }
@keyframes shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-8px);} 75%{transform:translateX(8px);} }

/* ===== SYNC HUB (Step 3) ===== */
.sync-hub {
    background: rgba(0,0,0,0.5); border: 2px solid rgba(255,255,255,0.08); border-radius: 16px;
    padding: 30px; margin-top: 20px;
    display: flex; flex-direction: column; align-items: center;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}

.vbucks-spin-wrap {
    width: 100px; height: 100px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center;
}
.vbucks-coin {
    width: 90px; height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 0 25px rgba(0, 229, 255, 0.6));
    animation: coinPulse 2s ease-in-out infinite;
}
@keyframes coinPulse { 
    0%,100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.4)); } 
    50% { transform: scale(1.15); filter: drop-shadow(0 0 35px rgba(0, 229, 255, 0.8)); } 
}

.sync-target {
    text-align: center; margin-bottom: 25px; font-family: var(--font-head);
    font-size: 20px; letter-spacing: 1px; text-shadow: 2px 2px 0 #000;
}

.fn-progress {
    width: 100%; max-width: 400px;
    height: 28px; background: rgba(10,15,30,0.9); border: 2px solid rgba(0,229,255,0.25);
    border-radius: 14px; overflow: hidden; position: relative;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.6);
}
.fn-progress-fill {
    height: 100%; width: 0%; border-radius: 14px;
    background: linear-gradient(90deg, #1a78f2, #00e5ff, #00ffcc);
    background-size: 300% 100%;
    animation: progressShimmer 2s linear infinite;
    transition: width 1s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 20px rgba(0,229,255,0.6), inset 0 -2px 4px rgba(0,0,0,0.3);
    position: relative;
}
.fn-progress-fill::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: fillGlow 1.5s ease-in-out infinite;
}
@keyframes progressShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
@keyframes fillGlow {
    0%,100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.fn-progress-pct {
    font-family: var(--font-head); font-size: 32px; color: var(--fn-yellow); text-shadow: 2px 2px 0 #000;
    margin-bottom: 20px;
}

.sync-log {
    width: 100%; max-width: 500px;
    background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px;
    padding: 15px; text-align: left;
    font-family: 'Courier New', monospace; font-size: 12px; font-weight: 700; color: #94a3b8;
    height: 130px; overflow-y: auto;
}
.sync-log .ok { color: #22c55e; }
.sync-log .act { color: var(--fn-yellow); }
.sync-log .err { color: #FF4A4A; font-weight: 800; }

/* ===== LIVE ACTIVITY ===== */
.live-activity {
    margin-top: 20px; display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: #64748b; font-weight: 700;
}
.live-dot {
    width: 8px; height: 8px; background: #22c55e; border-radius: 50%;
    box-shadow: 0 0 8px #22c55e; animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

/* ===== FINAL CPA MODAL ===== */
.cpa-modal {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.9); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    z-index: 1000;
}
.cpa-box {
    background: linear-gradient(180deg, #1e2640 0%, #0d1222 100%);
    border: 3px solid var(--fn-cyan); border-radius: 16px;
    padding: 40px; text-align: center; max-width: 500px; width: 90%;
    box-shadow: 0 0 50px rgba(0,229,255,0.3);
    position: relative;
}
.cpa-heading { font-family: var(--font-head); font-size: 36px; color: #ef4444; margin-bottom: 15px; }
.cpa-text { font-size: 16px; color: #cbd5e1; margin-bottom: 25px; line-height: 1.5; }
.cpa-highlight { color: #fff; font-weight: 700; }

/* V-Bucks Bonus Selection Step */
.vbucks-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}
.vb-card {
    width: calc(50% - 10px);
    max-width: 200px;
    height: 220px; 
    background: radial-gradient(circle at 50% 50%, rgba(0,229,255,0.1) 0%, transparent 80%), linear-gradient(180deg, #1a223a 0%, #0d1222 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 20px;
    border-radius: 12px;
}
.vb-card img {
    height: 90px; width: auto; max-width: 100%;
    filter: drop-shadow(0 10px 15px rgba(0,229,255,0.4));
    transition: transform 0.3s;
    margin-bottom: 15px;
    position: static; /* override gc-skin-img if applied */
}
.vb-card:hover img { transform: scale(1.15) rotate(5deg); }
.vb-amt {
    font-family: var(--font-head); font-size: 22px; color: var(--fn-yellow);
    text-shadow: 2px 2px 0 #000;
    margin-top: auto;
    z-index: 10;
}

/* ===== MODAL ===== */
.sec-modal-overlay {
    position: fixed; top:0; left:0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
    display: none; align-items: center; justify-content: center; z-index: 1000;
}
.sec-modal {
    width: 450px; max-width: 95%; overflow: hidden;
    animation: fnPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sec-header {
    background: #FF4A4A; padding: 20px; text-align: center;
    border-bottom: 3px solid rgba(0,0,0,0.3);
}
.sec-header h3 { font-family: var(--font-head); color: white; font-size: 28px; letter-spacing: 2px; text-shadow: 2px 2px 0 #000; margin:0;}

.sec-body { padding: 30px; text-align: center; }
.sec-body p { margin-bottom: 15px; font-size: 15px; font-weight: 700; color: #ccc; line-height: 1.6;}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .gift-card { width: calc(50% - 10px); }
    .fn-logo { font-size: 34px; }
    .fn-heading { font-size: 28px; }
    .btn-primary { font-size: 20px; padding: 15px 30px; }
    .device-grid { grid-template-columns: 1fr 1fr; }
    .featured-showcase { flex-direction: column; text-align: center; }
    .showcase-stats { justify-content: center; }
    .floating-skins { display: none; }
}
@media (max-width: 480px) {
    .wizard-box { padding: 20px 15px; }
    .gift-card { width: 100%; max-width: 320px; }
    .vb-card { width: 100%; max-width: 250px; }
    .fn-logo { font-size: 28px; }
    .fn-badge { font-size: 14px; }
    .step-buttons { flex-direction: column; }
}
