/* 
 * TEBEX STORE DESIGN SYSTEM
 * Theme: Modern Dark Gaming (Cyberpunk/Futuristic)
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Colors - Red & Black Tech Theme */
    --bg-dark: #020202;
    --bg-card: #0a0a0a;
    --bg-card-hover: #111111;
    --bg-translucent: rgba(5, 5, 5, 0.9);

    --primary: #a826ff;
    /* Neon Purple */
    --primary-glow: rgba(168, 38, 255, 0.5);

    --secondary: #e0e0e0;
    /* Tech Silver/White */
    --secondary-glow: rgba(224, 224, 224, 0.2);

    --text-main: #ffffff;
    --text-muted: #888888;
    --text-accent: #a826ff;

    --border: rgba(168, 38, 255, 0.15);
    --border-hover: rgba(168, 38, 255, 0.4);

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #a826ff 0%, #6a00ff 100%);
    --gradient-text: linear-gradient(90deg, #fff 30%, #a826ff 100%);

    /* Spacing */
    --container-width: 1650px;
    --header-height: 80px;
    --radius-sm: 4px;
    /* Sharper corners for tech look */
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-main);
}

h1 {
    font-size: clamp(2.2rem, 7vw, 4.5rem);
}

h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 5px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 20px var(--primary-glow);
    }

    100% {
        box-shadow: 0 0 5px var(--primary-glow);
    }
}

/* Utilities */
.container {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 3%;
    /* Fluid padding */
}

.section-padding {
    padding: clamp(2rem, 8vw, 6rem) 0;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(188, 19, 254, 0.1);
}

/* Card Style Generic */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-5px);
}

/* Global Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--bg-translucent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
}

@media (max-width: 968px) {
    .menu-toggle {
        display: block;
        order: 3;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--bg-card);
        flex-direction: column;
        align-items: center;
        padding: 4rem 2rem;
        transition: var(--transition-smooth);
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-actions {
        order: 2;
    }
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-btn {
    position: relative;
    font-size: 1.2rem;
    color: var(--text-main);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hero Section */
.hero {
    position: relative;
    padding: clamp(120px, 20vw, 180px) 0 100px 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 10%, rgba(168, 38, 255, 0.15), transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(106, 0, 255, 0.1), transparent 40%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.badge-new {
    display: inline-block;
    background: rgba(168, 38, 255, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(168, 38, 255, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero Visual (Placeholder for 3D/Image) */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.v-card {
    position: absolute;
    width: clamp(250px, 40vw, 350px);
    height: clamp(150px, 25vw, 220px);
    background: linear-gradient(135deg, #1a1c29, #0f1016);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.c1 {
    transform: rotate(-10deg) translateY(-20px);
    z-index: 1;
    background: linear-gradient(135deg, #1a1c29, #0f1016);
}

.c2 {
    transform: rotate(5deg) translateX(30px);
    z-index: 2;
    border: 1px solid var(--primary);
    background: url('https://placehold.co/600x400/1a1c29/bc13fe?text=Script+UI') center/cover;
}

@media (max-width: 968px) {
    .container {
        padding: 0 1.2rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text p {
        margin: 0 auto 2.5rem auto;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-visual {
        height: 300px;
        margin-top: 2rem;
    }

    .v-card {
        top: 50%;
        left: 50%;
        margin-left: -125px;
        margin-top: -75px;
    }

    .c1 {
        transform: rotate(-5deg) translate(-10px, -10px);
    }

    .c2 {
        transform: rotate(5deg) translate(10px, 10px);
    }
}

/* Store Specific Responsive */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Cart Specific Responsive */
@media (max-width: 968px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Styles for Mobile */
@media (max-width: 576px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: rgba(11, 12, 21, 0.95);
    border: 1px solid var(--border);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    backdrop-filter: blur(10px);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
}

.toast.success::before {
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
}

.toast.error::before {
    background: #ff3355;
    box-shadow: 0 0 10px #ff3355;
}

.toast.info::before {
    background: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.success .toast-icon {
    color: #00ff88;
}

.toast.error .toast-icon {
    color: #ff3355;
}

.toast.info .toast-icon {
    color: var(--secondary);
}

.toast-msg {
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
}

/* Custom Confirm Modal */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}

.confirm-overlay.active {
    opacity: 1;
    visibility: visible;
}

.confirm-box {
    background: var(--bg-card);
    border: 1px solid var(--primary);
    padding: 2rem;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(0.9);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 30px rgba(188, 19, 254, 0.2);
}

.confirm-overlay.active .confirm-box {
    transform: scale(1);
}

.confirm-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.confirm-msg {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: auto;
    /* Pushes footer to bottom in flex container */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--text-main);
}

.footer-logo span {
    color: var(--primary);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}