/* =========================================================
   index.css — Amades Store Homepage Styles
   ========================================================= */

/* --- Self-hosted Fonts (no Google Fonts needed) --- */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/Plus_Jakarta_Sans/PlusJakartaSans-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/Plus_Jakarta_Sans/PlusJakartaSans-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron/Orbitron-VariableFont_wght.ttf') format('truetype');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}


:root {
    --primary: #6c5ce7;
    --primary-glow: rgba(108, 92, 231, 0.4);
    --secondary: #00cec9;
    --secondary-glow: rgba(0, 206, 201, 0.4);
    --accent: #fd79a8;
    --dark-bg: #0a0b10;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f5f6fa;
    --text-dim: rgba(245, 246, 250, 0.6);
    --header-height: 80px;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.07);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--dark-bg);
    background-image: url('../images/hero_background_gaming.webp');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Dark overlay + gradient glows on top of the background image */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: 
        /* Dark overlay so text stays readable */
        linear-gradient(to bottom, rgba(10, 11, 16, 0.82) 0%, rgba(10, 11, 16, 0.75) 50%, rgba(10, 11, 16, 0.90) 100%),
        /* Noise Texture */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E"),
        /* Vibrant Glows */
        radial-gradient(circle at 0% 0%, rgba(108, 92, 231, 0.2) 0%, transparent 35%),
        radial-gradient(circle at 100% 0%, rgba(0, 206, 201, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 50% 100%, rgba(253, 121, 168, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(108, 92, 231, 0.12) 0%, transparent 30%);
    pointer-events: none;
}

/* --- Animations --- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes pulse-slow {
    from {
        transform: scale(1) rotate(0deg);
        opacity: 0.02;
    }

    to {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.04;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* --- Hero Section & Premium Overlay --- */
.hero-v2 {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-height) + 60px) 2rem 5rem;
    background: radial-gradient(circle at 50% 35%, rgba(108, 92, 231, 0.16), transparent 60%);
    overflow: hidden;
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    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: 55px 55px;
    background-position: center center;
    mask-image: radial-gradient(ellipse at 50% 50%, black 35%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 35%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

/* Floating neon orbs in background */
.hero-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.22;
    pointer-events: none;
    z-index: 0;
    animation: float-orb 8s ease-in-out infinite alternate;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 15%;
    left: 10%;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: var(--secondary);
    bottom: 10%;
    right: 5%;
    animation-delay: -3s;
}

@keyframes float-orb {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(30px, -40px) scale(1.15);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15), inset 0 0 10px rgba(0, 206, 201, 0.1);
    letter-spacing: 0.5px;
}

.hero-v2 h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.8rem, 8vw, 4.6rem);
    line-height: 1.15;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 10%, #c7c1ff 50%, #6c5ce7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-shadow: 0 0 80px rgba(108, 92, 231, 0.35);
}

.hero-v2 p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-main);
    opacity: 0.85;
    max-width: 650px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn-modern {
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
}

.btn-primary-neon {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white !important;
    border: none;
    box-shadow: 0 0 30px rgba(253, 121, 168, 0.4), inset 0 0 8px rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.btn-primary-neon:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 0 40px rgba(253, 121, 168, 0.65), inset 0 0 10px rgba(255, 255, 255, 0.35);
    filter: brightness(1.1);
}

.btn-secondary-neon {
    background: rgba(255, 255, 255, 0.02);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary-neon:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
}

.btn-games:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 25px rgba(0, 206, 201, 0.3);
}

.btn-calc:hover {
    border-color: #00cec9;
    box-shadow: 0 0 25px rgba(0, 206, 201, 0.3);
}

.btn-gift:hover {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(253, 121, 168, 0.3);
}

/* --- Section Styling --- */
section {
    padding: 80px 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-title span {
    color: var(--primary);
}

/* --- Flash Sale Card --- */
.flash-card-v2 {
    background: linear-gradient(165deg, rgba(108, 92, 231, 0.05) 0%, rgba(0, 206, 201, 0.02) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.flash-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.product-mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-mini-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-glow);
}

.flash-timer-v2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
    padding: 10px 20px;
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 71, 87, 0.2);
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.1);
}

