/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Purple/Pink Starry Night Color Palette */
    --primary-color: #a855f7;          /* Purple */
    --primary-dark: #7c3aed;           /* Dark Purple */
    --secondary-color: #ec4899;       /* Pink */
    --accent-color: #f59e0b;           /* Orange/Amber */
    --success-color: #10b981;          /* Bright Green */
    --warning-color: #f59e0b;          /* Orange */
    --danger-color: #ef4444;           /* Red */
    --purple-light: #c084fc;           /* Light Purple */
    --pink-bright: #f472b6;            /* Bright Pink */
    
    /* Backgrounds - Purple Starry Night theme */
    --bg-primary: #1a0b2e;             /* Dark Purple-Black */
    --bg-secondary: #2d1b3d;           /* Dark Purple */
    --bg-tertiary: #3d2a4d;            /* Medium Purple */
    --bg-card: #2d1b3d;               /* Card Background */
    --bg-modal: #2d1b3d;               /* Modal Background */
    --bg-stats: rgba(45, 27, 61, 0.6); /* Translucent stats background */
    
    /* Text Colors - Purple theme */
    --text-primary: #ffffff;           /* Pure White */
    --text-secondary: #e9d5ff;         /* Light Purple-White */
    --text-muted: #c084fc;             /* Light Purple */
    --text-accent: #ec4899;            /* Pink */
    
    /* Christmas Rarity Colors */
    --legendary-color: #fbbf24;           /* Gold */
    --legendary-glow: rgba(251, 191, 36, 0.6);
    --epic-color: #dc2626;                /* Red */
    --epic-glow: rgba(220, 38, 38, 0.6);
    --rare-color: #16a34a;                /* Green */
    --rare-glow: rgba(22, 163, 74, 0.6);
    --secret-color: #16a34a;              /* Green */
    --secret-glow: rgba(22, 163, 74, 0.6);
    --og-color: #fbbf24;                  /* Gold */
    --og-glow: rgba(251, 191, 36, 0.6);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 8px -1px rgb(0 0 0 / 0.3), 0 2px 6px -2px rgb(0 0 0 / 0.2);
    --shadow-lg: 0 10px 20px -3px rgb(0 0 0 / 0.4), 0 4px 8px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 30px -5px rgb(0 0 0 / 0.5), 0 8px 12px -6px rgb(0 0 0 / 0.4);
    
    /* Purple/Pink Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-hero: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f472b6 100%);
    --gradient-card: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    --gradient-starry: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(236, 72, 153, 0.2) 100%);
    --gradient-night: radial-gradient(ellipse at top left, rgba(236, 72, 153, 0.3) 0%, transparent 50%);
    
    /* Animation Duration */
    --duration-fast: 0.15s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Fonts */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        var(--gradient-night),
        radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(192, 132, 252, 0.1) 0%, transparent 60%);
    position: relative;
}

/* Starry night effect overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20% 30%, white, transparent),
        radial-gradient(1px 1px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(1px 1px at 90% 40%, white, transparent),
        radial-gradient(1px 1px at 33% 60%, white, transparent),
        radial-gradient(1px 1px at 55% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 50%, white, transparent),
        radial-gradient(1px 1px at 70% 20%, white, transparent),
        radial-gradient(1px 1px at 40% 90%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%, 100% 100%, 50% 50%, 0% 100%, 100% 0%, 50% 0%, 100% 50%, 20% 30%, 80% 60%, 40% 80%;
    animation: twinkle 15s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.6;
    z-index: 1;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== iOS REDIRECT POPUP ===== */
.ios-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ios-popup-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.ios-popup-content {
    position: relative;
    background: var(--gradient-card);
    border: 2px solid rgba(220, 38, 38, 0.4);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.4);
    animation: slideInUp 0.5s ease forwards;
}

.ios-gif-container {
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
}

.ios-instruction-gif {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

.ios-instruction-text {
    margin-bottom: 2rem;
}

.ios-instruction-text h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.ios-instruction-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.ios-instruction-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.ios-understand-btn {
    width: 100%;
    margin-top: 1rem;
    background: var(--secondary-color) !important;
    color: #ffffff !important;
    border: 2px solid var(--secondary-color) !important;
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.6) !important;
}

.ios-understand-btn:hover {
    background: #22c55e !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 30px rgba(22, 163, 74, 0.8) !important;
}

/* Responsive iOS popup */
@media (max-width: 480px) {
    .ios-popup-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .ios-instruction-text h3 {
        font-size: 1.25rem;
    }
    
    .ios-instruction-text p {
        font-size: 0.9rem;
    }
}



