/* =========================
   ROOT & RESET
========================= */

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

:root {
    --bg: #0B1020;
    --surface: #121A33;
    --surface-light: #1A2347;
    --border: #2A3563;
    --text: #EAF0FF;
    --muted: #A9B4D0;
    --accent1: #FF2D95;
    --accent2: #2DE2E6;
    --accent3: #F9C80E;
    --success: #2BD97F;
    --danger: #FF4D4D;
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --font-heading: 'Lora', serif;
    --font-body: 'Montserrat', sans-serif;
}

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent2);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* =========================
   TYPOGRAPHY
========================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text);
    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; }

p { margin-bottom: 1rem; color: var(--muted); }

.text-muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent2); }
.text-gold { color: var(--accent3); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-small { font-size: 0.875rem; }
.text-bold { font-weight: 600; }

/* =========================
   LAYOUT
========================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-sm {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.col { flex: 1; }
.col-2 { width: 16.66%; }
.col-3 { width: 25%; }
.col-4 { width: 33.33%; }
.col-6 { width: 50%; }
.col-8 { width: 66.66%; }
.col-12 { width: 100%; }

/* =========================
   SPACING UTILITIES
========================= */

/* Margin */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 1rem; }
.m-4 { margin: 1.5rem; }
.m-5 { margin: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 1rem; }
.pt-4 { padding-top: 1.5rem; }
.pt-5 { padding-top: 3rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 1rem; }
.pb-4 { padding-bottom: 1.5rem; }
.pb-5 { padding-bottom: 3rem; }

.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-5 { padding-left: 3rem; padding-right: 3rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* =========================
   FLEXBOX UTILITIES
========================= */

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.d-grid { display: grid; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.aligncenter- { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 3rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* =========================
   HEADER & NAV
========================= */

.header {
    background: var(--surface);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--accent3);
    font-weight: 600;
    text-decoration: none;
}

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

.nav a {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover { color: var(--text); }

.nav-badge {
    font-size: 0.7rem;
    background: var(--accent1);
    color: white;
    padding: 2px 6px;
    border-radius: 50px;
    margin-left: 4px;
}

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

.layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 64px);
}

.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
}

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

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: var(--text);
    background: var(--surface-light);
    border-left-color: var(--accent2);
}

.sidebar-section {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding: 1rem 1.5rem 0.5rem;
}

.main-content {
    padding: 2rem;
    overflow-y: auto;
}

/* =========================
   CARDS
========================= */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.card-header h3 { margin: 0; font-size: 1rem; }

.card-body { padding: 1.25rem; }

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--surface-light);
}

/* =========================
   BUTTONS
========================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary:hover { opacity: 0.85; color: var(--bg); }

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover { opacity: 0.85; color: white; }

.btn-success {
    background: var(--success);
    color: var(--bg);
}

.btn-success:hover { opacity: 0.85; color: var(--bg); }

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
}

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

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

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* =========================
   FORMS
========================= */

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.875rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
}

.form-control:focus { border-color: var(--accent2); }
.form-control::placeholder { color: var(--muted); }

select.form-control {
    cursor: pointer;
    appearance: none;
}

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

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

/* =========================
   ALERTS
========================= */

