/* ============================================================
   TOXIC BR - Estilo Principal
   Cores: #0B0A0A (bg), #FFFFFF (texto), #E24A00 (primary),
          #E58D00 (secondary), #EEA40E (accent)
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0B0A0A;
    --bg-secondary: #141212;
    --bg-card: #1A1818;
    --bg-card-hover: #222020;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #666666;
    --accent-primary: #E24A00;
    --accent-secondary: #E58D00;
    --accent-tertiary: #EEA40E;
    --steam-blue: #00ADEE;
    --steam-dark: #171A21;
    --border-color: #2A2828;
    --danger: #E24A00;
    --success: #22C55E;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--accent-tertiary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--accent-secondary);
}

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

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* --- Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
}

.navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.navbar-brand .toxic {
    color: var(--accent-primary);
}
.navbar-brand .br {
    color: var(--text-primary);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.navbar-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.navbar-links a:hover,
.navbar-links a.active {
    color: var(--accent-tertiary);
    border-bottom-color: var(--accent-primary);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--steam-dark);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-login:hover {
    background: #232A35;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.steam-icon {
    color: var(--steam-blue);
    flex-shrink: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
}

.user-coins {
    font-weight: 700;
    color: var(--accent-tertiary);
    font-size: 0.9rem;
}

/*
 * TOXIC BR - Hero Section
 * ========================================
 * Mobile (≤1023px): cover → imagem preenche a tela, corta laterais se necessário
 * Desktop (≥1024px): contain → imagem inteira visível, sem cortes
 * Overlay: gradiente escuro suave para transição com o resto da página
 * Imagem: /static/capa.png
 */
.hero {
    position: relative;
    text-align: center;
    padding: 6rem 2rem 4rem;
    background: linear-gradient(180deg, rgba(11,10,10,0.4) 0%, rgba(11,10,10,0.35) 60%, rgba(11,10,10,0.7) 100%), url('/static/capa.png') center/cover no-repeat;
    min-height: 450px;
    overflow: hidden;
}

/* Desktop: mostra a imagem inteira sem cortar */
@media (min-width: 1024px) {
    .hero {
        background-size: contain;
        min-height: clamp(450px,70vh,800px);
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(226, 74, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    position: relative;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 4px 16px rgba(226, 74, 0, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(226, 74, 0, 0.5);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--accent-tertiary);
    border: 2px solid var(--accent-primary);
}
.btn-outline:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-ghost:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

/* --- Sections --- */
.section {
    padding: 5rem 2rem;
    max-width: 1280px;
    margin: 0 auto;    background: transparent;}

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

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.section-header h2 span {
    color: var(--accent-primary);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 550px;
    margin: 0 auto;
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s;
}
.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* --- VIP Cards --- */
.vip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.vip-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.vip-card.featured {
    border-color: var(--accent-primary);
    background: linear-gradient(180deg, rgba(226, 74, 0, 0.1), var(--bg-card));
    transform: scale(1.03);
}

.vip-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.vip-card .price {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.vip-card .features {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}

.vip-card .features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}
.vip-card .features li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: bold;
}

.vip-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    padding: 0.3rem 1.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Store Grid --- */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.store-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
}
.store-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(226, 74, 0, 0.15);
}

.store-item-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-secondary);
}

.store-item-info {
    padding: 1rem;
}

.store-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-item-price {
    font-weight: 800;
    color: var(--accent-tertiary);
    font-size: 1.1rem;
}

.store-item-rarity {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Crate Cards --- */
.crate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.crate-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}
.crate-card:hover {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 30px rgba(226, 74, 0, 0.2);
    transform: translateY(-4px);
}

.crate-card .crate-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.crate-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.crate-card .crate-cost {
    font-weight: 800;
    color: var(--accent-tertiary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* --- Dashboard --- */
.dashboard {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.dashboard-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent-primary);
}

.dashboard-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.dashboard-info .steam-id {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dashboard-balance {
    margin-left: auto;
    text-align: right;
}

.dashboard-balance .balance-amount {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-balance .balance-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Rules Page --- */
.rules-content {
    max-width: 800px;
    margin: 0 auto;
}

.rule-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-primary);
}

.rule-card h3 {
    color: var(--accent-tertiary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* --- Admin Panel --- */
.admin-panel {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.admin-tab {
    padding: 0.6rem 1.2rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}
.admin-tab:hover,
.admin-tab.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(42, 40, 40, 0.5);
}

.admin-table tr:hover td {
    background: rgba(226, 74, 0, 0.05);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(226, 74, 0, 0.15);
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

/* --- Footer --- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer .brand {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.footer .brand .toxic { color: var(--accent-primary); }

/* --- Toast / Notification --- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    max-width: 380px;
}

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }

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

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

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 10, 10, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    backdrop-filter: blur(4px);
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.modal-close {
    float: right;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Loading spinner --- */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .section { padding: 3rem 1rem; }
    .section-header h2 { font-size: 1.6rem; }

    .navbar-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        display: none;
    }
    .navbar-links.open { display: flex; }

    .card-grid,
    .vip-grid,
    .store-grid,
    .crate-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    .dashboard-balance {
        margin-left: 0;
        text-align: center;
    }
}
