@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    /* --- Red / Black Palette --- */
    --color-primary: #dc2626;
    /* Vibrant Red */
    --color-primary-glow: rgba(220, 38, 38, 0.5);
    --color-primary-dark: #b91c1c;

    --color-bg: #09090b;
    /* Very dark, almost black */
    --color-surface: #18181b;
    /* Dark gray surface */
    --color-surface-hover: #27272a;

    --color-text: #f8fafc;
    --color-text-muted: #94a3b8;

    --glass-bg: rgba(24, 24, 27, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 30px -5px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 20px rgba(220, 38, 38, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(220, 38, 38, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(220, 38, 38, 0.05), transparent 25%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Global Utilities --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 5px var(--color-primary-glow);
    }

    50% {
        box-shadow: 0 0 20px var(--color-primary-glow);
    }

    100% {
        box-shadow: 0 0 5px var(--color-primary-glow);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: var(--color-primary);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-glow);
}

.btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 10px 26px;
    font-weight: 700;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

/* --- Header --- */
header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

header.scrolled,
header.dash-header {
    background: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    text-decoration: none;
}

.logo img {
    height: 45px;
    margin-right: 12px;
}

.logo span {
    color: var(--color-primary);
    text-shadow: 0 0 15px var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-muted);
    position: relative;
    padding: 5px 0;
}

.nav-links a.active,
.nav-links a:hover {
    color: white;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s;
    box-shadow: 0 0 8px var(--color-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://wallpapers.com/images/hd/minecraft-shaders-background-1920-x-1080-8j4k911181812821.jpg') no-repeat center/cover;
    filter: brightness(0.4) saturate(0) contrast(1.2);
    /* Black and white bg */
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 0%, var(--color-bg) 90%);
    z-index: -1;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards;
    color: white;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: #cbd5e1;
    opacity: 0;
    animation: slideUp 0.8s ease-out 0.2s forwards;
}

.hero-content .btn {
    opacity: 0;
    animation: slideUp 0.8s ease-out 0.4s forwards;
}

/* --- Stats Bar --- */
.stats-bar {
    background: var(--color-surface);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 40px 0;
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: white;
    font-weight: 800;
    margin-bottom: 5px;
}

.stat-item p {
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* --- News Section --- */
.news-section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: white;
}

.section-title p {
    color: var(--color-text-muted);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.news-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.news-img {
    height: 200px;
    background: linear-gradient(45deg, #27272a, #3f3f46);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.1);
}

.news-content {
    padding: 25px;
}

.news-date {
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
    line-height: 1.3;
}

.news-content p {
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* --- Footer --- */
footer {
    background: black;
    padding: 60px 0 30px;
    border-top: 1px solid var(--glass-border);
    margin-top: 50px;
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-content .logo {
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* --- User Dropdown & Menu --- */
.user-menu {
    position: relative;
    cursor: pointer;
}

.user-menu-trigger {
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: var(--transition);
}

.user-menu-trigger:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
}

.user-menu-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.user-menu-name {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.user-menu i.fa-chevron-down {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    min-width: 200px;
    border-radius: 12px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.user-menu:hover .user-dropdown,
.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--color-text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.dropdown-item:hover i {
    color: var(--color-primary);
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* --- Forms & Cards (Login/Register/Checkout) --- */
input,
select {
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    outline: none;
    transition: var(--transition);
    width: 100%;
}

input:focus,
select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.checkout-container,
.auth-container {
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    color: white;
}

/* --- Store & Profile Overrides to Match Red/Black --- */
.dash-card,
.store-header,
.pkg-card {
    background: var(--color-surface) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
}

.cat-card,
.product-card {
    background: var(--color-surface) !important;
    border: 1px solid var(--glass-border) !important;
}

.cat-card:hover,
.product-card:hover {
    border-color: var(--color-primary) !important;
}

.card-title {
    color: white !important;
}

.prod-name,
.cat-name {
    color: white !important;
}

.prod-img {
    background: #000 !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 3rem;
    }
}