.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(43,217,127,0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-danger {
    background: rgba(255,77,77,0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.alert-info {
    background: rgba(45,226,230,0.1);
    border-color: var(--accent2);
    color: var(--accent2);
}

/* =========================
   TABLES
========================= */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead {
    background: var(--surface-light);
}

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

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-light); }

tbody td {
    padding: 0.875rem 1rem;
    color: var(--text);
    vertical-align: middle;
}

/* =========================
   BADGES
========================= */

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin {
    background: rgba(255,45,149,0.15);
    color: var(--accent1);
    border: 1px solid var(--accent1);
}

.badge-user {
    background: rgba(45,226,230,0.15);
    color: var(--accent2);
    border: 1px solid var(--accent2);
}

.badge-published {
    background: rgba(43,217,127,0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-draft {
    background: rgba(169,180,208,0.15);
    color: var(--muted);
    border: 1px solid var(--muted);
}

/* =========================
   STAT CARDS
========================= */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.stat-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text);
}

.stat-card-accent { border-top: 3px solid var(--accent2); }
.stat-card-danger { border-top: 3px solid var(--danger); }
.stat-card-success { border-top: 3px solid var(--success); }
.stat-card-gold { border-top: 3px solid var(--accent3); }

/* =========================
   LOGIN PAGE
========================= */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-card h2 {
    margin-bottom: 0.25rem;
}

.login-card p {
    margin-bottom: 1.5rem;
}

/* =========================
   PAGE HEADER
========================= */

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

.page-header h2 { margin: 0; }

/* ==========================================================
   PERMISSIONS MULTI-SELECT
   ========================================================== */

select[multiple] {
    min-height: 180px;
    padding: 0.75rem;

    background: var(--surface-light);
    border: 1px solid var(--border);

    border-radius: var(--radius);

    color: var(--text);

    width: 100%;

    overflow-y: auto;

    transition: border-color 0.2s ease,
                box-shadow 0.2s ease;
}

select[multiple]:focus {
    outline: none;

    border-color: var(--accent2);

    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

select[multiple] option {
    padding: 0.75rem 1rem;

    border-radius: 0.5rem;

    margin-bottom: 0.25rem;

    background: transparent;

    color: var(--text);

    cursor: pointer;
}

select[multiple] option:checked {
    background: linear-gradient(
        135deg,
        var(--accent2),
        var(--accent)
    );

    color: white;
}

select[multiple] option:hover {
    background: rgba(255,255,255,0.06);
}

/* Fix for profile-page structure from file footer */
.profile-page {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

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

.profile-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-label {
    font-weight: 600;
    color: var(--muted);
}

.error-message {
    color: red;
}

.success-message {
    color: green;
}
.error-message {

    color: #d62828;

    margin-bottom: 1rem;
}

.success-message {

    color: #2a9d8f;

    margin-bottom: 1rem;
}
.profile-page {

    max-width: 800px;

    margin: 3rem auto;
}

.profile-info {

    display: flex;

    flex-direction: column;

    gap: 1rem;
}

.profile-row {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding-bottom: 1rem;

    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.profile-label {

    font-weight: 600;
}

.profile-form {

    display: flex;

    flex-direction: column;

    gap: 1.5rem;
}

.form-group {

    display: flex;

    flex-direction: column;

    gap: 0.5rem;
}

.form-group input {

    padding: 0.9rem 1rem;

    border-radius: 12px;

    border: 1px solid rgba(255,255,255,0.15);

    background: rgba(255,255,255,0.05);

    color: white;
}

/* ==========================================================================
   DASHBOARD IMPROVEMENTS
   ========================================================================== */

.main-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Better page spacing */
.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2rem;
    line-height: 1.2;
}

/* Better stat layout */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card-value {
    font-size: 3rem;
    margin-top: 0.5rem;
}

/* Dashboard quick menu */
.dashboard-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.5rem 0;
}

/* Bigger dashboard buttons */
.dashboard-actions .btn {
    min-width: 220px;
    justify-content: center;
    padding: 0.9rem 1.5rem;
}

/* Dashboard card spacing */
.card {
    overflow: hidden;
}

/* MOBILE */
@media (max-width: 768px) {

    .main-content {
        padding: 1rem;
    }

    .page-header h2 {
        font-size: 1.6rem;
    }

    .stat-card {
        min-height: 110px;
        padding: 1.5rem;
    }

    .stat-card-value {
        font-size: 2.3rem;
    }

    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-actions .btn {
            width: fit-content;
            min-width: 150px;
            margin: 0 auto;
    }
}

/* Mobile */

@media (max-width: 768px) {

    select[multiple] {
        min-height: 140px;
        font-size: 0.95rem;
    }

    select[multiple] option {
        padding: 0.6rem 0.75rem;
    }

}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .col-3, .col-4, .col-6, .col-8 {
        width: 100%;
    }

    .main-content {
        padding: 1rem;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================================
   TAITAJA FINALS MOBILE-RESPONSIVE FIXES (Append to bottom of styles.css)
   ========================================================================== */

@media (max-width: 768px) {
    /* Instead of hiding navigation, stack it nicely at the top */
    .layout {
        grid-template-columns: 1fr ;
        display: flex ;
        flex-direction: column 
    }

    .sidebar {
        display: block ;
        width: 100% ;
        border-right: none ;
        border-bottom: 1px solid var(--border) ;
        padding: 0.5rem 0 ;
    }

    .sidebar-section {
        display: none; /* Hide category headers on mobile to save vertical space */
    }

    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        padding: 0 1rem;
    }

    .sidebar-menu a {
        padding: 0.5rem 1rem ;
        border-left: none ;
        border-bottom: 2px solid transparent;
        border-radius: var(--radius);
    }

    .sidebar-menu a:hover,
    .sidebar-menu a.active {
        border-left-color: transparent ;
        border-bottom-color: var(--accent2) ;
    }

    /* Fix table wrappers to scroll horizontally smoothly on mobile phones */
    .table-wrapper {
        width: 100%;
        margin-bottom: 1.5rem;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent wide profile or layout tables from breaking structural bounds */
    table {
        min-width: 420px; 
    }
}

@media (max-width: 480px) {
    /* Scale down large typography headers for small viewports */
    h1 {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    }
    h2 { font-size: 1.3rem; }
    
    .login-card {
        padding: 1.5rem ;
    }

    /* Optimize profile rows to clean stack stacked elements vertically */
    .profile-row {
        flex-direction: column ;
        align-items: flex-start ;
        gap: 0.25rem;
    }

    .form-group .btn,
    .card-body .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {

    .header .container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .header .nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
    }

    .header .nav .btn {
        width: auto !important;
    }

    .logo {
        font-size: 1.6rem;
        text-align: center;
    }

    .sidebar-menu {
        flex-direction: column;
        align-items: center;
    }

    .sidebar-menu li {
        width: 100%;
        text-align: center;
    }

    .sidebar-menu a {
        display: block;
        width: 100%;
    }
}
@media (max-width: 480px) {

    .row {
        flex-direction: column;
    }

    .col,
    .col-2,
    .col-3,
    .col-4,
    .col-6,
    .col-9 {
        width: 100%;
    }
}
@media (max-width: 768px) {

    .main-content {
        padding: 1rem;
    }

    .card {
        overflow: hidden;
    }
}
.kohde-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(320px, 1fr)
    );
    gap: 2rem;
}

.kohde-card {
    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.kohde-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 12px 30px rgba(0,0,0,0.12);
}

.kohde-image {
    width: 100%;
    height: 220px;
    object-fit: cover;

    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.kohde-card .card-body {
    padding: 1.5rem;
}

.kohde-card h3 {
    margin-bottom: 0.75rem;
}

.hero {
    padding: 5rem 0 4rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    max-width: 700px;
    margin: 0 auto;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.py-5 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (max-width: 768px) {

    .hero h1 {
        font-size: 2.2rem;
    }

    .kohde-grid {
        grid-template-columns: 1fr;
    }

}
        body {
            background: #0f172a;
            color: white;
            font-family: 'Montserrat', sans-serif;
            margin: 0;
        }

        .game-container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 2rem;
        }

        .game-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .hud {
            display: flex;
            justify-content: space-between;
            align-items: center;

            background: rgba(255,255,255,0.08);

            padding: 1rem 1.5rem;

            border-radius: 16px;

            margin-bottom: 1.5rem;
        }

        .game-area {
            position: relative;

            width: 100%;
            height: 600px;

            background:
                linear-gradient(
                    135deg,
                    #1e293b,
                    #0f172a
                );

            border-radius: 24px;

            overflow: hidden;
        }

        .signal {
            position: absolute;

            width: 70px;
            height: 70px;

            border-radius: 50%;

            cursor: pointer;

            transition:
                transform 0.15s ease;
        }

        .signal:hover {
            transform: scale(1.1);
        }

        .green {
            background: #22c55e;
        }

        .red {
            background: #ef4444;
        }

        .start-screen,
        .game-over {
            text-align: center;
            padding: 4rem 2rem;
        }

        .hidden {
            display: none;
        }

        .btn {
            padding: 1rem 1.5rem;
            border: none;
            border-radius: 12px;
            cursor: pointer;

            font-size: 1rem;
            font-weight: 600;
        }

        .btn-primary {
            background: #3b82f6;
            color: white;
        }
        .signal {

            width: 70px;
            height: 70px;

            border-radius: 50%;
        }
        /* MOBILE GAME IMPROVEMENTS */

@media (max-width: 768px) {

    .game-container {

        padding: 1rem;
    }

    .game-area {

        height: 420px;
        min-height: 420px;
    }

    .signal {

        width: 45px;
        height: 45px;
    }

    .hud {

        flex-direction: column;
        gap: 0.5rem;

        text-align: center;

        font-size: 0.95rem;
    }

    .start-screen h1,
    .game-over h2 {

        font-size: 1.8rem;
    }

    .start-screen p,
    .game-over p {

        font-size: 0.95rem;
    }

    .btn {

        width: 100%;
        padding: 0.9rem 1rem;

        font-size: 1rem;
    }

    .sidebar {

        width: 100%;
    }

    .layout {

        flex-direction: column;
    }
}
.main-content {
    flex: 1;
    padding: 2rem;
}

.game-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.game-area {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;

    border: 2px solid #1f3b73;
    border-radius: 12px;

    background: #09142b;

    overflow: hidden;
}

.hud {
    display: flex;
    gap: 2rem;

    margin-bottom: 1rem;

    font-size: 1.1rem;
    font-weight: 600;
}
.game-over {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 70vh;

    text-align: center;

    background: rgba(10, 20, 60, 0.6);

    border: 1px solid rgba(255,255,255,0.08);

    border-radius: 24px;

    padding: 40px 20px;

    box-shadow: 0 10px 40px rgba(0,0,0,0.35);

    backdrop-filter: blur(8px);
}

.game-over h2 {
    font-size: 42px;
    margin-bottom: 10px;
    color: #ffffff;
}

.game-over p {
    font-size: 20px;
    color: #bfc9ff;
    margin-bottom: 25px;
}

.game-over .btn {
    width: 220px;

    margin-bottom: 14px;

    padding: 14px 20px;

    border-radius: 14px;

    font-size: 18px;

    font-weight: 600;

    transition: 0.2s ease;
}

.game-over .btn:hover {
    transform: translateY(-2px);
}

.game-over form {
    margin-bottom: 10px;
}
.game-over.hidden {
    display: none;
}
/* HERO */

.hero {
    padding: 80px 20px 50px;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #aab4d6;
}

/* MAIN CONTENT */

.main-content {
    width: 100%;
    padding: 0;
}

/* CARD */

.card {
    background: rgba(20, 32, 78, 0.9);

    border: 1px solid rgba(80, 120, 255, 0.2);

    border-radius: 22px;

    overflow: hidden;

    box-shadow:
        0 10px 35px rgba(0,0,0,0.35);

    max-width: 1000px;

    margin: 0 auto 60px auto;
}

/* CARD HEADER */

.card-header {
    padding: 24px 30px;

    border-bottom:
        1px solid rgba(255,255,255,0.08);

    background:
        rgba(255,255,255,0.02);
}

.card-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.6rem;
}

/* TABLE */

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

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

thead {
    background: rgba(255,255,255,0.03);
}

th {
    padding: 18px;
    text-align: left;
    color: #d8e1ff;
    font-weight: 600;
}

td {
    padding: 18px;
    border-top:
        1px solid rgba(255,255,255,0.05);

    color: #ffffff;
}

tbody tr {
    transition: 0.2s ease;
}

tbody tr:hover {
    background:
        rgba(255,255,255,0.03);
}

/* TOP 3 GLOW */

tbody tr:nth-child(1) td:first-child {
    color: gold;
    font-weight: 700;
}

tbody tr:nth-child(2) td:first-child {
    color: silver;
    font-weight: 700;
}

tbody tr:nth-child(3) td:first-child {
    color: #cd7f32;
    font-weight: 700;
}

/* BUTTON IMPROVEMENTS */

.hero .btn {
    padding: 14px 34px;
    border-radius: 14px;
    font-weight: 600;
    transition: 0.2s ease;
}

.hero .btn:hover {
    transform: translateY(-2px);
}

/* MOBILE */

@media (max-width: 768px) {

    .hero {
        padding: 50px 16px 30px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .card {
        border-radius: 16px;
    }

    th,
    td {
        padding: 14px;
        font-size: 0.9rem;
    }
}
.game-over-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 30px;
    width: 100%;
}

.game-over-actions .btn,
.game-over-actions form,
.game-over-actions form button {
    width: 100%;
}

.game-over-actions .btn,
.game-over-actions button {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;

    text-align: center;

    border-radius: 14px;

    font-weight: 600;

    text-decoration: none;
}

.game-over-actions form {
    margin: 0;
}
.list-size-form {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 20px;

    flex-wrap: wrap;
}

.list-size-form label {
    font-weight: 600;
}

.list-size-form .form-control {
    width: 90px;
}
.gold td:first-child::before {
    content: "🥇 ";
}

.silver td:first-child::before {
    content: "🥈 ";
}

.bronze td:first-child::before {
    content: "🥉 ";
}
