/* ==============================================================================
   XOWRITE - MASTER STYLESHEET (style.css)
   Theme: Dark Cyberpunk / Deep Purple Glassmorphism
============================================================================== */

/* --- 1. CSS RESET & VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700;900&display=swap');

:root {
    /* Color Palette */
    --bg-dark: #050505;
    --primary-purple: #8A2BE2;
    --primary-glow: rgba(138, 43, 226, 0.6);
    --dark-purple: #4B0082;
    --accent-green: #00ff88;
    --text-main: #f8f8f8;
    --text-muted: #a1a1aa;
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(15, 5, 25, 0.45);
    --glass-border: rgba(138, 43, 226, 0.25);
    --glass-border-hover: rgba(138, 43, 226, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.7);
    
    /* Transitions & Layout */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    --nav-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--dark-purple); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-purple); }

/* --- 2. GLOBAL BACKGROUND (VIDEO) --- */
.video-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    filter: grayscale(30%);
}

.video-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(5,5,5,0.4) 0%, rgba(5,5,5,0.95) 100%);
    z-index: -1;
}

/* --- 3. CORE UTILITIES (GLASS, BUTTONS, ANIMATIONS) --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.highlight-text {
    color: var(--primary-purple);
    text-shadow: 0 0 15px var(--primary-glow);
}

/* Buttons */
.btn-solid, .btn-solid-small {
    background: linear-gradient(45deg, var(--dark-purple), var(--primary-purple));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-solid { padding: 12px 28px; font-size: 1rem; }
.btn-solid-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-solid:hover, .btn-solid-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-outline, .btn-outline-small {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--primary-purple);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-outline { padding: 11px 27px; font-size: 1rem; }
.btn-outline-small { padding: 7px 15px; font-size: 0.9rem; }
.btn-outline:hover, .btn-outline-small:hover {
    background: var(--primary-purple);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-full-width { width: 100%; padding: 14px; font-size: 1.1rem; }

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glitchAnim {
    0% { text-shadow: 0.05em 0 0 rgba(255,0,0,0.75), -0.05em -0.025em 0 rgba(0,255,0,0.75), -0.025em 0.05em 0 rgba(0,0,255,0.75); }
    14% { text-shadow: 0.05em 0 0 rgba(255,0,0,0.75), -0.05em -0.025em 0 rgba(0,255,0,0.75), -0.025em 0.05em 0 rgba(0,0,255,0.75); }
    15% { text-shadow: -0.05em -0.025em 0 rgba(255,0,0,0.75), 0.025em 0.025em 0 rgba(0,255,0,0.75), -0.05em -0.05em 0 rgba(0,0,255,0.75); }
    49% { text-shadow: -0.05em -0.025em 0 rgba(255,0,0,0.75), 0.025em 0.025em 0 rgba(0,255,0,0.75), -0.05em -0.05em 0 rgba(0,0,255,0.75); }
    50% { text-shadow: 0.025em 0.05em 0 rgba(255,0,0,0.75), 0.05em 0 0 rgba(0,255,0,0.75), 0 -0.05em 0 rgba(0,0,255,0.75); }
    99% { text-shadow: 0.025em 0.05em 0 rgba(255,0,0,0.75), 0.05em 0 0 rgba(0,255,0,0.75), 0 -0.05em 0 rgba(0,0,255,0.75); }
    100% { text-shadow: -0.025em 0 0 rgba(255,0,0,0.75), -0.025em -0.025em 0 rgba(0,255,0,0.75), -0.025em -0.05em 0 rgba(0,0,255,0.75); }
}

/* --- 4. NAVBAR & FOOTER --- */
.glass-nav {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(10, 5, 15, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-fast);
}

.nav-container {
    max-width: 1300px; margin: 0 auto; padding: 0 30px;
    height: var(--nav-height);
    display: flex; justify-content: space-between; align-items: center;
}

.logo {
    font-size: 1.8rem; font-weight: 900; letter-spacing: 2px;
    color: #fff; text-decoration: none;
    text-shadow: 0 0 10px var(--primary-glow);
}

.nav-links { display: flex; gap: 30px; }
.nav-links a {
    color: var(--text-muted); text-decoration: none;
    font-weight: 500; font-size: 1rem; transition: var(--transition-fast);
    position: relative;
}
.nav-links a:hover, .nav-links a.active {
    color: #fff; text-shadow: 0 0 10px var(--primary-purple);
}
.nav-links a.active::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 100%;
    height: 2px; background: var(--primary-purple);
    box-shadow: 0 0 10px var(--primary-purple);
}

.nav-auth { display: flex; gap: 15px; }

.main-content {
    flex: 1; padding-top: calc(var(--nav-height) + 40px);
    max-width: 1300px; margin: 0 auto; width: 100%; padding-bottom: 60px;
}

.glass-footer {
    background: rgba(5, 5, 5, 0.9);
    border-top: 1px solid var(--glass-border);
    padding: 30px 0; margin-top: auto;
}
.footer-content {
    max-width: 1300px; margin: 0 auto; text-align: center;
}
.footer-logo { font-size: 1.2rem; font-weight: 700; color: var(--text-muted); }
.footer-text { color: #666; font-size: 0.9rem; margin-top: 10px; }

/* --- 5. HOMEPAGE & HERO --- */
.hero-section { text-align: center; padding: 80px 20px 40px; }
.hero-title {
    font-size: clamp(3rem, 8vw, 6rem); font-weight: 900; letter-spacing: 5px;
    margin-bottom: 20px;
    position: relative;
    color: transparent;
    -webkit-text-stroke: 2px var(--primary-purple);
    animation: glitchAnim 3s infinite alternate;
}
.hero-intro {
    max-width: 800px; margin: 0 auto; padding: 30px;
    font-size: 1.1rem; line-height: 1.8; color: var(--text-muted);
}
.hero-buttons { margin-top: 30px; }

.section-title {
    font-size: 2rem; margin-bottom: 30px; color: #fff;
    display: flex; align-items: center; gap: 15px;
}
.section-title i { color: var(--primary-purple); }
.content-section { padding: 40px 20px; }

/* --- 6. CARDS & STORE GRID --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.glass-card {
    background: var(--glass-bg); backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border); border-radius: 16px;
    padding: 30px; transition: var(--transition-slow);
    display: flex; flex-direction: column;
}
.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 15px 35px rgba(138, 43, 226, 0.2);
}

.card-icon {
    font-size: 2.5rem; color: var(--primary-purple); margin-bottom: 20px;
}
.glass-card h3 { font-size: 1.4rem; margin-bottom: 15px; color: #fff; }
.glass-card p { color: var(--text-muted); line-height: 1.6; flex: 1; margin-bottom: 25px; }

.card-footer {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px;
}
.price { font-size: 1.4rem; font-weight: 900; color: #fff; }

/* Detailed Product Card (Store) */
.detailed-card { padding: 0; overflow: hidden; }
.product-banner {
    height: 180px; background-size: cover; background-position: center;
    position: relative; border-bottom: 1px solid var(--glass-border);
}
.category-badge {
    position: absolute; top: 15px; right: 15px;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    border: 1px solid var(--primary-purple); color: #fff;
    padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: bold;
}
.product-content { padding: 25px; display: flex; flex-direction: column; flex: 1; }

/* Store Header & Search */
.store-header { padding: 40px; margin-bottom: 40px; text-align: center; }
.store-title { font-size: 2.5rem; margin-bottom: 15px; }
.store-subtitle { color: var(--text-muted); max-width: 600px; margin: 0 auto 30px; }
.search-group { display: flex; gap: 10px; max-width: 500px; margin: 0 auto; position: relative; }
.search-input { width: 100%; padding-left: 45px !important; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* Fallback Gradients for Products */
.fallback-bg-1 { background: linear-gradient(135deg, #1a0b2e, #4B0082); }
.fallback-bg-2 { background: linear-gradient(135deg, #0f172a, #1e3a8a); }
.fallback-bg-3 { background: linear-gradient(135deg, #2d0614, #9f1239); }
.fallback-bg-4 { background: linear-gradient(135deg, #022c22, #047857); }

/* --- 7. VOUCHES & REVIEWS --- */
.vouches-header { text-align: center; margin-bottom: 50px; }
.page-title { font-size: 2.5rem; margin-bottom: 15px; }
.page-subtitle { color: var(--text-muted); max-width: 600px; margin: 0 auto 30px; }

.stats-panel {
    display: flex; justify-content: center; align-items: center; gap: 40px;
    padding: 25px; max-width: 800px; margin: 0 auto 40px;
}
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-number { font-size: 2rem; font-weight: 900; color: #fff; }
.stat-label { color: var(--primary-purple); font-size: 0.9rem; margin-top: 5px; text-transform: uppercase; letter-spacing: 1px;}
.stat-divider { width: 1px; height: 50px; background: rgba(255,255,255,0.1); }

.vouch-detailed-card { padding: 25px; }
.vouch-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.user-info { display: flex; align-items: center; gap: 15px; }
.avatar {
    width: 45px; height: 45px; border-radius: 50%;
    background: rgba(138, 43, 226, 0.2); color: var(--primary-purple);
    display: flex; justify-content: center; align-items: center; font-size: 1.2rem;
    border: 1px solid var(--glass-border);
}
.user-info h4 { font-size: 1.1rem; color: #fff; margin-bottom: 3px; display: flex; align-items: center; gap: 5px;}
.verify-badge { color: var(--accent-green); font-size: 0.9rem; }
.vouch-date { font-size: 0.8rem; color: #666; }
.stars { display: flex; gap: 3px; }
.active-star { color: #FFD700; }
.inactive-star { color: #444; }
.vouch-body p { font-style: italic; color: #ddd; }

/* --- 8. FORMS & AUTH (LOGIN/REGISTER) --- */
.auth-wrapper {
    display: flex; justify-content: center; align-items: center;
    min-height: 70vh; padding: 20px;
}
.auth-box { width: 100%; max-width: 450px; padding: 40px; }
.register-box { max-width: 600px; }

.auth-header { text-align: center; margin-bottom: 30px; }
.auth-title { font-size: 2rem; margin-bottom: 10px; color: #fff; }
.auth-subtitle { color: var(--text-muted); font-size: 0.95rem; }

.input-group { margin-bottom: 20px; }
.input-group label {
    display: block; margin-bottom: 8px; color: #ccc; font-size: 0.9rem;
    display: flex; align-items: center; gap: 8px;
}
.input-group label i { color: var(--primary-purple); }

.glass-input {
    width: 100%; padding: 14px 15px;
    background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; color: #fff; font-size: 1rem;
    transition: var(--transition-fast);
}
.glass-input:focus {
    outline: none; border-color: var(--primary-purple);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.2); background: rgba(0, 0, 0, 0.5);
}

.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.checkbox-group { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.checkbox-group input { accent-color: var(--primary-purple); width: 16px; height: 16px; }
.checkbox-group label { color: var(--text-muted); font-size: 0.9rem; }

.auth-link { color: #fff; text-decoration: none; transition: 0.3s; }
.auth-link:hover { color: var(--primary-purple); text-decoration: underline; }
.highlight { color: var(--primary-purple); font-weight: bold; }

.auth-footer { text-align: center; margin-top: 25px; color: var(--text-muted); font-size: 0.9rem; display: flex; flex-direction: column; gap: 10px; }

/* Alerts */
.glass-alert {
    padding: 15px; border-radius: 8px; margin-bottom: 25px;
    display: flex; align-items: center; gap: 10px; font-weight: 500;
}
.error { background: rgba(255, 50, 50, 0.1); border: 1px solid rgba(255, 50, 50, 0.3); color: #ff6b6b; }
.success { background: rgba(50, 255, 50, 0.1); border: 1px solid rgba(50, 255, 50, 0.3); color: var(--accent-green); }

/* --- 9. RESPONSIVE DESIGN (MOBILE) --- */
@media (max-width: 768px) {
    .nav-links { display: none; } /* We will need a hamburger menu JS for mobile */
    .hero-title { font-size: 2.5rem; }
    .input-grid { grid-template-columns: 1fr; gap: 0; }
    .stats-panel { flex-direction: column; gap: 20px; }
    .stat-divider { width: 50px; height: 1px; }
    .store-header, .vouches-header { padding: 20px; }
}