/* Base styles & Variables */
:root {
    --bg-dark: #0b0b0f;
    --bg-panel: #12121a;
    --bg-card: #1a1a26;
    --accent-purple: #7b2cbf;
    --accent-glow: #9d4edd;
    --text-light: #f3f4f6;
    --text-gray: #9ca3af;
    --border-color: #2a2a3a;
}

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

body {
    font-family: sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    padding-bottom: 60px;
}

/* Header & Dropdown Navigation */
header {
    background-color: rgba(18, 18, 26, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    text-transform: uppercase;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.95rem;
}

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

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-panel);
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.4);
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.dropdown-content li a {
    padding: 0.5rem 1rem;
    display: block;
    color: var(--text-gray);
    white-space: nowrap;
}

.dropdown-content li a:hover {
    background-color: var(--bg-card);
    color: var(--accent-glow);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Layout & Cards */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem 2rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.game-card h3 {
    color: var(--accent-glow);
    margin-bottom: 1rem;
}

.game-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.play-btn {
    background: var(--accent-purple);
    color: white;
}

.play-btn:hover {
    background: var(--accent-glow);
}

.view-btn {
    background-color: var(--border-color);
    color: var(--text-light);
}

.view-btn:hover {
    background-color: var(--accent-purple);
}

/* Single Game Page Specifics */
.game-detail {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
}

.game-detail img {
    max-width: 300px;
    border-radius: 10px;
    float: left;
    margin-right: 2rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.instructions {
    background: var(--bg-dark);
    padding: 1rem;
    border-left: 3px solid var(--accent-purple);
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Game Detail Grid Layout (Replaces floats) */
.game-detail-grid {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 160px 1fr; /* Reduced from 320px to roughly half */
    gap: 2rem;
    align-items: start;
}

.game-image-col img {
    width: 100%;
    max-width: 160px; /* Forces the image display size down */
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: block;
}

.game-info-col h1 {
    color: var(--accent-glow);
    margin-bottom: 1rem;
}

.game-info-col p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Responsive fix for mobile screens: stacks image on top of text */
@media (max-width: 768px) {
    .game-detail-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
}

/* Ambient Background Orbs */
.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1; /* Keeps it strictly in the background behind all content */
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12; /* Subtle, atmospheric glow */
}

.orb-1 {
    width: 450px;
    height: 450px;
    background: var(--accent-purple);
    top: 10%;
    left: 10%;
    animation: floatOrb1 15s ease-in-out infinite alternate;
}

.orb-2 {
    width: 550px;
    height: 550px;
    background: var(--accent-glow);
    bottom: 10%;
    right: 10%;
    animation: floatOrb2 20s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(150px, 100px) scale(1.2); }
}

@keyframes floatOrb2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-150px, -120px) scale(1.1); }
}
