/* ━━━━━━━━━━━━━━━━━━━━
   PREMIUM THEME CSS 
   ━━━━━━━━━━━━━━━━━━━━ */

:root {
    --primary: #6D28D9;
    --primary-dark: #24005C;
    --primary-light: #8B5CF6;
    --violet: #7C3AED;
    --indigo: #312E81;
    --background: #08001F;
    --surface: #12052F;
    --surface-light: #FFFFFF;
    --lavender: #EDE9FE;
    --accent-gold: #FACC15;
    --text-primary: #FFFFFF;
    --text-dark: #17102B;
    --text-muted: #A7A0BC;
    
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-pill: 9999px;
}

body {
    background: radial-gradient(circle at 50% -20%, var(--primary-dark) 0%, var(--background) 70%);
    background-color: var(--background);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
}
.text-gradient {
    background: linear-gradient(135deg, var(--lavender), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Header */
.header, .main-header, .top-header {
    background: rgba(8, 0, 31, 0.85) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-area img {
    border-radius: var(--radius-sm);
}
.header-btn-gold {
    background: linear-gradient(135deg, #FDE047, var(--accent-gold));
    color: var(--text-dark) !important;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
    text-decoration: none;
    transition: transform 0.2s ease;
}
.header-btn-gold:hover {
    transform: translateY(-2px);
}

/* Hero Section */
.premium-hero {
    padding: 40px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.premium-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.premium-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 24px;
}
.hero-cta {
    background: linear-gradient(135deg, var(--primary), var(--violet));
    color: white;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    transition: all 0.3s ease;
}
.hero-cta:hover {
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.6);
    transform: translateY(-2px);
}

/* Search Bar */
.search-container {
    padding: 20px;
    position: relative;
}
.search-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 16px 20px 16px 45px;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}
.search-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}
.search-icon {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Categories (Tabs) */
.category-tabs {
    display: flex;
    overflow-x: auto;
    padding: 10px 20px;
    gap: 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar {
    display: none;
}
.cat-tab {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cat-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--violet));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

/* App Cards */
.premium-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    text-decoration: none;
    color: white;
}
.premium-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    object-fit: cover;
}
.card-content {
    flex: 1;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: white;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.rating-pill {
    background: rgba(250, 204, 21, 0.15);
    color: var(--accent-gold);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-weight: 600;
}
.bonus-text {
    color: #4ADE80;
    font-weight: 600;
}
.btn-download {
    background: linear-gradient(135deg, var(--primary), var(--violet));
    color: white !important;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-download:hover {
    transform: scale(1.05);
}

/* Bottom Navigation */
.bottom-nav {
    background: rgba(8, 0, 31, 0.95) !important;
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1000;
}
.nav-item {
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.3s;
}
.nav-item.active {
    color: var(--primary-light);
}
.nav-item i {
    font-size: 1.4rem;
}
.nav-fab {
    background: linear-gradient(135deg, var(--primary), var(--violet));
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(-20px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
    border: 4px solid var(--background);
}

/* Side Drawer */
.drawer-content {
    background: linear-gradient(180deg, var(--background), var(--surface)) !important;
    border-right: 1px solid var(--glass-border);
    color: white;
}
.drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}
.drawer-item {
    padding: 15px 20px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: background 0.2s;
}
.drawer-item:hover {
    background: var(--glass-bg);
    color: white;
}

/* App Detail Page */
.detail-header {
    display: flex;
    gap: 20px;
    padding: 20px;
    align-items: center;
}
.detail-icon {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.detail-title {
    font-size: 1.8rem;
    margin: 0 0 8px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 20px;
}
.stat-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}
.stat-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}
.stat-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.action-buttons {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.btn-primary-large {
    background: linear-gradient(135deg, var(--primary), var(--violet));
    color: white;
    padding: 16px;
    border-radius: var(--radius-pill);
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    display: block;
}
.btn-secondary-large {
    background: white;
    color: var(--text-dark);
    padding: 16px;
    border-radius: var(--radius-pill);
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Utilities */
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }

/* Fix visibility for header elements on dark background */
.header-title, .drawer-header-title {
    color: var(--text-primary) !important;
}

.menu-toggle {
    color: var(--text-primary) !important;
}

/* Drawer intense blur */
.sidebar-drawer {
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    background: rgba(8, 0, 31, 0.65) !important;
}

/* Drawer Content Fixes */
.drawer-header {
    background: transparent !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

.drawer-menu-item {
    color: var(--text-muted) !important;
}

.drawer-menu-item i {
    color: var(--text-muted) !important;
}

.drawer-menu-item:hover, .drawer-menu-item.active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

.drawer-menu-item:hover i, .drawer-menu-item.active i {
    color: var(--text-primary) !important;
}

/* Fix section headers and titles visibility */
.section-header h3, .section-title {
    color: var(--text-primary) !important;
}

/* Fix header navigation links visibility */
.header-nav-links a {
    color: var(--text-muted) !important;
}

.header-nav-links a:hover,
.header-nav-links a.active {
    color: var(--text-primary) !important;
}

/* Additional Text Fixes */
.subpage-card h2, .subpage-card h3 {
    color: var(--text-primary) !important;
}
.subpage-card p, .check-item {
    color: var(--text-muted) !important;
}

/* Fix live search bar alignment and visibility */
.search-bar-container {
    background: var(--surface) !important;
    border-color: var(--glass-border) !important;
}

.search-icon {
    position: static !important;
    transform: none !important;
    color: var(--text-muted) !important;
}

.search-bar-container input {
    color: var(--text-primary) !important;
}

.search-bar-container input::placeholder {
    color: var(--text-muted) !important;
}

/* Fix trending game name color */
.trending-name {
    color: var(--text-primary) !important;
}