/* ===== HERO SECTION ===== */
.hero {
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    opacity: 0.1;
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge i {
    color: var(--accent-color);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, #a855f7, #ec4899, #f472b6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: textGlow 2s ease-in-out infinite alternate;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

@keyframes textGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.countdown {
    color: var(--accent-color);
    font-weight: 700;
    font-family: var(--font-heading);
    background: rgba(245, 158, 11, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.hero-cta {
    margin-top: 3rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-primary);
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-normal) ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    padding: 1rem 2rem;
    font-size: 1rem;
    border: 2px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.6), 0 0 10px rgba(236, 72, 153, 0.3);
    font-weight: 700;
    text-transform: uppercase;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-color: rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.8), 0 0 15px rgba(236, 72, 153, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.875rem 1.75rem;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

.btn-claim {
    background: var(--primary-color);
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
    border-radius: var(--radius-lg);
    display: block;
    margin: 0 auto;
    width: fit-content;
    cursor: pointer;
    z-index: 10;
    position: relative;
    border: 2px solid var(--primary-color);
    outline: none;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.6);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.btn-claim:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.8);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.btn-claim:active {
    background: #991b1b;
    border-color: #991b1b;
    transform: translateY(0);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.6);
}

.btn-success {
    background: var(--secondary-color);
    color: #ffffff;
    padding: 1.25rem 2rem;
    font-size: 1.2rem;
    border: 3px solid var(--secondary-color);
    box-shadow: 0 0 30px rgba(22, 163, 74, 0.8);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-success:hover {
    background: #22c55e;
    border-color: #22c55e;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 40px rgba(22, 163, 74, 1);
}

/* ===== ANIMATED BACKGROUND ITEMS ===== */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.bg-item-img {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.15;
    animation: gamingFloat var(--duration, 15s) linear infinite;
    animation-delay: var(--delay, 0s);
    filter: blur(0.5px);
}

.bg-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.5) contrast(1.3);
}

.bg-item-img.gaming {
    width: 100px;
    height: 100px;
    opacity: 0.12;
    filter: blur(0.8px);
}

.bg-item-img.gaming img {
    filter: brightness(1.8) contrast(1.4) saturate(1.5);
}

