@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;900&family=Luckiest+Guy&family=Montserrat:wght@900&display=swap');

:root {
    /* Fortnite Palette */
    --fn-blue-dark: #0a0e17;
    --fn-blue-mid: #141b2b;
    --fn-blue-bright: #007bff;
    --fn-accent: #f8c146;

    /* Rarity Gradients */
    --rarity-common: linear-gradient(180deg, #b1b1b1 0%, #767676 100%);
    --rarity-uncommon: linear-gradient(180deg, #60ab28 0%, #306a10 100%);
    --rarity-rare: linear-gradient(180deg, #2992ef 0%, #15458a 100%);
    --rarity-epic: linear-gradient(180deg, #b359fe 0%, #5d229a 100%);
    --rarity-legendary: linear-gradient(180deg, #f3af19 0%, #9c5c0d 100%);
    --rarity-mythic: linear-gradient(180deg, #ffde4d 0%, #f6ab12 100%);
    --rarity-marvel: linear-gradient(180deg, #ed1d24 0%, #820e12 100%);
    --rarity-icon: linear-gradient(180deg, #2cc5ff 0%, #0c6a9a 100%);
    --rarity-starwars: linear-gradient(180deg, #000000 0%, #3e3e3e 100%);

    /* UI Tokens */
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-fn: 0 10px 30px rgba(0, 0, 0, 0.5);
    --font-heading: 'Luckiest Guy', cursive;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--fn-blue-dark);
    background-image:
        radial-gradient(circle at 50% 0%, #1a2a44 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, #111b2b 0%, var(--fn-blue-dark) 100%);
    background-attachment: fixed;
    /* Improved background stability */
    color: #fff;
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.5;
    /* Anti-Copy */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container {
    max-width: 1100px;
    /* More focused framing */
    margin: 2rem auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
    background: rgba(13, 20, 36, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

/* Header & Logo */
header {
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fn-logo {
    height: 60px;
    filter: drop-shadow(0 0 10px rgba(0, 123, 255, 0.3));
    transition: transform 0.3s;
}

.fn-logo:hover {
    transform: scale(1.05);
}

.live-users {
    background: rgba(0, 0, 0, 0.6);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #4cd964;
    border-radius: 50%;
    box-shadow: 0 0 10px #4cd964;
    animation: pulse 1.5s infinite;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 5rem);
    text-transform: uppercase;
    -webkit-text-stroke: 2px #fff;
    color: transparent;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    line-height: 1;
}

.hero p {
    color: #a0aec0;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Controls (Filter & Search) */
.shop-controls {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.search-bar {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    background: var(--glass);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem 1rem 3.5rem;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
}

.search-bar input:focus {
    border-color: var(--fn-blue-bright);
    outline: none;
    background: rgba(255, 255, 255, 0.08);
}

.search-bar i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
}

.rarity-filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    width: 100%;
    padding: 5px;
    justify-content: center;
}

.filter-btn {
    background: var(--fn-blue-mid);
    border: 1px solid var(--glass-border);
    color: #718096;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
    text-transform: uppercase;
}

.filter-btn:hover {
    color: #fff;
    border-color: #fff;
}

.filter-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Skin Grid */
.skin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.skin-card {
    background: var(--fn-blue-mid);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skin-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #fff;
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.skin-img-wrapper {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at center, #233454, #121c30);
}

.skin-card.legendary .skin-img-wrapper {
    background: var(--rarity-legendary);
}

.skin-card.epic .skin-img-wrapper {
    background: var(--rarity-epic);
}

.skin-card.rare .skin-img-wrapper {
    background: var(--rarity-rare);
}

.skin-card.uncommon .skin-img-wrapper {
    background: var(--rarity-uncommon);
}

.skin-card.marvel .skin-img-wrapper {
    background: var(--rarity-marvel);
}

.skin-card.icon .skin-img-wrapper {
    background: var(--rarity-icon);
}

.skin-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

.skin-card:hover .skin-img-wrapper img {
    transform: scale(1.1);
}

.claim-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 123, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.skin-card:hover .claim-overlay {
    opacity: 1;
}

.claim-badge {
    background: #fff;
    color: #000;
    padding: 0.5rem 1rem;
    font-weight: 900;
    border-radius: 50px;
    font-size: 0.8rem;
    transform: translateY(20px);
    transition: 0.3s;
}

.skin-card:hover .claim-badge {
    transform: translateY(0);
}

.skin-info {
    padding: 1.2rem;
    background: linear-gradient(0deg, #121c30 0%, #1a2a44 100%);
}

.skin-name {
    font-weight: 900;
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.skin-rarity-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #718096;
    font-weight: 800;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #141b2b;
    border: 2px solid var(--fn-blue-bright);
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    transform: translateY(20px);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 50px rgba(0, 123, 255, 0.3);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #718096;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Multi-step Logic UI */
.step {
    display: none;
}

.step.active {
    display: block;
}

.modal-header h2 {
    font-family: var(--font-heading);
    color: var(--fn-accent);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: #718096;
    margin-bottom: 2rem;
}

.selected-preview {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
}

.selected-preview img {
    height: 70px;
    width: 70px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--glass);
}

/* Inputs & Buttons */
.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.fn-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
}

.fn-input:focus {
    border-color: var(--fn-blue-bright);
    outline: none;
}

/* Offer Visibility & Highlighting (Round 2 Redesign) */
.offer-item {
    position: relative;
    margin-bottom: 20px;
}

.offer-btn {
    background: #1a2334 !important;
    /* Solid dark blue */
    border-left: 5px solid var(--fn-blue-bright) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 4px solid #000 !important;
    border-radius: 8px !important;
    padding: 1.2rem 1.5rem !important;
    text-decoration: none !important;
    color: #fff !important;
    display: block !important;
    transform: none !important;
    transition: 0.15s !important;
    text-align: left !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
}

.offer-btn:hover {
    background: #23304a !important;
    border-left-color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6) !important;
}

.highlight-offer .offer-btn {
    background: linear-gradient(90deg, #1e2a44 0%, #152238 100%) !important;
    border-left: 5px solid var(--fn-accent) !important;
    box-shadow: 0 0 25px rgba(248, 193, 70, 0.15) !important;
}

.easy-tag {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--fn-accent);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: 900;
    font-size: 0.8rem;
    z-index: 10;
    text-transform: uppercase;
    box-shadow: 2px 2px 0 #000;
    letter-spacing: 1px;
}

.vbucks-bonus {
    color: var(--fn-accent) !important;
    font-size: 0.8rem !important;
    margin-top: 10px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(248, 193, 70, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    width: fit-content;
}

#terminalLog {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #e2e8f0;
    text-align: left;
    background: #080c14;
    padding: 1.5rem;
    border-radius: 12px;
    height: 180px;
    overflow-y: auto;
    border: 2px solid #1a2a44;
    line-height: 1.8;
}

#terminalLog div {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateX(-10px);
    animation: slideInTerminal 0.3s forwards;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding: 4px 0;
}

#terminalLog div::before {
    content: '→';
    color: var(--fn-blue-bright);
    font-weight: 900;
}

/* The Official Slanted Button */
.fn-btn {
    width: 100%;
    padding: 1.2rem;
    background: #f8c146;
    color: #000;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transform: skewX(-10deg);
    transition: 0.1s;
    box-shadow: 8px 8px 0 #9c5c0d;
    margin-top: 1rem;
    overflow: hidden;
}

@keyframes slideInTerminal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fn-btn span {
    display: block;
    transform: skewX(10deg);
    /* Counter skew for text */
}

.fn-btn:hover {
    transform: skewX(-10deg) translate(-2px, -2px);
    box-shadow: 10px 10px 0 #9c5c0d;
}

.fn-btn:active {
    transform: skewX(-10deg) translate(4px, 4px);
    box-shadow: 2px 2px 0 #9c5c0d;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 2rem;
}

.pb-item {
    background: var(--glass);
    border: 2px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: 0.2s;
}

.pb-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.pb-item.active {
    border-color: var(--fn-blue-bright);
    background: rgba(0, 123, 255, 0.1);
}

.pb-item i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* Status Notifications */
.status-toast {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: #1a2a44;
    border: 1px solid var(--fn-blue-bright);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    transform: translateX(-150%);
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
}

.status-toast.active {
    transform: translateX(0);
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Human Verification Box */
.human-verify-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(248, 193, 70, 0.05);
    border: 2px dashed var(--fn-accent);
    border-radius: 15px;
    text-align: center;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .rarity-filters {
        justify-content: flex-start;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .skin-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
    }
}
/* Challenge Frame for Step 3 */
.challenge-frame {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 600px) {
    .challenge-frame { padding: 0.8rem !important; margin: 1rem 0 !important; }
    .offer-btn { padding: 0.8rem 1rem !important; }
    .offer-btn div div:first-child { font-size: 0.85rem !important; }
    .vbucks-bonus { font-size: 0.7rem !important; padding: 4px 8px !important; margin-top: 5px !important; }
}
