/* 
  SGC GAME - Phenomenal Edition 
  Design System & Styles
*/

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Cairo:wght@300;400;700&family=Inter:wght@300;400;600;800&display=swap');

:root {
    /* Gaming Themes (PUBG x Fortnite Mix) */
    --bg-dark: #0a0b0d; /* Gritty PUBG Dark */
    --panel-dark: rgba(20, 22, 26, 0.9);
    --accent-primary: #ffce00; /* PUBG Yellow */
    --accent-secondary: #8b5cf6; /* Fortnite Purple */
    --accent-tertiary: #3b82f6; /* Fortnite Blue */
    --text-primary: #ffffff;
    --text-muted: #94a3b8;
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --glow-yellow: 0 0 15px rgba(255, 206, 0, 0.5);
    --glow-purple: 0 0 15px rgba(139, 92, 246, 0.5);
    
    /* Light Mode (Futuristic) */
    --bg-light: #f0f2f5;
    --panel-light: rgba(255, 255, 255, 0.7);
    --accent-light: #6366f1;
    --accent-light-alt: #ec4899;
    --text-primary-light: #1f2937;
    --text-muted-light: #6b7280;
    
    /* Transitions */
    --transition-speed: 0.4s;
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --panel-color: rgba(255, 255, 255, 0.85);
    --accent: #6366f1;
    --accent-secondary: #ec4899;
    --text-color: #0f172a;
    --text-muted-color: #64748b;
    --border-color: rgba(0, 0, 0, 0.08);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    --glow-yellow: 0 0 15px rgba(255, 206, 0, 0.2);
    --glow-purple: 0 0 15px rgba(224, 231, 255, 0.5);
}

[data-theme="dark"] {
    --bg-color: var(--bg-dark);
    --panel-color: rgba(10, 11, 13, 0.85); /* Darker for better contrast */
    --accent: var(--accent-primary);
    --text-color: var(--text-primary);
    --text-muted-color: var(--text-muted);
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', 'Cairo', sans-serif;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

[dir="rtl"] {
    font-family: 'Cairo', sans-serif;
}

h1, h2, h3, .gaming-font {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Glitch Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    flex-direction: column;
}

.glitch {
    font-size: clamp(2rem, 10vw, 5rem); /* Responsive size */
    font-weight: 900;
    color: #fff;
    position: relative;
    text-shadow: 0.05em 0 0 #ff00ff, -0.025em -0.05em 0 #00ffff, 0.025em 0.05em 0 #ff00ff;
    animation: glitch 1s infinite;
}

.loader-bar-container {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: load 2s infinite;
}

@keyframes load {
    0% { left: -100%; }
    50% { left: 0; }
    100% { left: 100%; }
}

@keyframes glitch {
    0% { text-shadow: 0.05em 0 0 #ff00ff, -0.025em -0.05em 0 #00ffff, 0.025em 0.05em 0 #ff00ff; }
    14% { text-shadow: 0.05em 0 0 #ff00ff, -0.025em -0.05em 0 #00ffff, 0.025em 0.05em 0 #ff00ff; }
    15% { text-shadow: -0.05em -0.025em 0 #ff00ff, 0.025em 0.025em 0 #00ffff, -0.05em -0.05em 0 #ff00ff; }
    49% { text-shadow: -0.05em -0.025em 0 #ff00ff, 0.025em 0.025em 0 #00ffff, -0.05em -0.05em 0 #ff00ff; }
    50% { text-shadow: 0.025em 0.05em 0 #ff00ff, 0.05em 0 0 #00ffff, 0 -0.05em 0 #ff00ff; }
    99% { text-shadow: 0.025em 0.05em 0 #ff00ff, 0.05em 0 0 #00ffff, 0 -0.05em 0 #ff00ff; }
    100% { text-shadow: -0.025em 0 0 #ff00ff, -0.025em -0.025em 0 #00ffff, -0.025em -0.05em 0 #ff00ff; }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    background: var(--panel-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--accent);
}

.controls {
    display: flex;
    gap: 15px;
}

.btn-icon {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-icon:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-bg.active {
    opacity: 1;
}

.hero-content {
    max-width: 1000px; /* Increased max-width */
    z-index: 10;
}

.hero h1 {
    font-size: 6.5rem; /* Increased from 5rem */
    line-height: 0.9;
    margin-bottom: 30px;
    font-weight: 900;
}

.hero p {
    font-size: 1.5rem; /* Increased from 1.2rem */
    color: var(--text-muted);
    margin-bottom: 50px;
    line-height: 1.6;
    max-width: 800px;
}

.pulse-text {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; text-shadow: 0 0 20px var(--accent); }
    100% { opacity: 0.8; }
}

/* Particles Canvas */
#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Gaming Grid */
.section-title {
    text-align: center;
    margin: 100px 0 50px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    padding: 0 100px 100px;
}

.game-card {
    background: var(--panel-color);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
    position: relative;
    transform-style: preserve-3d;
}

.game-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s;
}

.game-card:hover .card-img {
    transform: scale(1.1);
}

.card-body {
    padding: 25px;
}

.card-tag {
    background: var(--accent);
    color: #000;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.7rem;
    display: inline-block;
    margin-bottom: 10px;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.btn-read {
    display: inline-block;
    margin-top: 15px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    padding-bottom: 5px;
}

.btn-read::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: 0.3s;
}

.btn-read:hover::after {
    width: 100%;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    padding-top: 80px;
}

.sidebar {
    width: 280px;
    background: var(--panel-color);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    transition: width 0.3s;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 12px;
    transition: 0.3s;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(0, 243, 255, 0.1);
    color: var(--accent);
}

.main-content {
    flex: 1;
    padding: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.stat-card {
    background: var(--panel-color);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-muted-color);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Advanced Data Table */
.data-table-wrapper {
    background: var(--panel-color);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--text-muted-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
}

[dir="rtl"] th {
    text-align: right;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-published { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.status-draft { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

/* Mirroring Logic */
[dir="rtl"] .sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

[dir="rtl"] .hero {
    padding: 0 100px;
    text-align: right;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero { padding: 0 50px; }
    .hero h1 { font-size: 4rem; }
    .news-grid { padding: 0 50px 100px; }
}

@media (max-width: 768px) {
    .hero { 
        padding: 0 20px; 
        text-align: center;
        justify-content: center;
    }
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1rem; }
    
    nav { 
        padding: 15px 20px; 
    }
    .nav-links {
        display: none; /* Hide for now, could add hamburger */
    }
    
    .news-grid { 
        grid-template-columns: 1fr;
        padding: 0 20px 100px; 
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100% !important;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 10px;
    }
    .sidebar-menu li {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .main-content {
        padding: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