@keyframes gamingFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.25;
    }
    90% {
        opacity: 0.25;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

/* Gaming effects for background items */
.bg-item-img:nth-child(odd) {
    animation-direction: reverse;
}

.bg-item-img:nth-child(3n) {
    filter: blur(1.2px) hue-rotate(120deg);
}

.bg-item-img:nth-child(4n) {
    filter: blur(0.8px) hue-rotate(240deg);
}

.bg-item-img:nth-child(5n) img {
    filter: brightness(1.5) contrast(1.3) hue-rotate(60deg);
}

/* Different animation speeds for variety */
.bg-item-img:nth-child(even) {
    animation-duration: calc(var(--duration) * 0.8);
}

.bg-item-img:nth-child(5n) {
    animation-duration: calc(var(--duration) * 1.2);
    transform-origin: center center;
}

/* ===== FLOATING ELEMENTS ===== */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-item {
    position: absolute;
    font-size: 2rem;
    opacity: 0.4;
    animation: float var(--duration, 8s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.floating-item:nth-child(1) { top: 20%; left: 10%; }
.floating-item:nth-child(2) { top: 60%; right: 15%; }
.floating-item:nth-child(3) { top: 30%; right: 30%; }
.floating-item:nth-child(4) { top: 80%; left: 20%; }
.floating-item:nth-child(5) { top: 10%; left: 60%; }

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
    }
    50% {
        transform: translateY(-10px) rotate(180deg);
    }
    75% {
        transform: translateY(-30px) rotate(270deg);
    }
}

/* ===== SECTIONS ===== */
/* ===== STATISTICS SECTION ===== */
.stats-section {
    padding: 0.75rem 0 0rem 0;
    position: relative;
    z-index: 2;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.stat-box {
    background: var(--bg-stats);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    border: 1px solid rgba(168, 85, 247, 0.3);
    min-width: 170px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.stat-green {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.stat-pink {
    color: #f472b6;
    text-shadow: 0 0 10px rgba(244, 114, 182, 0.5);
}

.items-section {
    padding: 0.5rem 0 3rem 0;
    position: relative;
    z-index: 2;
}

.main-panel {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    margin-bottom: 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.5rem;
}

.section-title i {
    color: var(--accent-color);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* ===== ITEMS GRID ===== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.item-card {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    padding: 1rem;
    border: 2px solid rgba(168, 85, 247, 0.3);
    transition: all var(--duration-normal) ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.item-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--gradient-starry);
    opacity: 0;
    transition: opacity var(--duration-normal) ease;
    pointer-events: none;
}

.item-card:hover::after {
    opacity: 0.2;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    opacity: 0;
    transition: opacity var(--duration-normal) ease;
}

.item-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.5), 0 0 20px rgba(168, 85, 247, 0.3);
    border-color: #f59e0b;
}

.item-card:hover::before {
    opacity: 1;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rarity-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rarity-badge.legendary {
    background: rgba(255, 215, 0, 0.2);
    color: var(--legendary-color);
    border: 1px solid var(--legendary-color);
}

.rarity-badge.epic {
    background: rgba(147, 51, 234, 0.2);
    color: var(--epic-color);
    border: 1px solid var(--epic-color);
}

.rarity-badge.rare {
    background: rgba(59, 130, 246, 0.2);
    color: var(--rare-color);
    border: 1px solid var(--rare-color);
}

.rarity-badge.secret {
    background: rgba(57, 255, 20, 0.2);
    color: var(--secret-color);
    border: 1px solid var(--secret-color);
    text-shadow: 0 0 5px var(--secret-color);
}

.rarity-badge.og {
    background: rgba(255, 170, 0, 0.2);
    color: var(--og-color);
    border: 1px solid var(--og-color);
    text-shadow: 0 0 5px var(--og-color);
}

.stock-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.item-image {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem;
    border-radius: var(--radius-lg);
    background: rgba(168, 85, 247, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--duration-normal) ease;
}

.item-card:hover .item-image img {
    transform: scale(1.1);
}

.item-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
        opacity: 0;
    transition: opacity var(--duration-normal) ease;
}

.item-card[data-rarity="legendary"]:hover .item-glow {
    background: radial-gradient(circle, var(--legendary-glow) 0%, transparent 70%);
    opacity: 1;
}

.item-card[data-rarity="epic"]:hover .item-glow {
    background: radial-gradient(circle, var(--epic-glow) 0%, transparent 70%);
    opacity: 1;
}

.item-card[data-rarity="rare"]:hover .item-glow {
    background: radial-gradient(circle, var(--rare-glow) 0%, transparent 70%);
    opacity: 1;
}

.item-card[data-rarity="secret"]:hover .item-glow {
    background: radial-gradient(circle, var(--secret-glow) 0%, transparent 70%);
    opacity: 1;
}

.item-card[data-rarity="og"]:hover .item-glow {
    background: radial-gradient(circle, var(--og-glow) 0%, transparent 70%);
    opacity: 1;
}

.item-info {
    text-align: center;
    margin-bottom: 1rem;
}

.item-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.item-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.original-price {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.free-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--success-color);
    font-family: var(--font-heading);
}

/* ===== LOAD MORE SECTION ===== */
.load-more-section {
    text-align: center;
}

/* ===== SOCIAL PROOF ===== */
.social-proof {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.social-proof-content {
    text-align: center;
}

.social-proof-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
}

.testimonial-avatar i {
    font-size: 1.5rem;
    color: white;
}

.testimonial-content p {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

.testimonial-author {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== FOOTER ===== */
.footer {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

.footer-brand i {
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--duration-normal) ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) ease;
}

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

/* Modal Stages */
.modal-stage {
    display: none;
}

.modal-stage.active {
    display: block;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative; 
    background: var(--bg-modal);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.4), 0 0 20px rgba(236, 72, 153, 0.2);
    transform: scale(0.9);
    transition: transform var(--duration-normal) ease;
    background-image: var(--gradient-starry);
}

/* Compact sizing for username/profile modal */
#username-modal {
    align-items: flex-start;
    padding-top: 10vh;
}

#username-modal .modal-content {
    max-width: 280px;
    padding: 0.7rem;
    margin-top: 0;
}

#username-modal .modal-header {
    margin-bottom: 0.6rem;
}

#username-modal .modal-header h3 {
    font-size: 0.8rem;
}

#username-modal .modal-close {
    font-size: 1rem;
    padding: 0.15rem;
}

#username-modal .modal-item-preview {
    padding: 0.4rem;
    margin-bottom: 0.6rem;
    gap: 0.5rem;
}

#username-modal .modal-item-preview img {
    width: 32px;
    height: 32px;
}

#username-modal .modal-item-info h4 {
    font-size: 0.75rem;
    margin-bottom: 0.1rem;
}

#username-modal .modal-item-info span {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
}

