/* Theme Variables and Settings */
:root {
    /* Light Theme (Default) - Gaming Inspired */
    --bg-primary: #f0f4fc;
    --bg-secondary: #e4ebf5;
    --bg-tertiary: #d8e1f3;
    --bg-card: #ffffff;
    --text-primary: #172554;
    --text-secondary: #334278;
    --text-muted: #6b7cb4;
    --accent-primary: #0ea5e9;
    --accent-secondary: #06b6d4;
    --accent-hover: #0284c7;
    --border-color: #c7d7f0;
    --shadow-sm: 0 2px 4px 0 rgba(34, 82, 156, 0.08);
    --shadow: 0 4px 6px -1px rgba(34, 82, 156, 0.12), 0 2px 4px -1px rgba(34, 82, 156, 0.08);
    --shadow-md: 0 6px 10px -1px rgba(34, 82, 156, 0.12), 0 4px 6px -2px rgba(34, 82, 156, 0.08);
    --shadow-lg: 0 15px 20px -3px rgba(34, 82, 156, 0.12), 0 8px 12px -6px rgba(34, 82, 156, 0.08);
    --header-bg: rgba(240, 244, 252, 0.95);
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #3b82f6 100%);
    --scrollbar-track: #e4ebf5;
    --scrollbar-thumb: #0ea5e9;
    --scrollbar-thumb-hover: #0284c7;
    --card-highlight: rgba(14, 165, 233, 0.08);
    --card-hover-border: #0ea5e9;
}

/* Dark Theme */
:root.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-hover: #818cf8;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --header-bg: rgba(15, 23, 42, 0.9);
    --gradient-primary: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 100%);
    --scrollbar-track: #1e293b;
    --scrollbar-thumb: #4f46e5;
    --scrollbar-thumb-hover: #6366f1;
}

/* Apply theme variables to elements */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.header {
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.hero-gradient {
    background: var(--gradient-primary);
}

/* Card styling with enhanced hover effect */
.game-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background: var(--card-highlight);
    transition: height 0.3s ease;
    z-index: 0;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-lg);
}

.game-card:hover::before {
    height: 100%;
}

.game-card > * {
    position: relative;
    z-index: 1;
}

/* Theme toggle button - Redesigned Modern Version */
.theme-toggle {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    transition: transform 0.5s ease, background-color 0.3s ease;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    outline: none;
}

.theme-toggle:hover {
    transform: rotate(15deg);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

.theme-toggle:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.5);
}

.theme-toggle .sun-moon-container {
    position: relative;
    width: 24px;
    height: 24px;
    transition: transform 0.5s ease;
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.theme-toggle .sun-icon {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: translateY(10px) rotate(-90deg);
}

.theme-toggle .sun-icon i {
    color: #f59e0b;
    font-size: 18px;
}

.theme-toggle .moon-icon i {
    color: #c4b5fd;
    font-size: 18px;
}

:root.dark .theme-toggle {
    background-color: var(--bg-secondary);
}

:root.dark .theme-toggle .sun-icon {
    opacity: 0;
    transform: translateY(-10px) rotate(90deg);
}

:root.dark .theme-toggle .moon-icon {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

:root.dark .theme-toggle:hover {
    transform: rotate(-15deg);
}

/* Custom scrollbar with theme variables */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Form elements with improved styling */
input, textarea, select {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

/* Buttons with theme variables */
.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
    
    .theme-toggle .sun-moon-container {
        width: 20px;
        height: 20px;
    }
    
    .theme-toggle .sun-icon i,
    .theme-toggle .moon-icon i {
        font-size: 16px;
    }
}

/* Animation for theme transition */
.theme-transition {
    transition: background-color 0.3s ease, 
                color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}
