@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Fredoka+One&family=Press+Start+2P&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: #f0e8e0;
    background: #0f0a1a;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Static background gradient (no animations for performance) */

body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(ellipse 600px 400px at 15% 25%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 500px 500px at 85% 15%, rgba(217, 119, 6, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 400px 600px at 50% 80%, rgba(251, 191, 36, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 300px 300px at 70% 60%, rgba(245, 158, 11, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse 500px 300px at 30% 70%, rgba(217, 119, 6, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Layout */

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

/* Header */

header {
    background: rgba(15, 10, 26, 0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.08);
    color: #fff;
    text-align: center;
    padding: 2rem 0 1.4rem;
    position: relative;
    z-index: 100;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.3), transparent);
}

header .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.header-brand h1 {
    font-family: 'Press Start 2P', 'Inter', sans-serif;
    font-size: 1.8rem;
    margin: 0;
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 50%, #b45309 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.header-brand p {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    margin: 0.15rem 0 0 0;
}

/* Nav */

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    gap: 0.5rem;
    min-width: 0;
}

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

.nav-center {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
}

header nav a, .dropbtn {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.95rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

header nav a:hover, header nav a.active,
.dropbtn:hover, .dropbtn.active {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.dropbtn {
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.caret {
    font-size: 0.55rem;
    opacity: 0.5;
    transition: transform 0.2s;
}

.dropdown:hover .caret { transform: rotate(180deg); }

/* Dropdown */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    min-width: 190px;
    background: rgba(15, 10, 26, 0.97);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: 10px;
    padding: 0.4rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.2s, opacity 0.15s ease;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -0.4rem; left: 0; right: 0;
    height: 0.4rem;
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover,
.dropdown-content:focus-within {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s 0s, opacity 0.15s ease;
}

.dropdown-content a {
    display: block;
    padding: 0.45rem 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 7px;
    transition: all 0.2s ease;
    background: none;
    border: none;
}

.dropdown-content a:hover,
.dropdown-content a.active {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.dropdown-login { min-width: 220px; }

.dropdown-login form { padding: 0.4rem; }

.dropdown-login input {
    width: 100%;
    padding: 0.45rem 0.6rem;
    margin-bottom: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.dropdown-login input:focus {
    border-color: rgba(245, 158, 11, 0.3);
}

.dropdown-login button[type="submit"] {
    width: 100%;
    padding: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 7px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.15));
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.dropdown-login button[type="submit"]:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.25));
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
    margin: 0.25rem 0;
}

.dropdown-register {
    text-align: center !important;
    font-weight: 700 !important;
    color: #fbbf24 !important;
    padding: 0.5rem 0.8rem !important;
}

/* Main */

main {
    padding: 2.5rem 0;
}

section {
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 1.2rem;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.06);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

section:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

/* Typography */

h2 {
    font-family: 'Fredoka One', 'Inter', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: #f0e8e0;
    letter-spacing: -0.3px;
}

h3 {
    font-family: 'Fredoka One', 'Inter', sans-serif;
    font-size: 1.1rem;
    margin: 1.2rem 0 0.8rem;
    color: #f0e8e0;
}

p {
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.93rem;
}

a {
    color: #fbbf24;
    transition: color 0.2s ease;
}

a:hover { color: #fcd34d; }

ul { padding-left: 1.5rem; margin-bottom: 0.8rem; }

li {
    margin-bottom: 0.4rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.93rem;
}

/* Forms */

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

label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
}

input, textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    color: #fff;
    outline: none;
    transition: all 0.25s ease;
}

input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.25); }

input:focus, textarea:focus {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.06);
    background: rgba(255, 255, 255, 0.08);
}

/* Buttons */

button, .btn-primary {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.65rem 1.6rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.13));
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 9px;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}

button:hover, .btn-primary:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.22));
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.1);
}

.btn-secondary {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.65rem 1.6rem;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-small {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 7px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-danger {
    background: rgba(220, 38, 38, 0.08);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.08);
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.12);
}

.btn-copy {
    background: rgba(100, 180, 255, 0.12);
    border-color: rgba(100, 180, 255, 0.1);
    color: #90c8f8;
    font-size: 0.72rem;
    padding: 0.55rem 1.1rem;
    border-radius: 9px;
}

.btn-copy:hover {
    background: rgba(100, 180, 255, 0.2);
    border-color: rgba(100, 180, 255, 0.2);
    box-shadow: 0 6px 20px rgba(60, 140, 220, 0.1);
}

.btn-hero {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
}

.discord-button {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.65rem 1.6rem;
    background: rgba(88, 101, 242, 0.15);
    color: #a8b4ff;
    border: 1px solid rgba(88, 101, 242, 0.15);
    border-radius: 9px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.25s ease;
}