#username-modal .form-group {
    margin-bottom: 0.6rem;
}

#username-modal .form-group label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

#username-modal .form-group input {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
}

#username-modal .error-message {
    font-size: 0.7rem;
    margin-top: 0.2rem;
    min-height: 1rem;
}

#username-modal .modal-disclaimer {
    padding: 0.4rem;
    font-size: 0.7rem;
    margin-bottom: 0.6rem;
    gap: 0.4rem;
}

#username-modal .modal-disclaimer i {
    font-size: 0.7rem;
}

#username-modal .modal-footer {
    margin-top: 0.6rem;
}

#username-modal .modal-footer .btn {
    padding: 0.5rem 0.7rem;
    font-size: 0.75rem;
}

#username-modal .profile-avatar-wrapper {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
}

#username-modal .profile-username {
    font-size: 0.85rem;
}

#username-modal .profile-status {
    font-size: 0.7rem;
}

#username-modal .profile-container {
    padding: 0.8rem;
    margin-bottom: 0.6rem;
}


.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all var(--duration-normal) ease;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.modal-item-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(168, 85, 247, 0.1);
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.modal-item-preview img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.modal-item-info h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    background: rgba(168, 85, 247, 0.05);
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--duration-normal) ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.error-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

.modal-disclaimer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    background: rgba(168, 85, 247, 0.15);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
}

.modal-disclaimer i {
    color: var(--primary-color);
}

.modal-footer {
    margin-top: 2rem;
}

/* ===== SEARCHING STAGE ===== */
.searching-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    text-align: center;
}

.searching-spinner {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.9rem;
    animation: spin 1s linear infinite;
}

#username-modal .searching-container {
    padding: 0.8rem 0.6rem;
}

#username-modal .searching-spinner {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

#username-modal .searching-text {
    font-size: 0.75rem;
}

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

.searching-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.searching-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* ===== PROFILE STAGE ===== */
.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(168, 85, 247, 0.1);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border: 2px solid rgba(168, 85, 247, 0.3);
    position: relative;
    overflow: hidden;
}

.profile-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    object-fit: cover;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.profile-avatar-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.6;
    animation: pulseGlow 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.profile-info {
    text-align: center;
}

