
:root {
    /* Color Palette - Modern Dark/Gaming Theme */
    --color-bg: #0f172a;
    --color-bg-secondary: #1e293b;
    --color-surface: #334155;
    --color-primary: #8b5cf6; /* Violet */
    --color-primary-hover: #7c3aed;
    --color-accent: #38bdf8; /* Sky Blue */
    --color-success: #10b981;
    --color-text-main: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-border: #475569;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    --gradient-hover: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
    --gradient-surface: linear-gradient(to bottom right, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));

    /* Spacing & Sizing */
    --container-width: 75rem; /* ~1200px */
    --header-height: 4.5rem;
    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-main);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(139, 92, 246, 0.2);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-top: 3rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    margin-top: 2rem;
    color: var(--color-accent);
}

p {
    margin-bottom: 1.25rem;
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

/* Common Container */
section, header, footer {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 5px rgba(139, 92, 246, 0.5); }
    50% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.8); }
    100% { box-shadow: 0 0 5px rgba(139, 92, 246, 0.5); }
}

/* Header Styles */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

header span {
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* Placeholder for logo if empty in HTML */
header span:empty::before {
    content: 'UP-X';
    display: block;
}

header ul {
    display: flex;
    gap: 1.5rem;
    margin: 0;
}

header ul li a {
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: var(--transition-fast);
}

header ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-accent);
}

/* Intro / Hero Section */
.intro {
    text-align: center;
    padding: 4rem 1.5rem;
    background: radial-gradient(circle at center, var(--color-bg-secondary) 0%, var(--color-bg) 100%);
    border-radius: var(--border-radius-lg);
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.8s ease-out;
}

.intro p {
    font-size: 1.25rem;
    max-width: 40rem;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

/* Call to Action Button */
.intro a[href="/go/"], 
a[href*="register"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
    transform: translateY(0);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.intro a[href="/go/"]:hover,
a[href*="register"]:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.5);
    background: var(--gradient-hover);
}

.intro a[href="/go/"]:active,
a[href*="register"]:active {
    transform: translateY(-1px);
}

/* Content Area */
.content, section:not(.intro) {
    animation: fadeIn 1s ease-out;
}

/* Lists styling within content */
.content ul, 
section:not(.intro) ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.content li, 
section:not(.intro) li {
    background: var(--color-bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition-smooth);
}

.content li:hover,
section:not(.intro) li:hover {
    transform: translateY(-5px);
    background: var(--color-surface);
    border-color: rgba(139, 92, 246, 0.3);
}

li strong {
    color: var(--color-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

thead th {
    background-color: var(--color-surface);
    color: var(--color-accent);
    font-weight: 700;
    text-align: left;
    padding: 1.25rem;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
    font-size: 0.95rem;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Form Elements (General styling for potential inputs) */
input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    color: var(--color-text-main);
    font-family: inherit;
    transition: var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Footer Styling */
footer {
    margin-top: auto;
    background-color: var(--color-bg-secondary);
    padding-top: 3rem;
    padding-bottom: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

footer ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0;
}

footer li a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    position: relative;
    padding-bottom: 0.25rem;
    text-decoration: none;
}

footer li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

footer li a:hover {
    color: var(--color-text-main);
}

footer li a:hover::after {
    width: 100%;
}

/* Images Generic */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    filter: brightness(0.9);
    transition: var(--transition-fast);
}

img:hover {
    filter: brightness(1);
    transform: scale(1.01);
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --container-width: 90vw;
    }
}

@media (max-width: 768px) {
    /* Header Stack */
    header {
        height: auto;
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    header ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    header ul li a {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        background-color: rgba(255, 255, 255, 0.05);
    }

    /* Table Scroll */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Grid Layouts to Single Column */
    .content ul, 
    section:not(.intro) ul {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    .intro {
        padding: 2rem 1rem;
    }
    
    .intro a[href="/go/"] {
        width: 100%;
        max-width: 300px;
    }
}

/* Print Styles */
@media print {
    body {
        background: #fff;
        color: #000;
    }
    header, footer, a[href="/go/"] {
        display: none;
    }
}
