/* ============================
   LAN-Party Turniersystem
   Dark Gaming Theme
   ============================ */

/* --- CSS Variables --- */
:root {
    --bg-body: #0f0f1a;
    --bg-card: #1e1e2e;
    --bg-card-alt: #2a2a3a;
    --bg-input: #2a2a3a;
    --bg-hover: #2a2a4a;
    --bg-sidebar: #1e1e2e;
    --accent: #00ffaa;
    --accent-hover: #00ddaa;
    --secondary: #00aaff;
    --secondary-hover: #0099ee;
    --error: #ff5555;
    --error-hover: #ff3333;
    --warning: #ffaa00;
    --success: #00ffaa;
    --text-primary: #e0e0e0;
    --text-secondary: #999;
    --text-muted: #666;
    --border: #333;
    --border-light: #444;
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.5);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --transition: 0.2s ease;
    --navbar-height: 56px;
    --sidebar-width: 200px;
    --container-max: 1200px;
}

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

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

body {
    font-family: var(--font);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

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

img {
    max-width: 100%;
    height: auto;
}

hr, .divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.text-accent { color: var(--accent); }
.text-secondary { color: var(--secondary); }
.text-error { color: var(--error); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

.link-accent {
    color: var(--accent);
    font-weight: 500;
}

.link-accent:hover {
    text-decoration: underline;
}

/* =============================================
   FIXED SIDEBAR LAYOUT
   ============================================= */

/* --- Fixed Sidebar (200px, left) --- */
.fixed-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
}

.sidebar-brand-link:hover {
    color: var(--accent);
}

.sidebar-brand-icon {
    font-size: 1.4rem;
    color: var(--accent);
}

.sidebar-brand-text {
    text-transform: uppercase;
}

.sidebar-logo {
    width: 100%;
    height: auto;
    display: block;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.5rem 1rem;
}

.sidebar-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    padding: 0.5rem 1rem 0.25rem;
    font-weight: 600;
}