.profile-username {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.profile-status {
    font-size: 0.875rem;
    color: var(--success-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ===== GENERATION MODAL ===== */
.generation-modal {
    text-align: center;
}

.generation-header {
    margin-bottom: 2rem;
}

.generation-header h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
}

.generation-item {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(168, 85, 247, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(168, 85, 247, 0.3);
}

.generation-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.progress-container {
    margin-bottom: 1.5rem;
}

.progress-bar {
    background: rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-full);
    height: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.progress-fill {
    background: linear-gradient(90deg, #a855f7, #ec4899, #f472b6, #a855f7);
    background-size: 200% 100%;
    animation: progressGlow 2s ease-in-out infinite;
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.8);
}

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

.progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.generation-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(168, 85, 247, 0.1);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.generation-status i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.generation-status strong {
    font-weight: 800;
    text-transform: uppercase;
}

.generation-status span {
    display: inline-block;
}

/* ===== RECENT CLAIMS NOTIFICATION ===== */
.recent-claims {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: var(--bg-modal);
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.3);
    z-index: 1500;
    min-width: 300px;
    transform: translateX(-100%);
    transition: transform var(--duration-slow) ease;
}

.recent-claims.show {
    transform: translateX(0);
}

.recent-claim-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recent-claim-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-claim-avatar i {
    color: white;
    font-size: 1.125rem;
}

.recent-claim-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.recent-claim-text strong {
    color: var(--text-primary);
}

.recent-claim-text span {
    color: var(--primary-color);
    font-weight: 500;
}

.recent-claim-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    .container {
        padding: 0 var(--container-padding);
    }
    
    .stats-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-box {
        min-width: auto;
        padding: 0.85rem 1.25rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .main-panel {
        padding: 1.5rem;
    }

    .modal-content {
        padding: 1rem;
        max-width: 420px;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input {
        font-size: 0.95rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-stats {
        gap: 1rem;
    }
    
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }
    
    .item-card {
        padding: 0.75rem;
    border-radius: 12px;
    }
    
    .item-header {
        margin-bottom: 0.5rem;
    }
    
    .item-image {
        width: 110px;
        height: 110px;
        margin: 0 auto 0.75rem;
    }
    
    .item-info {
        margin-bottom: 0.75rem;
    }
    
    .item-name {
    font-size: 1rem;
        margin-bottom: 0;
    }
    
    .btn-claim {
        padding: 0.35rem 0.7rem;
        font-size: 0.6rem;
        background: var(--primary-color);
        color: #ffffff;
        border: 2px solid var(--primary-color);
    }
    
    .btn-claim:hover {
        background: #b91c1c;
        border-color: #b91c1c;
    }
    
    .rarity-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
    
    .stock-count {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .section-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .testimonials {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-links {
        gap: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .profile-avatar-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .profile-username {
        font-size: 1.25rem;
    }
    
    .searching-container {
        padding: 2rem 1rem;
    }
    
    .searching-spinner {
        font-size: 2.5rem;
    }
    
    .recent-claims {
        left: 1rem;
        right: 1rem;
        min-width: auto;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem; 
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 5rem 0 2rem;
    }
    
    .items-section {
        padding: 2rem 0;
    }
    
    .social-proof {
        padding: 3rem 0;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.5rem;
    }
    
    .item-card {
        padding: 0.5rem;
        border-radius: 10px;
    }
    
    .item-image {
        width: 95px;
        height: 95px;
        margin: 0 auto 0.5rem;
    }
    
    .item-name {
        font-size: 0.85rem;
        line-height: 1.1;
    }
    
    .btn-claim {
        padding: 0.3rem 0.65rem;
        font-size: 0.55rem;
        background: var(--primary-color);
        color: #ffffff;
        border: 2px solid var(--primary-color);
    }
    
    .btn-claim:hover {
        background: #b91c1c;
        border-color: #b91c1c;
    }
    
    .rarity-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
    
    .stock-count {
        font-size: 0.6rem;
        padding: 0.15rem 0.35rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .modal-content {
        padding: 0.9rem;
        max-width: 360px;
    }
    
    .testimonial {
        flex-direction: column;
        text-align: center;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }

    /* Extra compact username modal on small phones */
    #username-modal .modal-content {
        padding: 0.75rem;
        max-width: 280px;
    }

    #username-modal .modal-header h3 {
        font-size: 0.95rem;
    }

    #username-modal .modal-item-preview {
        padding: 0.45rem;
    }

    #username-modal .modal-item-preview img {
        width: 36px;
        height: 36px;
    }

    #username-modal .modal-item-info h4 {
        font-size: 0.85rem;
    }

    #username-modal .modal-item-info span {
        font-size: 0.65rem;
    }

    #username-modal .form-group input {
        padding: 0.55rem 0.7rem;
        font-size: 0.82rem;
    }

    #username-modal .modal-footer .btn {
        padding: 0.65rem 0.8rem;
        font-size: 0.88rem;
    }

    #username-modal .profile-avatar-wrapper {
        width: 64px;
        height: 64px;
    }

    #username-modal .profile-username {
        font-size: 0.9rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Scroll animations */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.slide-in-up {
    animation: slideInUp 0.6s ease forwards;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

.will-change {
    will-change: transform, opacity;
}

/* Optimize background animations */
.bg-item-img {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Reduce animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
    .bg-item-img {
        animation: none !important;
        opacity: 0.02 !important;
    }
}

/* Pause animations when not visible */
@media (prefers-reduced-motion: no-preference) {
    .bg-item-img:nth-child(odd) {
        animation-play-state: running;
    }
}

/* ===== CPA LOCKER CENTERING ===== */
/* Center the offer wall/locker perfectly on screen */
body.locker-active {
    overflow: hidden;
}

#bGHlLk, 
#content-locker,
.offer-wall-container,
iframe[src*="offers"],
iframe[src*="locker"],
div[id*="locker"]:not(.items-section),
div[class*="locker"],
div[id*="offer"]:not(.items-section),
div[class*="offer"]:not(.items-section) {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 999999 !important;
    margin: 0 !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
}

/* Ensure the locker backdrop is full screen */
div[id*="locker-backdrop"],
div[class*="locker-backdrop"],
div[id*="offer-backdrop"],
div[class*="offer-backdrop"] {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999998 !important;
}

/* Mobile locker centering */
@media (max-width: 768px) {
    #bGHlLk, 
    #content-locker,
    .offer-wall-container,
    iframe[src*="offers"],
    iframe[src*="locker"],
    div[id*="locker"]:not(.items-section),
    div[class*="locker"],
    div[id*="offer"]:not(.items-section),
    div[class*="offer"]:not(.items-section) {
        max-width: 95vw !important;
        max-height: 95vh !important;
        width: 95vw !important;
    }
}

/* ===== ACCESSIBILITY ===== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --bg-primary: #000000;
        --bg-secondary: #000000;
    }
}