/* ========================================
   ULTRA LIGHTWEIGHT THEME - MINIMAL RAM USAGE
   Single file to replace all heavy CSS
   ======================================== */

/* ============ ROOT VARIABLES ============ */
:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent: #8b5cf6;
    --border: rgba(139, 92, 246, 0.2);
}

/* ============ GLOBAL RESETS ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Disable ALL heavy effects */
* {
    backdrop-filter: none !important;
    will-change: auto !important;
    animation: none !important;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============ SIDEBAR ============ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.2s ease;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-toggle {
    display: none;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-list {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
    background: rgba(139, 92, 246, 0.1);
}

.nav-link i {
    width: 20px;
    font-size: 1.125rem;
}

.sidebar-social {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.sidebar-social h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--accent);
    text-decoration: none;
    transition: background 0.2s ease;
}

.social-links a:hover {
    background: rgba(139, 92, 246, 0.2);
}

/* ============ MAIN CONTENT ============ */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
}

/* ============ HERO SECTION ============ */
.hero {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 100%);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-secondary);
}

/* ============ SECTIONS ============ */
.section {
    padding: 4rem 2rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ============ CARDS ============ */
.games-grid,
.tools-grid,
.console-grid,
.discord-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card,
.tool-card,
.console-card,
.discord-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.2s ease;
}

.game-card:hover,
.tool-card:hover,
.console-card:hover,
.discord-card:hover {
    transform: translateY(-4px);
}

.game-image,
.console-image {
    width: 100%;
    height: 200px;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.game-image img,
.console-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-overlay {
    padding: 0.5rem;
}

.game-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.game-info,
.tool-info,
.console-info {
    text-align: center;
}

.game-title,
.console-info h4,
.tool-info h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.game-description,
.tool-info p,
.console-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.game-link,
.tool-link,
.console-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.game-link:hover,
.tool-link:hover,
.console-link:hover {
    background: rgba(139, 92, 246, 0.2);
}

/* ============ DISCORD CARDS ============ */
.discord-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.discord-icon {
    width: 50px;
    height: 50px;
    background: rgba(88, 101, 242, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5865f2;
    font-size: 1.5rem;
}

.discord-info h4 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.discord-members {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.discord-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.discord-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.discord-features .feature {
    padding: 0.25rem 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.discord-join {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #5865f2;
    color: white;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.discord-join:hover {
    opacity: 0.9;
}

/* ============ TOOL CARDS ============ */
.tool-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============ SEARCH ============ */
.search-container {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: var(--accent);
}

/* ============ FOOTER ============ */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.footer-brand h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.disclaimer {
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* ============ MOBILE RESPONSIVE ============ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 1.5rem;
        cursor: pointer;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .games-grid,
    .tools-grid,
    .console-grid,
    .discord-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat h3 {
        font-size: 2rem;
    }
}

/* ============ MOBILE MENU BUTTON ============ */
.mobile-sidebar-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 99;
    transition: background 0.2s ease;
}

.mobile-sidebar-btn:hover {
    background: rgba(139, 92, 246, 0.1);
}

@media (max-width: 1024px) {
    .mobile-sidebar-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============ CATEGORY TITLES ============ */
.category {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-title i {
    color: var(--accent);
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 10px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9b6cf6;
}

/* ============ LOADING OPTIMIZATION ============ */
img {
    max-width: 100%;
    height: auto;
}

/* Remove any remaining animations */
@keyframes none {
    0%, 100% { transform: none; }
}

/* Force hardware acceleration only where needed */
.game-card,
.tool-card,
.console-card,
.discord-card {
    transform: translateZ(0);
}
