/* Viper Studios — global stylesheet. Palette pulled directly from brand spec. */

:root {
    --bg: #0B0F17;
    --surface: #131926;
    --emerald: #10B981;
    --cyan: #00F2FE;
    --purple: #A855F7;
    --purple-light: #C084FC;
    --text: #F9FAFB;
    --text-muted: #9CA3AF;
    --border-glow: rgba(16, 185, 129, 0.15);
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0 0 0.5em; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.6em 1.4em;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    font-size: 0.95rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    color: #05130D;
}
.btn-primary:hover { box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    border-color: var(--border-glow);
    color: var(--text);
}
.btn-outline:hover { box-shadow: 0 0 20px rgba(16, 185, 129, 0.3); }
.btn-danger { background: #3B1220; color: #FCA5A5; border-color: #7F1D1D; }
.btn-sm { padding: 0.35em 0.9em; font-size: 0.8rem; }
.btn-lg { padding: 0.85em 2em; font-size: 1.05rem; }

/* ---- Header / Nav ---- */
.site-header { background: rgba(19, 25, 38, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-glow); position: sticky; top: 0; z-index: 50; }
.nav-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 1.5rem; padding: 0.75rem 1.5rem; }
.nav-logo img { height: 40px; }
.nav-links { display: flex; gap: 1.25rem; font-weight: 600; }
.nav-links a.active, .nav-links a:hover { color: var(--emerald); }
.nav-search { flex: 1; display: flex; max-width: 380px; background: var(--surface); border: 1px solid var(--border-glow); border-radius: 999px; overflow: hidden; }
.nav-search input { flex: 1; background: transparent; border: none; color: var(--text); padding: 0.5em 1em; outline: none; }
.nav-search button { background: transparent; border: none; color: var(--text-muted); padding: 0 0.9em; cursor: pointer; }
.icon-link { display: flex; align-items: center; color: var(--text-muted); position: relative; }
.icon-link:hover { color: var(--emerald); }
.cart-badge { position: absolute; top: -6px; right: -10px; background: var(--purple); color: white; font-size: 0.65rem; border-radius: 999px; padding: 0.1em 0.45em; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-glow); }
.avatar-lg { width: 64px; height: 64px; }

/* ---- Flash messages ---- */
.flash { max-width: 1280px; margin: 0.75rem auto 0; padding: 0.75em 1.25em; border-radius: var(--radius); font-weight: 500; }
.flash-error { background: rgba(239, 68, 68, 0.12); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.3); }
.flash-success { background: rgba(16, 185, 129, 0.12); color: #6EE7B7; border: 1px solid var(--border-glow); }

/* ---- Hero ---- */
.hero { position: relative; }
.hero-banner { width: 100%; height: 420px; object-fit: cover; filter: brightness(0.55); }
.hero-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; gap: 1rem; background: linear-gradient(180deg, rgba(11,15,23,0.3), rgba(11,15,23,0.9)); }
.hero-overlay h1 { font-size: clamp(1.8rem, 5vw, 3rem); background: linear-gradient(135deg, var(--emerald), var(--purple-light)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-overlay p { color: var(--text-muted); max-width: 600px; }
.hero-search { display: flex; gap: 0.5rem; width: 100%; max-width: 480px; }
.hero-search input { flex: 1; padding: 0.7em 1.2em; border-radius: 999px; border: 1px solid var(--border-glow); background: var(--surface); color: var(--text); }
.hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }

/* ---- Sections / grids ---- */
.section { max-width: 1280px; margin: 0 auto; padding: 3rem 1.5rem; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.5rem; }
.link-more { color: var(--emerald); font-weight: 600; }
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-muted); background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--border-glow); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }

/* ---- Product card ---- */
.product-card { background: var(--surface); border: 1px solid var(--border-glow); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.2s, transform 0.15s; }
.product-card:hover { box-shadow: 0 0 20px rgba(16, 185, 129, 0.3); transform: translateY(-2px); }
.product-thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge-sale { position: absolute; top: 0.6rem; left: 0.6rem; background: var(--purple); color: white; font-size: 0.7rem; font-weight: 700; padding: 0.2em 0.6em; border-radius: 999px; }
.product-body { padding: 1rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.tag-badge { background: rgba(168, 85, 247, 0.15); color: var(--purple-light); font-size: 0.72rem; font-weight: 600; padding: 0.2em 0.7em; border-radius: 999px; }
.product-price { display: flex; gap: 0.6rem; align-items: baseline; }
.price-old { color: var(--text-muted); text-decoration: line-through; font-size: 0.85rem; }
.price-current { color: var(--emerald); font-weight: 700; font-size: 1.1rem; }
.product-price-lg .price-current { font-size: 1.6rem; }

/* ---- Catalog ---- */
.catalog-filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1.5rem 0 2rem; background: var(--surface); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border-glow); }
.catalog-filters input[type="text"] { flex: 1; min-width: 200px; padding: 0.6em 1em; border-radius: 999px; border: 1px solid var(--border-glow); background: var(--bg); color: var(--text); }
.tag-filter-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tag-checkbox { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--text-muted); }

/* ---- Server detail ---- */
.server-detail { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; }
.video-embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; }
.video-embed iframe { width: 100%; height: 100%; border: 0; }
.server-thumb { border-radius: var(--radius); width: 100%; object-fit: cover; }
.rating { color: var(--purple-light); margin: 0.5rem 0; }
.server-description { color: var(--text-muted); white-space: pre-line; }
.feature-list { color: var(--text-muted); padding-left: 1.2rem; }
.add-to-cart-form { margin-top: 1.5rem; }