/* --- Games Grid --- */
.games-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.game-card-v2 {
    position: relative;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.game-card-v2 img {
    width: 100%;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 28px;
    object-fit: cover;
    border: 2px solid rgba(108, 92, 231, 0.25);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.game-card-v2::after {
    content: 'TOP UP';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 28px;
    background: rgba(10, 11, 16, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--secondary);
    letter-spacing: 2px;
    opacity: 0;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    box-sizing: border-box;
    border: 2px solid var(--primary);
    box-shadow: inset 0 0 20px rgba(108, 92, 231, 0.4);
}

.game-card-v2 .game-info {
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    width: 100%;
    transition: color 0.3s ease;
}

.game-card-v2 h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #f5f6fa;
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    text-shadow: none;
    text-transform: none;
    letter-spacing: 0;
}

@media (hover: hover) {
    .game-card-v2:hover {
        transform: translateY(-8px);
    }

    .game-card-v2:hover::after {
        opacity: 1;
    }

    .game-card-v2:hover img {
        border-color: transparent;
        box-shadow: 0 15px 30px rgba(108, 92, 231, 0.4), 0 0 15px rgba(108, 92, 231, 0.2);
        transform: scale(1.04);
        filter: blur(2px) brightness(0.6);
    }

    .game-card-v2:hover h3 {
        color: var(--secondary);
    }
}

/* --- Regional Modal --- */
.modal-v2 {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-v2.show {
    display: flex;
    opacity: 1;
}

.modal-content-v2 {
    background: var(--dark-bg);
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 600px;
    border-radius: 32px;
    padding: 40px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.modal-content-v2 h2 {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    margin-bottom: 5px;
}

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

.region-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 30px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 5px;
}

.region-item-v2 {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-item-v2 i {
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
    font-style: normal;
}

.region-item-v2 span {
    display: block;
    font-weight: 800;
    font-family: 'Orbitron';
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.region-item-v2 p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.region-item-v2:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.region-item-v2:hover * {
    color: white;
}

.close-modal-v2 {
    position: absolute;
    top: 25px;
    right: 25px;
    background: var(--glass);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal-v2:hover {
    background: #ff4757;
    transform: rotate(90deg);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    section {
        padding: 60px 1.5rem;
    }

    .hero-v2 {
        min-height: 80vh;
        padding-top: 100px;
    }

    .hero-btns {
        gap: 1rem;
    }

    .btn-modern {
        width: 100%;
        justify-content: center;
    }

    .flash-card-v2 {
        padding: 1.5rem 1rem;
    }

    .flash-grid-v2 {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-top: 1.5rem;
    }

    .product-mini-card {
        padding: 10px 8px;
        gap: 6px;
        border-radius: 12px;
        text-align: center;
    }

    .product-mini-card h3 {
        font-size: 0.7rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 2px 0 !important;
    }

    .product-mini-card>div:first-child {
        flex-direction: column;
        gap: 4px;
        align-items: center !important;
    }

    .product-mini-card>div:nth-child(3) {
        flex-direction: column;
        gap: 2px !important;
        align-items: center !important;
    }

    .product-mini-card span[style*="font-size: 1.25rem"] {
        font-size: 0.85rem !important;
    }

    .product-mini-card span[style*="font-size: 0.85rem"] {
        font-size: 0.65rem !important;
    }

    .product-mini-card .btn-modern {
        padding: 6px !important;
        font-size: 0.7rem !important;
        margin-top: 5px !important;
        border-radius: 8px;
    }

    .games-grid-v2 {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .game-card-v2 {
        border-radius: 18px;
    }

    .modal-content-v2 {
        padding: 30px 16px;
        border-radius: 24px;
        width: 95%;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

    .modal-content-v2 h2 {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    .region-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 20px;
    }

    .region-item-v2 {
        padding: 15px 10px;
        border-radius: 16px;
    }

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

    .region-item-v2 span {
        font-size: 0.75rem;
    }

    .region-item-v2 p {
        font-size: 0.75rem;
    }

    .close-modal-v2 {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }

    /* Disable expensive blur/pulse on mobile */
    .hero-v2::before {
        animation: none !important;
        filter: blur(40px) !important;
        width: 100% !important;
        height: 100% !important;
    }
}