.sidebar-nav-main {
    padding: 0.25rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: all var(--transition);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.sidebar-nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.sidebar-nav-link.active {
    color: var(--accent);
    background: rgba(0, 255, 170, 0.08);
}

.sidebar-nav-icon {
    font-size: 0.9rem;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav-create {
    color: var(--accent);
    font-weight: 600;
}

.sidebar-nav-create:hover {
    background: rgba(0, 255, 170, 0.1);
    color: var(--accent);
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    text-align: center;
    flex-shrink: 0;
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1050;
}

.sidebar-overlay.active {
    display: block;
}

/* --- App Wrapper (shifted right by sidebar width) --- */
.app-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Container / Layout --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.app-container {
    flex: 1;
    padding-top: var(--navbar-height);
}

.main-content {
    min-height: calc(100vh - var(--navbar-height) - 80px);
    padding: 1.5rem;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 1.5rem;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1.5rem;
}

/* --- Grid System --- */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.grid-sidebar {
    grid-template-columns: 300px 1fr;
}

@media (max-width: 992px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-sidebar { grid-template-columns: 1fr; }
    .layout-with-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* --- Spacing Utilities --- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* --- Navbar (right of sidebar) --- */
.navbar {
    position: sticky;
    top: 0;
    height: var(--navbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
}

/* Hide brand text on desktop (sidebar has the branding) */
.nav-brand-mobile {
    display: none;
}

/* Sidebar toggle: visible only on mobile */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.nav-brand:hover { color: var(--accent); }
.brand-icon { font-size: 1.5rem; }

.nav-logo {
    height: 28px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    flex: 1;
}

.nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-admin {
    color: var(--warning);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.nav-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.nav-username {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Hamburger lines for sidebar toggle */
.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition);
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

/* --- Responsive: Mobile (sidebar hidden, toggle visible) --- */
@media (max-width: 768px) {
    .fixed-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .fixed-sidebar.open {
        transform: translateX(0);
    }

    .app-wrapper {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .nav-brand-mobile {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        gap: 0;
    }

    .nav-links.active { display: flex; }

    .nav-link {
        padding: 0.75rem 1rem;
    }

    .nav-username { display: none; }

    .main-content {
        padding: 1rem;
    }
}

/* --- Dropdown --- */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition);
}

.dropdown-toggle:hover {
    border-color: var(--accent);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    overflow: hidden;
}

.dropdown-menu.active { display: block; }

.dropdown-item {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: background var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dropdown-item-danger { color: var(--error); }
.dropdown-item-danger:hover { background: rgba(255, 85, 85, 0.1); color: var(--error); }

.dropdown-divider {
    border-top: 1px solid var(--border);
    margin: 0.25rem 0;
}

/* --- Old sidebar classes (keep for compatibility) --- */
.sidebar {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: calc(var(--navbar-height) + 1.5rem);
}

.sidebar-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.sidebar-section { margin-bottom: 1.5rem; }
.sidebar-section:last-child { margin-bottom: 0; }

.sidebar-nav {
    list-style: none;
}

.sidebar-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: 0.9rem;
    margin-bottom: 0.125rem;
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-hover {
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.card-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.card-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.meta-icon { margin-right: 0.25rem; }
.meta-separator {
    margin: 0 0.5rem;
    color: var(--text-muted);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--accent);
    color: var(--bg-body);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--bg-body);
}

.btn-secondary {
    background: var(--bg-card-alt);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-danger:hover {
    background: var(--error-hover);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--bg-body);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.btn-outline-secondary:hover {
    background: var(--secondary);
    color: var(--bg-body);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.8rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    font-family: var(--font);
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 255, 170, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control-sm {
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-col {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-section-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    accent-color: var(--accent);
    width: 1rem;
    height: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* --- Tables --- */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

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

thead {
    background: var(--bg-card-alt);
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

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

tbody tr {
    transition: background var(--transition);
}

tbody tr:hover {
    background: var(--bg-hover);
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-admin {
    background: rgba(255, 170, 0, 0.15);
    color: var(--warning);
}

.badge-success {
    background: rgba(0, 255, 170, 0.15);
    color: var(--accent);
}

.badge-info {
    background: rgba(0, 170, 255, 0.15);
    color: var(--secondary);
}

.badge-danger {
    background: rgba(255, 85, 85, 0.15);
    color: var(--error);
}

.badge-warning {
    background: rgba(255, 170, 0, 0.15);
    color: var(--warning);
}

/* --- Flash Messages --- */
.flash-container {
    padding: 1rem 1.5rem 0;
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    animation: flashIn 0.3s ease;
}

.flash-success {
    background: rgba(0, 255, 170, 0.1);
    border: 1px solid rgba(0, 255, 170, 0.3);
    color: var(--accent);
}

.flash-error {
    background: rgba(255, 85, 85, 0.1);
    border: 1px solid rgba(255, 85, 85, 0.3);
    color: var(--error);
}

.flash-warning {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.3);
    color: var(--warning);
}

.flash-info {
    background: rgba(0, 170, 255, 0.1);
    border: 1px solid rgba(0, 170, 255, 0.3);
    color: var(--secondary);
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.25rem;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.flash-close:hover { opacity: 1; }

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 5rem 1.5rem;
    background: linear-gradient(135deg, var(--bg-body), var(--bg-card));
    border-bottom: 1px solid var(--border);
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.hero-logo {
    max-width: 400px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero { padding: 3rem 1.5rem; }
    .hero-title { font-size: 2rem; }
}

/* --- Sections --- */
.section {
    padding: 3rem 0;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.page-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

/* --- Auth Pages --- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--navbar-height) - 80px);
    padding: 2rem 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
}

/* --- Profile --- */
.profile-header {
    margin-bottom: 1.5rem;
}

.profile-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}

.profile-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    color: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
}

.profile-avatar-lg {
    width: 128px;
    height: 128px;
    margin: 0 auto 1rem;
}

.profile-info { flex: 1; }

.profile-nickname {
    font-size: 1.75rem;
    margin-bottom: 0.1rem;
}

.profile-realname {
    color: var(--text-secondary);
    font-size: 1rem;
}

.profile-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.profile-actions {
    flex-shrink: 0;
}

/* Stat Cards */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* --- Error Page --- */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.error-message {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.error-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* --- Login Dropdown --- */
.login-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: none;
}

.login-dropdown.active { display: block; }

.login-dropdown-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    transition: color var(--transition);
}

.modal-close:hover { color: var(--text-primary); }

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* --- Tabs --- */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    gap: 0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font);
    font-weight: 500;
}

.tab:hover { color: var(--text-primary); }

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 2rem;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.pagination a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.pagination .active {
    background: var(--accent);
    color: var(--bg-body);
    border-color: var(--accent);
    font-weight: 600;
}

/* --- Bracket Specific (placeholder structure) --- */
.bracket-container {
    overflow-x: auto;
    padding: 2rem;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 1rem;
    min-width: 220px;
}

/* --- Tooltip --- */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.35rem 0.65rem;
    background: var(--bg-card-alt);
    color: var(--text-primary);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.tooltip:hover::after { opacity: 1; }

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- Selection --- */
::selection {
    background: rgba(0, 255, 170, 0.3);
    color: var(--text-primary);
}

/* ===== Event Description Rendering ===== */
.desc-heading {
    color: #00ffaa;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 2px;
}
.desc-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}
.desc-list li {
    background: rgba(0, 255, 170, 0.04);
    border: 1px solid rgba(0, 255, 170, 0.12);
    border-left: 3px solid #00ffaa;
    border-radius: 8px;
    padding: 0.8rem 1rem 0.8rem 1.1rem;
    line-height: 1.55;
    color: #e0e0e0;
    font-size: 0.95rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.desc-list li:hover {
    background: rgba(0, 255, 170, 0.08);
    border-color: rgba(0, 255, 170, 0.25);
}
.event-description-full .desc-heading,
.hero-event-info .desc-heading {
    margin-top: 1.5rem;
}
.event-description-full p,
.hero-event-info p {
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}
