@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-dark: #0c0620;
    --bg-card: #160c36;
    --bg-card-hover: #22124d;
    --purple-primary: #8b5cf6;
    --purple-hover: #7c3aed;
    --purple-glow: #c084fc;
    --purple-dark: #11072d;
    --purple-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    --purple-hero-gradient: linear-gradient(135deg, rgba(20, 10, 50, 0.88) 0%, rgba(12, 6, 32, 0.95) 100%);
    --text-main: #ffffff;
    --text-muted: #cbd5e1;
    --border-purple: rgba(168, 85, 247, 0.35);
    --border-glow: rgba(192, 132, 252, 0.6);
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark) !important;
    color: var(--text-main) !important;
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* OVERRIDE BOOTSTRAP DEFAULT WHITE CARDS & BACKGROUNDS */
.card, .bg-card, .bg-white, .modal-content, .dropdown-menu {
    background-color: #160c36 !important;
    color: #ffffff !important;
    border: 1px solid var(--border-purple) !important;
    border-radius: 18px !important;
}

.modal-header, .modal-footer {
    border-color: var(--border-purple) !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', 'Outfit', sans-serif;
    color: #ffffff !important;
    letter-spacing: -0.02em;
}

p, span, label, div {
    color: #e2e8f0;
}

/* NAVBAR STYLING */
.astro-navbar {
    background: rgba(12, 6, 32, 0.96) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-purple) !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 1.5rem;
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand span {
    color: var(--purple-glow);
}

.nav-link {
    color: #f1f5f9 !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    border-radius: 50px;
    transition: all 0.25s ease;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff !important;
    background: rgba(139, 92, 246, 0.25) !important;
    border: 1px solid var(--border-purple) !important;
}

.btn-nav-login {
    background: rgba(42, 71, 94, 0.4) !important;
    border: 1px solid #2a475e !important;
    color: #66c0f4 !important;
    font-weight: 700 !important;
    border-radius: 50px;
    padding: 0.45rem 1.25rem;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-nav-register {
    background: linear-gradient(135deg, #1a9fff 0%, #0c7cd5 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 50px;
    padding: 0.45rem 1.25rem;
    font-size: 0.9rem;
    text-decoration: none;
}

/* SEARCH BAR IN NAVBAR */
.nav-search-wrap {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.nav-search-input {
    width: 100%;
    background: #10072b !important;
    border: 1px solid var(--border-purple) !important;
    color: #ffffff !important;
    border-radius: 50px;
    padding: 0.45rem 1rem 0.45rem 2.4rem;
    font-size: 0.88rem;
}

.nav-search-input::placeholder {
    color: #94a3b8;
}

.nav-search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--purple-glow);
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(22, 12, 54, 0.9) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(192, 132, 252, 0.4) !important;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none;
    max-height: 420px;
    overflow-y: auto;
    padding: 0.5rem;
}

/* Custom Scrollbar for Dropdown */
.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}
.search-results-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.search-results-dropdown::-webkit-scrollbar-thumb {
    background: var(--purple-primary);
    border-radius: 10px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    margin-bottom: 0.25rem;
    background: transparent !important;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-item:last-child {
    margin-bottom: 0;
}

.search-item:hover {
    background: rgba(139, 92, 246, 0.15) !important;
    border-color: rgba(168, 85, 247, 0.3);
    transform: translateX(4px);
}

.search-item img {
    width: 48px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* HERO SLIDER CAROUSEL SECTION */
.hero-slider-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-purple);
    margin-bottom: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.hero-slide-item {
    position: relative;
    min-height: 480px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 6, 32, 0.96) 0%, rgba(18, 9, 45, 0.82) 55%, rgba(12, 6, 32, 0.6) 100%);
    padding: 3.5rem 2.5rem;
    display: flex;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(168, 85, 247, 0.25);
    border: 1px solid var(--border-purple);
    color: var(--purple-glow);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1.15;
    margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #e2e8f0;
    max-width: 540px;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.btn-purple-glow {
    background: linear-gradient(135deg, #1a9fff 0%, #0c7cd5 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    border: none !important;
    border-radius: 50px;
    padding: 0.85rem 1.8rem;
    font-size: 1rem;
    box-shadow: 0 8px 25px rgba(26, 159, 255, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.btn-purple-outline {
    background: rgba(42, 71, 94, 0.4) !important;
    border: 1px solid #66c0f4 !important;
    color: #66c0f4 !important;
    font-weight: 600;
    border-radius: 50px;
    padding: 0.85rem 1.8rem;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(12, 6, 32, 0.85);
    border: 1px solid var(--border-purple);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.88rem;
    color: #ffffff;
    font-weight: 700;
}

/* FEATURED CARDS ON RIGHT HERO SIDE */
.hero-featured-card {
    background: rgba(22, 12, 54, 0.95) !important;
    border: 1px solid var(--border-purple) !important;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.hero-featured-card:hover {
    border-color: var(--purple-glow) !important;
    transform: translateX(6px);
}

/* GAME CARDS GRID */
.game-card {
    position: relative;
    background: #160c36 !important;
    border: 1px solid var(--border-purple) !important;
    border-radius: 18px !important;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: var(--purple-glow) !important;
    box-shadow: 0 15px 35px rgba(168, 85, 247, 0.35);
}

.game-card-img-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.game-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 0.4rem;
}

.compatibility-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.3rem 0.55rem;
    border-radius: 50px;
    margin-bottom: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.compatibility-badge.green {
    background: #22c55e !important;
    color: #ffffff !important;
    border: 1px solid #16a34a !important;
}

.compatibility-badge.yellow {
    background: #eab308 !important;
    color: #ffffff !important;
    border: 1px solid #ca8a04 !important;
}

.compatibility-badge.red {
    background: #ef4444 !important;
    color: #ffffff !important;
    border: 1px solid #dc2626 !important;
}

/* FORM CONTROLS PURPLE DARK (NO WHITE BOXES) */
.astro-input, .astro-select, .form-control, .form-select {
    width: 100% !important;
    max-width: 100% !important;
    text-overflow: ellipsis;
    background: #10072b !important;
    border: 1px solid var(--border-purple) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
}

.astro-input:focus, .astro-select:focus, .form-control:focus, .form-select:focus {
    border-color: var(--purple-glow) !important;
    background: #180c40 !important;
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.4) !important;
}

.astro-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f1f5f9 !important;
    margin-bottom: 0.5rem;
    display: block;
}

/* PROFILE & ADMIN SPEC PANELS (STUNNING DARK PURPLE GLASS) */
.profile-spec-box {
    background: #10072b !important;
    border: 1px solid var(--border-purple) !important;
    border-radius: 14px;
    padding: 1.25rem;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
    padding: 6px;
    border-radius: 50%;
    background: var(--purple-gradient);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.5);
}