.discord-button:hover {
    background: rgba(88, 101, 242, 0.25);
    border-color: rgba(88, 101, 242, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(71, 82, 196, 0.1);
}

/* Footer */

footer {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    padding: 1.4rem 0;
    font-size: 0.82rem;
    font-weight: 500;
}

/* Alerts */

.alert {
    padding: 0.8rem 1.1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.82rem;
    border: 1px solid;
}

.alert-error {
    background: rgba(220, 38, 38, 0.08);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.12);
}

.alert-success {
    background: rgba(34, 197, 94, 0.06);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.1);
}

.alert-locked {
    background: rgba(250, 204, 21, 0.08);
    color: #fde68a;
    border-color: rgba(250, 204, 21, 0.12);
    text-align: center;
}

.alert-locked strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
}

.form-footer a {
    font-weight: 700;
    text-decoration: none;
}

.form-footer a:hover { text-decoration: underline; }

.inline-form {
    display: flex;
    gap: 0.7rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.inline-form .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

/* Profile / Invite */

.profile-info p {
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.7);
}

.profile-info strong {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.invite-section { text-align: center; }

.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1.2rem;
}

.team-card p { margin: 0.3rem 0; }

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(245, 158, 11, 0.2);
}

.rank { font-weight: 700; color: #fbbf24; min-width: 2rem; }
.team-name { font-weight: 600; flex: 1; }
.team-leader { color: rgba(255,255,255,0.45); font-size: 0.85rem; flex: 1; }
.team-members-count { color: rgba(255,255,255,0.35); font-size: 0.8rem; min-width: 6rem; text-align: right; }
.team-points { font-weight: 700; color: #fbbf24; min-width: 5rem; text-align: right; }

.team-members { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }

.team-member {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
}

.team-member img { border-radius: 4px; }

.create-team-section { margin-top: 2rem; }

.invites-section { margin-bottom: 1.5rem; }
.invites-section .card { flex-wrap: wrap; }

.invite-code-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 1.2rem 0;
    flex-wrap: wrap;
}

.invite-code {
    font-family: 'Press Start 2P', 'Inter', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    color: #fbbf24;
    background: rgba(15, 10, 26, 0.6);
    padding: 0.9rem 2rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.12);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.04);
    user-select: all;
}

.uses-info {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.uses-left { color: #86efac; font-weight: 700; }
.uses-exhausted { color: #fca5a5; font-weight: 700; }
.uses-unlimited { color: #fbbf24; font-weight: 700; }

/* Hero banner */

.hero {
    position: relative;
    padding: 7rem 0 6rem;
    margin-bottom: 0;
    border-radius: 0;
    border: none;
    background: none;
    box-shadow: none;
    overflow: hidden;
    text-align: left;
}

.hero:hover { transform: none; box-shadow: none; }

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(15, 10, 26, 0.95) 0%, rgba(15, 10, 26, 0.3) 50%, rgba(15, 10, 26, 0.95) 100%),
        linear-gradient(135deg, #1a1520 0%, #2a1a10 30%, #1a2010 50%, #101a2a 100%);
}

.hero .container { position: relative; z-index: 1; }

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-text { flex: 1; min-width: 0; }

.hero-text h2 {
    font-size: 2.8rem;
    margin-bottom: 0.7rem;
}

.hero-text p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.8rem;
    max-width: 540px;
}

.hero-visual {
    flex: 0 0 360px;
    height: 260px;
    border-radius: 14px;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(251, 191, 36, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 70%, rgba(217, 119, 6, 0.05) 0%, transparent 50%);
    border: 1px solid rgba(245, 158, 11, 0.06);
    box-shadow: 0 0 50px rgba(245, 158, 11, 0.04);
}

.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

/* Server status */

#server-status { text-align: center; }
#server-status h2 { text-align: left; }
.status-loading { color: rgba(255, 255, 255, 0.3); font-size: 0.88rem; padding: 1rem 0; }

.status-header {
    display: flex; align-items: center; justify-content: center;
    gap: 0.6rem; margin-bottom: 0.7rem;
}

.status-dot {
    width: 10px; height: 10px; border-radius: 50%;
    display: inline-block; flex-shrink: 0;
}

.status-dot.online {
    background: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.35);
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-dot.offline {
    background: #f87171;
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.25);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(74, 222, 128, 0.35); }
    50% { opacity: 0.5; box-shadow: 0 0 16px rgba(74, 222, 128, 0.55); }
}

.status-label {
    font-family: 'Fredoka One', 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #f0e8e0;
}

.status-ip {
    font-family: 'Press Start 2P', 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.05);
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: 7px;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(245, 158, 11, 0.07);
}