/* ---- Reviews ---- */
.review-form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 420px; margin-bottom: 2rem; background: var(--surface); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border-glow); }
.review-list { display: flex; flex-direction: column; gap: 1rem; }
.review-card { display: flex; gap: 1rem; background: var(--surface); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border-glow); }
.review-card p { color: var(--text-muted); margin: 0.3em 0 0; }

/* ---- Cart / Checkout ---- */
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-item { display: flex; align-items: center; gap: 1rem; background: var(--surface); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border-glow); }
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.cart-item-info { flex: 1; }
.cart-summary { display: flex; justify-content: space-between; align-items: center; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-glow); }
.cart-total { font-size: 1.2rem; }
.checkout-summary { background: var(--surface); border: 1px solid var(--border-glow); border-radius: var(--radius); padding: 1rem 1.5rem; margin-bottom: 1.5rem; }
.checkout-line { display: flex; justify-content: space-between; padding: 0.4rem 0; }
.checkout-total { font-weight: 700; border-top: 1px solid var(--border-glow); margin-top: 0.5rem; padding-top: 0.75rem; }
.checkout-payment-form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 420px; }
.payment-option { display: flex; gap: 0.6rem; align-items: center; padding: 0.75em 1em; border: 1px solid var(--border-glow); border-radius: var(--radius); background: var(--surface); }
.checkout-success .license-list, .account-page .license-list { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.5rem 0; }
.license-card { display: flex; justify-content: space-between; align-items: center; background: var(--surface); padding: 0.9rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--border-glow); }

/* ---- Account ---- */
.account-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.order-table, .admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.order-table th, .order-table td, .admin-table th, .admin-table td { text-align: left; padding: 0.7em 1em; border-bottom: 1px solid var(--border-glow); }
.status-badge { padding: 0.2em 0.7em; border-radius: 999px; font-size: 0.75rem; font-weight: 700; text-transform: capitalize; }
.status-paid { background: rgba(16,185,129,0.15); color: #6EE7B7; }
.status-pending { background: rgba(234,179,8,0.15); color: #FDE68A; }
.status-failed { background: rgba(239,68,68,0.15); color: #FCA5A5; }
.status-refunded { background: rgba(148,163,184,0.15); color: var(--text-muted); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border-glow); margin-top: 3rem; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 2.5rem 1.5rem; display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.footer-brand img { height: 32px; margin-bottom: 0.5rem; }
.footer-brand p, .footer-bottom { color: var(--text-muted); font-size: 0.85rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-payments { display: flex; gap: 0.5rem; align-items: center; color: var(--text-muted); font-size: 0.85rem; }
.payment-badge { border: 1px solid var(--border-glow); border-radius: 6px; padding: 0.2em 0.6em; }
.footer-bottom { text-align: center; padding: 1rem; border-top: 1px solid var(--border-glow); }

/* ---- Error pages ---- */
.error-page { display: flex; align-items: center; justify-content: center; height: 100vh; }
.error-card { text-align: center; }
.error-card h1 { font-size: 4rem; color: var(--emerald); }

/* ---- Admin ---- */
.admin-body { display: flex; }
.admin-shell { display: flex; width: 100%; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--surface); border-right: 1px solid var(--border-glow); display: flex; flex-direction: column; padding: 1.5rem 1rem; gap: 2rem; flex-shrink: 0; }
.admin-nav { display: flex; flex-direction: column; gap: 0.75rem; font-weight: 600; color: var(--text-muted); }
.admin-nav a:hover { color: var(--emerald); }
.admin-sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.85rem; color: var(--text-muted); }
.admin-main { flex: 1; padding: 2rem; max-width: 1000px; }
.admin-login-body { display: flex; align-items: center; justify-content: center; height: 100vh; }
.admin-login-card { background: var(--surface); border: 1px solid var(--border-glow); border-radius: var(--radius); padding: 2.5rem; width: 360px; text-align: center; }
.admin-login-logo { height: 48px; margin: 0 auto 1rem; }
.admin-discord-btn { width: 100%; margin-top: 1rem; }
.admin-login-divider { color: var(--text-muted); font-size: 0.8rem; margin: 1.5rem 0; }
.admin-login-form, .admin-product-form, .admin-settings-form, .admin-grant-form { display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.admin-product-form, .admin-settings-form, .admin-grant-form { background: var(--surface); border: 1px solid var(--border-glow); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; }
.admin-product-form label, .admin-settings-form label, .admin-grant-form label, .admin-login-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--text-muted); }
.admin-product-form input, .admin-product-form textarea, .admin-product-form select,
.admin-settings-form input, .admin-settings-form select, .admin-grant-form input, .admin-grant-form select,
.admin-login-form input {
    background: var(--bg); border: 1px solid var(--border-glow); border-radius: 8px; padding: 0.6em 0.9em; color: var(--text); font-family: inherit;
}
.form-row { display: flex; gap: 1rem; }
.form-row label { flex: 1; }
.admin-table-actions { display: flex; gap: 0.5rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0 2.5rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border-glow); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.stat-label { color: var(--text-muted); font-size: 0.8rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--emerald); }
.bar-chart { display: flex; align-items: flex-end; gap: 0.5rem; height: 200px; background: var(--surface); border: 1px solid var(--border-glow); border-radius: var(--radius); padding: 1rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 0.4rem; }
.bar { width: 100%; background: linear-gradient(180deg, var(--cyan), var(--emerald)); border-radius: 4px 4px 0 0; }
.bar-label { font-size: 0.65rem; color: var(--text-muted); }

@media (max-width: 900px) {
    .server-detail { grid-template-columns: 1fr; }
    .nav-search { display: none; }
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; flex-direction: row; align-items: center; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
}
