/**
 * GameDB - Base CSS
 * 
 * Light theme with glassmorphism
 */

/* ==========================================
   CSS Variables - LIGHT THEME
   ========================================== */
:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;

    /* Gradient */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-bg: linear-gradient(135deg, #e0f2fe 0%, #ddd6fe 50%, #fce7f3 100%);

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Text - LIGHT THEME */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Backgrounds - LIGHT THEME */
    --bg-body: linear-gradient(135deg, #e0f2fe 0%, #ddd6fe 50%, #fce7f3 100%);

    /* Glassmorphism - LIGHT */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    --glass-blur: blur(20px);

    /* Borders */
    --border-color: rgba(99, 102, 241, 0.2);
    --border-light: rgba(255, 255, 255, 0.9);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 400ms ease;

    /* Font */
    --font-family: 'Outfit', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;

    /* Container */
    --container-max: 1300px;
    --container-padding: 40px;
}

/* ==========================================
   Reset
   ========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-body);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

ul,
ol {
    list-style: none;
}

/* ==========================================
   Container
   ========================================== */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--container-padding) 60px;
    position: relative;
    z-index: 1;
}

/* ==========================================
   Glass Effect - LIGHT
   ========================================== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn-primary {
    padding: 16px 40px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-sm);
}

.btn-danger {
    background: var(--error);
    color: white;
    border: 1px solid var(--error);
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ==========================================
   Forms - LIGHT THEME
   ========================================== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all var(--transition-normal);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group small {
    display: block;
    margin-top: var(--space-xs);
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

/* ==========================================
   Cards & Sections
   ========================================== */
.section {
    margin-bottom: 80px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.view-all {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    transition: transform var(--transition-normal);
}

.view-all:hover {
    transform: translateX(4px);
    color: var(--primary);
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ==========================================
   Toasts
   ========================================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: white;
    animation: slideIn 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--error);
}

.toast-warning {
    background: var(--warning);
}

.toast-info {
    background: var(--info);
}

.toast button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.toast-fade {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   Flash Messages
   ========================================== */
.flash-messages {
    margin-top: 20px;
}

.flash-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.flash-success {
    border-left: 4px solid var(--success);
}

.flash-error {
    border-left: 4px solid var(--error);
}

.flash-warning {
    border-left: 4px solid var(--warning);
}

.flash-info {
    border-left: 4px solid var(--info);
}

.flash-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

/* ==========================================
   Lightbox
   ========================================== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.video-container {
    position: relative;
    width: 80vw;
    max-width: 1000px;
    aspect-ratio: 16/9;
}

.video-container iframe {
    width: 100%;
    height: 100%;
}

/* ==========================================
   Error Pages
   ========================================== */
.error-page {
    text-align: center;
    padding: 80px 40px;
    margin: 40px auto;
    max-width: 500px;
    border-radius: var(--radius-xl);
}

.error-page h1 {
    font-size: 6rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-page h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.error-page p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* ==========================================
   Search Results
   ========================================== */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    padding: 15px;
    display: none;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.search-section {
    margin-bottom: 15px;
}

.search-section h4 {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: 10px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.search-item:hover {
    background: var(--gradient-primary);
    color: white;
}

.search-item img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

/* ==========================================
   Rating
   ========================================== */
.rating {
    color: #f59e0b;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
    :root {
        --container-padding: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-title {
        font-size: 24px;
    }
}