/* ==========================================================================
   Galaxy Games - Studio Stylesheet
   Crafted with an authentic indie aesthetic, high contrast, and full accessibility.
   ========================================================================== */

:root {
    --bg-main: #0c1017;
    --bg-card: #151c27;
    --bg-card-hover: #1b2332;
    --border-color: #242f42;
    --border-focus: #e28743;
    
    --text-primary: #f0f4f8;
    --text-secondary: #9aa8bc;
    --text-muted: #6b7a90;
    
    --accent-amber: #e89858;
    --accent-terracotta: #d96b43;
    --accent-green: #38b000;
    --accent-blue: #3a86ff;
    
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --max-width: 960px;
    --radius: 8px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent-amber);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

a:hover, a:focus {
    color: #f7ba7e;
}

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 3px;
}

/* Header & Navigation */
header {
    background-color: #080b10;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.brand svg {
    color: var(--accent-amber);
}

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

nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius);
    transition: background 0.15s ease, color 0.15s ease;
}

nav a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

nav a:hover, nav a:focus, nav a.active {
    color: #ffffff;
    background-color: var(--bg-card);
}

.auth-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Main Layout */
main {
    flex: 1;
    max-width: var(--max-width);
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 1.25rem;
}

/* Hero & Intro */
.intro-section {
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
}

.intro-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.intro-section p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 720px;
    line-height: 1.7;
}

/* Cards & Content Sections */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.game-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.game-card:hover {
    border-color: #3b4b66;
    background-color: var(--bg-card-hover);
}

.game-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.game-card-header h2, .game-card-header h3 {
    font-size: 1.4rem;
    color: #ffffff;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.badge-dev {
    background-color: #2b2317;
    color: #f5b041;
    border: 1px solid #634b22;
}

.badge-staff {
    background-color: #1e2a3a;
    color: #64b5f6;
    border: 1px solid #2d4560;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--accent-amber);
    color: #10141a;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.btn:hover, .btn:focus {
    background-color: #f7a868;
    color: #080a0e;
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn-secondary {
    background-color: #232d3d;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #2e3b50;
    color: #ffffff;
}

.btn-download {
    background-color: #2e7d32;
    color: #ffffff;
    font-size: 1.05rem;
    padding: 0.75rem 1.4rem;
}

.btn-download:hover, .btn-download:focus {
    background-color: #388e3c;
    color: #ffffff;
}

/* Details List & Features */
.feature-list {
    list-style: none;
    margin: 1.5rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.feature-list li {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: var(--radius);
}

.feature-list li h4 {
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-list li p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Notice Panels */
.notice-panel {
    background-color: var(--bg-card);
    border-left: 4px solid var(--accent-amber);
    padding: 1.25rem 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
}

.notice-panel h3 {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.notice-panel p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Staff Download Section (controlled by JS auth) */
#staff-downloads {
    display: none;
    background-color: #121d28;
    border: 1px solid #1f3d59;
    border-left: 4px solid var(--accent-blue);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 2rem 0;
}

body.is-staff #staff-downloads {
    display: block;
}

body.is-staff #public-status {
    display: none;
}

/* Form Styles */
.form-box {
    max-width: 420px;
    margin: 2rem auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
}

.form-box h1 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background-color: #0c1017;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
}

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

.form-message {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    display: none;
    font-size: 0.9rem;
}

.form-message.error {
    display: block;
    background-color: #3b1816;
    border: 1px solid #752923;
    color: #ff9b94;
}

.form-message.success {
    display: block;
    background-color: #14331e;
    border: 1px solid #245934;
    color: #a3e6b7;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    background-color: #080b10;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover, .footer-links a:focus {
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .intro-section h1 {
        font-size: 1.75rem;
    }
    nav ul {
        gap: 0.75rem;
    }
}