.server-icon {
    width: 44px; height: 44px; border-radius: 7px;
    image-rendering: pixelated; flex-shrink: 0;
}

.status-motd {
    font-size: 0.9rem; color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem; line-height: 1.5;
}

.status-error { font-size: 0.82rem; color: #fca5a5; margin-top: 0.5rem; }

.status-stats {
    display: flex; gap: 1.5rem; justify-content: center;
    flex-wrap: wrap; margin-bottom: 0.8rem;
}

.stat { text-align: center; min-width: 90px; }

.stat-value {
    display: block;
    font-family: 'Fredoka One', 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #f0e8e0;
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.1rem;
}

.stat-bar {
    width: 100%; height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-top: 0.4rem; overflow: hidden;
}

.stat-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }

.player-list { margin-top: 0.4rem; }
.player-list .stat-label { margin-bottom: 0.3rem; }

.player-names {
    display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap;
}

.player-name {
    background: rgba(245, 158, 11, 0.06);
    color: #fbbf24;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 7px;
    transition: background 0.2s;
    border: 1px solid rgba(245, 158, 11, 0.05);
}

.player-name:hover { background: rgba(245, 158, 11, 0.12); }

/* Admin table */

.admin-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem;
}

.admin-header h2 { margin-bottom: 0; }

.search-form { display: flex; gap: 0.4rem; align-items: center; }
.search-form input { width: 220px; }

.btn-clear {
    font-size: 0.78rem;
    color: rgba(245, 158, 11, 0.6);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.btn-clear:hover { color: #fbbf24; text-decoration: underline; }

.table-wrap { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    min-width: 760px;
}

.admin-table th {
    text-align: left;
    padding: 0.65rem 0.75rem;
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    vertical-align: middle;
    color: rgba(255, 255, 255, 0.7);
}

.admin-table tbody tr:hover { background: rgba(255, 255, 255, 0.015); }

.code-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: #fbbf24;
}

.used-code {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.22);
    font-family: 'Courier New', monospace;
}

.date-cell {
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.78rem;
}

.actions-cell { white-space: nowrap; }

.actions-cell .inline-form { display: inline-flex; margin-right: 0.25rem; }

/* Role / status badges */

