:root {
    --bg-dark: #1a1c35; /* Much brighter dark blue */
    --bg-panel: rgba(40, 42, 70, 0.8);
    --primary: #00f3ff;
    --secondary: #d54aff; /* Brighter purple */
    --text-main: #ffffff;
    --text-muted: #c0c0e0; /* Very bright muted text */
    --border-color: rgba(255, 255, 255, 0.3);
    --glow-primary: 0 0 30px rgba(0, 243, 255, 0.6);
    --glow-secondary: 0 0 30px rgba(213, 74, 255, 0.6);
    --card-gradient: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
}

body {
    font-family: 'Rajdhani', 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(188, 19, 254, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 85% 75%, rgba(0, 243, 255, 0.35) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

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

/* Header */
header {
    background: rgba(10, 11, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

header .flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--primary);
    text-shadow: var(--glow-primary);
    position: relative;
    padding-left: 20px;
}

.logo::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--secondary);
    box-shadow: var(--glow-secondary);
    border-radius: 50%;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    position: relative;
}

nav a:hover, nav a.active {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: var(--glow-primary);
}

.admin-btn {
    border: 1px solid var(--secondary);
    color: var(--secondary) !important;
    padding: 6px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.admin-btn:hover {
    background: var(--secondary);
    color: white !important;
    box-shadow: var(--glow-secondary);
}

/* Hero Banner */
.hero {
    text-align: center;
    padding: 6rem 1rem;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent 20%, var(--bg-dark) 80%),
                linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    opacity: 0.3;
    z-index: -1;
    perspective: 500px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
}

.hero p {
    color: var(--text-muted);
    font-size: 1.4rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Search Bar */
.search-container {
    margin: 4rem auto 3rem;
    display: flex;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 10;
}

.search-input {
    width: 100%;
    max-width: 800px;
    padding: 25px 40px;
    border-radius: 50px;
    background: rgba(30, 32, 60, 0.9);
    border: 2px solid var(--primary);
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 2px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    border-color: var(--secondary);
    background: rgba(40, 42, 80, 0.95);
    box-shadow: 0 0 50px rgba(188, 19, 254, 0.5);
    outline: none;
    transform: scale(1.05);
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 2rem;
    padding: 0 20px;
}

.tag-chip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
    text-transform: uppercase;
}

.tag-chip:hover, .tag-chip.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
    transform: translateY(-3px);
}

/* Grid & Cards */
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin: 3rem 0 2rem;
    display: flex;
    align-items: center;
    color: var(--text-main);
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 30px;
    background: var(--secondary);
    margin-right: 15px;
    box-shadow: var(--glow-secondary);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    padding-bottom: 6rem;
}

.card {
    background: var(--card-gradient);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

.card-thumb {
    height: 200px;
    background-color: #1a1a2e;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: opacity 0.3s;
}

.card-thumb.lazy-bg {
    background-image: none !important;
    background-color: #0f1020;
}

.card-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(10, 11, 30, 0.9), transparent);
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.badge.game {
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.badge.video {
    background: rgba(0, 0, 0, 0.8);
    color: var(--secondary);
    border: 1px solid var(--secondary);
}

.card-content {
    padding: 1.5rem;
    position: relative;
}

.card h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.6rem;
    margin: 0 0 0.5rem;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    height: 3rem;
    overflow: hidden;
}

/* Card Tags */
.card-tags {
    padding: 0 1.5rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: -0.5rem;
}

.card-tag-sm {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 5px rgba(0, 243, 255, 0.2);
}

.btn-play {
    display: block;
    background: transparent;
    color: var(--primary);
    text-align: center;
    padding: 12px;
    border: 1px solid var(--primary);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-play::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-play:hover {
    background: var(--primary);
    color: #000;
    box-shadow: var(--glow-primary);
}

.btn-play:hover::before {
    left: 100%;
}

/* Admin Specific */
.admin-body {
    background: var(--bg-dark); 
    color: var(--text-main);
}

.admin-container {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.admin-container h3 {
    margin-top: 0;
    color: var(--primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

input, select, textarea {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px;
    border-radius: 6px;
    font-family: inherit;
    transition: border 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

th {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 10px;
    border-bottom: 2px solid var(--border-color);
}

td {
    background: rgba(255,255,255,0.02);
    padding: 15px;
}

td:first-child { border-radius: 8px 0 0 8px; }
td:last-child { border-radius: 0 8px 8px 0; }

.btn-edit, .btn-del {
    padding: 6px 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-edit { 
    background: transparent; 
    border: 1px solid var(--primary); 
    color: var(--primary);
}

.btn-del { 
    background: transparent; 
    border: 1px solid #ff4757; 
    color: #ff4757; 
}

.btn-edit:hover { background: rgba(0, 243, 255, 0.1); }
.btn-del:hover { background: rgba(255, 71, 87, 0.1); }

button.save {
    background: var(--secondary);
    box-shadow: var(--glow-secondary);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

button.save:hover {
    background: #d54aff;
    transform: translateY(-2px);
}