.profile-avatar-img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #160c36;
}

/* BUTTON PURPLE GENERAL (STEAM BLUE) */
.btn-purple {
    background: linear-gradient(135deg, #1a9fff 0%, #0c7cd5 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #26a5ff 0%, #118eed 100%) !important;
    box-shadow: 0 6px 20px rgba(26, 159, 255, 0.4) !important;
    color: #ffffff !important;
}

.btn-outline-purple {
    background: rgba(42, 71, 94, 0.4) !important;
    border: 1px solid #2a475e !important;
    color: #66c0f4 !important;
    font-weight: 600 !important;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
}

.btn-outline-purple:hover {
    background: #2a475e !important;
    border-color: #66c0f4 !important;
    color: #ffffff !important;
}

/* WISHLIST FLOAT BUTTON */
.btn-wishlist-float {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(12, 6, 32, 0.8) !important;
    border: 1px solid var(--border-purple) !important;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.btn-wishlist-float:hover, .btn-wishlist-float.active {
    background: #ef4444 !important;
    border-color: #f87171 !important;
}

/* FOOTER */
.astro-footer {
    background: #060312 !important;
    border-top: 1px solid var(--border-purple) !important;
    padding: 3.5rem 0 1.5rem 0;
    margin-top: 4rem;
}


/* ==========================================================================
   LIGHT MODE OVERRIDES 
   ========================================================================== */
.text-muted {
    color: #94a3b8 !important;
}

[data-theme="light"] body {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

[data-theme="light"] p, 
[data-theme="light"] span:not(.badge), 
[data-theme="light"] label, 
[data-theme="light"] div {
    color: #334155;
}

[data-theme="light"] h1, 
[data-theme="light"] h2, 
[data-theme="light"] h3, 
[data-theme="light"] h4, 
[data-theme="light"] h5, 
[data-theme="light"] h6 {
    color: #0f172a !important;
}

[data-theme="light"] .card, 
[data-theme="light"] .bg-card, 
[data-theme="light"] .bg-white, 
[data-theme="light"] .modal-content, 
[data-theme="light"] .dropdown-menu,
[data-theme="light"] .game-card,
[data-theme="light"] .profile-spec-box {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

[data-theme="light"] .astro-navbar {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

[data-theme="light"] .navbar-brand {
    color: #0f172a !important;
}

[data-theme="light"] .nav-link {
    color: #475569 !important;
}

[data-theme="light"] .nav-link:hover, 
[data-theme="light"] .nav-link.active {
    color: #7c3aed !important;
    background: rgba(139, 92, 246, 0.1) !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .nav-search-input,
[data-theme="light"] .astro-input, 
[data-theme="light"] .astro-select, 
[data-theme="light"] .form-control, 
[data-theme="light"] .form-select {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

[data-theme="light"] .nav-search-input:focus,
[data-theme="light"] .astro-input:focus, 
[data-theme="light"] .astro-select:focus, 
[data-theme="light"] .form-control:focus, 
[data-theme="light"] .form-select:focus {
    background: #ffffff !important;
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15) !important;
}

[data-theme="light"] .search-results-dropdown {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

[data-theme="light"] .search-item {
    background: #ffffff !important;
    border-bottom-color: #f1f5f9;
}

[data-theme="light"] .search-item:hover {
    background: #f8fafc !important;
}

[data-theme="light"] .search-item .fw-bold {
    color: #0f172a !important;
}

[data-theme="light"] .hero-slide-overlay {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.85) 55%, rgba(255, 255, 255, 0.3) 100%);
}

[data-theme="light"] .stat-pill {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #334155;
}

[data-theme="light"] .hero-featured-card {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

[data-theme="light"] .hero-title, 
[data-theme="light"] .hero-subtitle,
[data-theme="light"] .game-card-title,
[data-theme="light"] .dropdown-item {
    color: #0f172a !important;
    text-shadow: none;
}

[data-theme="light"] .dropdown-item:hover {
    background-color: #f1f5f9;
}

[data-theme="light"] .astro-label {
    color: #475569 !important;
}

[data-theme="light"] .btn-outline-purple {
    background: rgba(42, 71, 94, 0.4) !important;
    border: 1px solid #2a475e !important;
    color: #66c0f4 !important;
    font-weight: 600 !important;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
}

[data-theme="light"] .btn-outline-purple:hover {
    background: #2a475e !important;
    border-color: #66c0f4 !important;
    color: #ffffff !important;
}

[data-theme="light"] .astro-footer {
    background: #ffffff !important;
    border-top-color: #e2e8f0 !important;
}

[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

[data-theme="light"] .text-muted {
    color: #64748b !important;
}

[data-theme="light"] .table-dark {
    --bs-table-bg: #ffffff;
    --bs-table-color: #1e293b;
    --bs-table-border-color: #e2e8f0;
    --bs-table-striped-bg: #f8fafc;
    --bs-table-striped-color: #1e293b;
    --bs-table-active-bg: #f1f5f9;
    --bs-table-active-color: #1e293b;
    --bs-table-hover-bg: #f1f5f9;
    --bs-table-hover-color: #1e293b;
    color: var(--bs-table-color);
    border-color: var(--bs-table-border-color);
}


/* FIX: Select Options visibility in Dark Mode */
.astro-select option, .form-select option {
    background-color: #10072b !important;
    color: #ffffff !important;
}

[data-theme="light"] .astro-select option, 
[data-theme="light"] .form-select option {
    background-color: #ffffff !important;
    color: #1e293b !important;
}


/* FIX: Browser Autofill visibility in Dark Mode */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #10072b inset !important;
    -webkit-text-fill-color: white !important;
}

[data-theme="light"] input:-webkit-autofill,
[data-theme="light"] input:-webkit-autofill:hover, 
[data-theme="light"] input:-webkit-autofill:focus, 
[data-theme="light"] input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #f1f5f9 inset !important;
    -webkit-text-fill-color: #1e293b !important;
}


/* BADGE DISCOUNT PROMO */
.badge-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 10;
    letter-spacing: 0.5px;
    border: 1px solid #f87171;
}


/* ACTION BUTTONS ADMIN */
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    transition: all 0.2s ease;
}
.btn-action.view { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.btn-action.view:hover { background: #a855f7; color: #ffffff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(168, 85, 247, 0.3); }

.btn-action.edit { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.btn-action.edit:hover { background: #0ea5e9; color: #ffffff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3); }

.btn-action.delete { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.btn-action.delete:hover { background: #ef4444; color: #ffffff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3); }


/* ANIMATED PROMO TITLE */
.animated-promo-title {
    background: linear-gradient(to right, #ffffff 20%, #fcd34d 40%, #f59e0b 60%, #ffffff 80%);
    background-size: 200% auto;
    color: #fff;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineText 4s linear infinite;
}

@keyframes shineText {
    to { background-position: 200% center; }
}

.promo-icon-pulse {
    display: inline-block;
    color: #f59e0b;
    -webkit-text-fill-color: #f59e0b; /* Override text-fill-color from parent */
    animation: softPulseIcon 2s ease-in-out infinite;
    margin-right: 0.5rem;
}

@keyframes softPulseIcon {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.4)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.9)); }
}



/* OVERRIDE ALL PURPLE TEXT AND BORDERS TO STEAM BLUE */
.text-purple { color: #3b82f6 !important; }
.bg-purple { background-color: #1a9fff !important; color: #ffffff !important; }
.border-purple { border-color: #2a475e !important; }

/* Override variables just in case */
:root {
    --purple-primary: #1a9fff !important;
    --purple-glow: #66c0f4 !important;
    --border-purple: rgba(42, 71, 94, 0.8) !important;
    --purple-gradient: linear-gradient(135deg, #1a9fff 0%, #0c7cd5 100%) !important;
}



/* FIX SEARCH DROPDOWN WIDTH FOR DESKTOP */
@media (min-width: 992px) {
    .nav-search-wrap {
        max-width: 450px !important;
    }
    .search-results-dropdown {
        width: 450px !important;
        right: auto !important;
    }
}