.role-badge, .status-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.role-admin { background: rgba(245, 158, 11, 0.1); color: #fbbf24; }
.role-user { background: rgba(255, 255, 255, 0.03); color: rgba(255, 255, 255, 0.35); }
.role-leader { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.role-co_leader { background: rgba(96, 165, 250, 0.1); color: #93c5fd; }
.role-member { background: rgba(255, 255, 255, 0.03); color: rgba(255, 255, 255, 0.45); }

.status-ok { background: rgba(74, 222, 128, 0.08); color: #86efac; }
.status-locked { background: rgba(250, 204, 21, 0.08); color: #fde68a; }

.row-locked { opacity: 0.5; }

.btn-lock {
    background: rgba(250, 204, 21, 0.07);
    color: #fde68a;
    border-color: rgba(250, 204, 21, 0.07);
}

.btn-lock:hover {
    background: rgba(250, 204, 21, 0.14);
    border-color: rgba(250, 204, 21, 0.1);
}

.btn-unlock {
    background: rgba(74, 222, 128, 0.07);
    color: #86efac;
    border-color: rgba(74, 222, 128, 0.07);
}

.btn-unlock:hover {
    background: rgba(74, 222, 128, 0.14);
    border-color: rgba(74, 222, 128, 0.1);
}

.btn-role {
    background: rgba(245, 158, 11, 0.07);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.07);
}

.btn-role:hover {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.12);
}

.text-muted {
    color: rgba(255, 255, 255, 0.22);
    font-size: 0.78rem;
    font-style: italic;
}

.empty-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    padding: 1.5rem 0;
    font-size: 0.92rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.page-link {
    font-weight: 700;
    color: #fbbf24;
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.page-link:hover { color: #fcd34d; text-decoration: underline; }

.page-info {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Blog */

.blog-post {
    margin-bottom: 1.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.8rem;
}

.blog-post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.post-meta {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin: 0.4rem 0 0.8rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.3);
}

.post-author {
    font-weight: 600;
    color: #fbbf24;
}

.post-date { color: rgba(255, 255, 255, 0.2); }

.post-content {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    white-space: pre-wrap;
}

.post-image {
    display: block;
    max-width: 100%;
    max-height: 360px;
    border-radius: 10px;
    margin: 0.8rem 0;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.empty-blog {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-blog h2 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.empty-blog p { color: rgba(255, 255, 255, 0.4); font-size: 1rem; }

/* Badges */

.badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 16px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-online {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-offline {
    background: rgba(220, 38, 38, 0.12);
    color: #f87171;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Admin blog section */

.admin-section { margin-top: 2.5rem; }
.admin-section h2 { margin-bottom: 1.2rem; }

.blog-form .form-group { margin-bottom: 0.8rem; }

.blog-form label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fbbf24;
    margin-bottom: 0.35rem;
}

.blog-form input[type="text"],
.blog-form textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}

.blog-form input[type="text"]:focus,
.blog-form textarea:focus { border-color: rgba(245, 158, 11, 0.3); }

.action-cell { white-space: nowrap; }
.action-cell .inline-form { display: inline-flex; margin-right: 0.25rem; }
.action-cell .btn-small { margin-right: 0.25rem; }

/* Accordion */

.accordion { margin: 1.2rem 0; }

.accordion-item {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 9px;
    margin-bottom: 0.4rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s;
}

.accordion-item:hover { border-color: rgba(245, 158, 11, 0.1); }

.accordion-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.9rem 1.1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s;
}

.accordion-header:hover { color: #fbbf24; }

.accordion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border-radius: 5px;
    background: rgba(245, 158, 11, 0.08);
    color: rgba(245, 158, 11, 0.55);
    font-size: 0.95rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.accordion-item.open .accordion-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    transform: rotate(45deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
    line-height: 1.7;
}

.accordion-item.open .accordion-body {
    max-height: 500px;
    padding: 0 1.1rem 1.1rem;
}

.rules-intro {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.92rem;
    margin-bottom: 1.2rem;
}

#rules, #about {
    margin-top: 2.5rem;
    padding-top: 1.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#about p {
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.7rem;
    font-size: 0.92rem;
    line-height: 1.8;
}

#about code {
    background: rgba(245, 158, 11, 0.08);
    padding: 0.1rem 0.5rem;
    border-radius: 5px;
    font-size: 0.88rem;
    color: #fbbf24;
}

#blog-posts h2 { margin-bottom: 1.2rem; }

/* Player grid */

.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 0.4rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.player-card:hover {
    background: rgba(245, 158, 11, 0.04);
    border-color: rgba(245, 158, 11, 0.1);
    transform: translateY(-2px);
}

.player-head {
    width: 56px; height: 56px;
    border-radius: 7px;
    image-rendering: pixelated;
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.player-nick {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    word-break: break-all;
    max-width: 100%;
}

.player-card:hover .player-nick { color: #fbbf24; }

.player-card-admin {
    border-color: rgba(245, 158, 11, 0.12);
    background: rgba(245, 158, 11, 0.02);
}

.player-card-admin:hover {
    border-color: rgba(245, 158, 11, 0.25);
    background: rgba(245, 158, 11, 0.05);
}

.player-role-badge {
    font-size: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.1rem 0.4rem;
    border-radius: 5px;
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

/* About info grid */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.info-card {
    text-align: center;
    padding: 1.2rem 0.8rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s, border-color 0.2s;
}

.info-card:hover {
    background: rgba(245, 158, 11, 0.04);
    border-color: rgba(245, 158, 11, 0.1);
}

.info-icon { font-size: 1.3rem; margin-bottom: 0.4rem; }

.info-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Mobile */

@media (max-width: 768px) {
    header .container { gap: 0.8rem; }

    .header-brand h1 { font-size: 1.4rem; }
    .header-brand p { font-size: 0.65rem; }

    header nav {
        flex-wrap: wrap;
        flex: 1 1 auto;
    }

    header nav a, .dropbtn {
        font-size: 0.72rem;
        padding: 0.3rem 0.65rem;
    }
    .container { padding: 0 16px; }
    main { padding: 1.2rem 0; }
    section { padding: 1.2rem 1.2rem; }
    h2 { font-size: 1.2rem; }

    .hero { padding: 3.5rem 0 2.5rem; }
    .hero-content { flex-direction: column; gap: 1.5rem; }
    .hero-text h2 { font-size: 1.6rem; }
    .hero-text p { font-size: 0.95rem; }
    .hero-visual { flex: none; width: 100%; height: 180px; }

    .dropdown-content { right: auto; left: 0; min-width: 170px; }
    .dropdown-login { min-width: 190px; }

    .invite-code { font-size: 1rem; padding: 0.7rem 1.2rem; }
    .invite-code-box { flex-direction: column; }
    .inline-form { flex-direction: column; align-items: stretch; }
    .inline-form .form-group { min-width: unset; }
    .admin-header { flex-direction: column; align-items: stretch; }
    .search-form { flex-wrap: wrap; }
    .search-form input { width: 100%; }

    .player-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
    .player-head { width: 48px; height: 48px; }
    .player-nick { font-size: 0.6rem; }
}

.success-message {
    color: #4ade80;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}
