/* =============================================
   style.css – Grywamy.eu CS 1.6 Mix Platform
   ============================================= */

/* ---- CSS Variables ---- */
:root {
    --bg: #05070a;
    --surface: rgba(13, 17, 23, 0.6);
    --surface-solid: #0d1117;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #ff4b4b;
    --accent-glow: rgba(255, 75, 75, 0.3);
    --accent-ct: #4dabf7;
    --accent-t: #ff4b4b;
    --text: #e9ecef;
    --text-dim: #adb5bd;
    --glass: blur(12px) saturate(180%);
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

/* ---- Body ---- */
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
	text-decoration: none;
}

/* ---- Custom Premium Scrollbars ---- */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) var(--bg);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    border: 2px solid var(--bg);
    transition: background 0.3s ease;
}

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

/* ---- Hero Background ---- */
.hero-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg);
    overflow: hidden;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.1);
    opacity: 1;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5, 7, 10, 0.2), var(--bg));
}

.hero-bg-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

/* ---- Navigation ---- */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    height: 60px;
    background: var(--surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav-links a.active {
    color: #fff;
}

.nav-actions a {
    color: #fff;
    font-size: 1.2rem;
}

/* ---- Main Content ---- */
main {
    padding-top: 120px;
    padding-bottom: 80px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- Hero Section ---- */
.hero-section {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeIn 1s ease-out;
}

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

.hero-section h1 {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: -3px;
    color: #fff;
    line-height: 1;
}

.hero-section h1 .accent {
    color: var(--accent);
}

.hero-logo {
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(255, 169, 77, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* ---- Buttons ---- */
.btn-reserve {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: var(--accent);
    color: #000;
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 0 30px rgba(255, 75, 75, 0.4);
    border: 0;
    transition: all 0.3s;
    cursor: pointer;
    font-family: inherit;
}

.btn-reserve:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(255, 75, 75, 0.6);
    cursor: pointer;
}

.btn-reserve--sm {
    padding: 10px 20px;
    font-size: 0.8rem;
}

.btn-reserve--md {
    padding: 12px 30px;
    font-size: 0.9rem;
}

.btn-reserve--block {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

.btn-reserve--dark {
    background: #333;
}

/* ---- Grid Layout ---- */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* ---- Section Box ---- */
.section-box {
    background: var(--surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title h2 i {
    color: var(--accent);
}

/* ---- Section footer (centered CTA) ---- */
.section-footer {
    margin-top: 20px;
    text-align: center;
}

.section-footer--top {
    margin-top: 30px;
}

/* ---- Empty / loading state ---- */
.empty-state {
    text-align: center;
    padding: 20px;
    color: var(--text-dim);
}

.empty-state--lg {
    padding: 40px;
}

.empty-state__icon {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}

/* ---- Match Card ---- */
.match-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    margin-bottom: 15px;
}

.match-card.live:hover {
    background: rgba(255, 169, 77, 0.05);
    border-color: var(--accent);
    transform: translateX(5px);
}

.match-card.upcoming {
    cursor: default;
    opacity: 0.7;
}

.match-card__reserved-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
}

.match-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.match-map {
    width: 80px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.match-details h3 {
    font-size: 1.1rem;
}

.match-details p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.match-score {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
}

.score-ct {
    color: var(--accent-ct);
}

.score-t {
    color: var(--accent-t);
}

.live-tag {
    background: #ff4d4d;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ---- Ranking Table ---- */
.rank-table {
    width: 100%;
    border-collapse: collapse;
}

.rank-table th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.rank-table th.rank-pts {
    text-align: right;
}

.rank-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.rank-num {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 700;
}

.rank-name {
    font-weight: 600;
}

.rank-pts {
    font-family: var(--font-mono);
    text-align: right;
}

/* ---- Reservation Modal ---- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

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

.modal-box {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    text-decoration: none;
}

.modal-title {
    margin-bottom: 25px;
    text-align: center;
}

/* ---- Form elements ---- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.form-input {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.form-select {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
}

.form-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 75, 75, 0.1);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 75, 75, 0.2);
}

.form-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 700;
    color: #fff;
}

/* ---- Reservation error / suggestions ---- */
.res-error {
    display: none;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.res-suggestions {
    margin-top: 15px;
    display: none;
}

.res-suggestions__label {
    margin-bottom: 8px;
    font-weight: 700;
    color: #fff;
}

.suggestions-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.suggestion-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 5px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

/* ---- Manage / Success Modal ---- */
.manage-modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2100;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.manage-modal-box {
    background: var(--surface-solid);
    border: 2px solid var(--accent);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 0 50px var(--accent-glow);
}

.manage-modal-box .modal-close {
    font-size: 1.5rem;
}

.manage-title {
    margin-bottom: 10px;
    text-align: center;
    color: var(--accent);
}

.manage-subtitle {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-dim);
}

/* ---- Reservation info card ---- */
.res-info-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.res-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.res-info-row--border {
    border-top: 1px solid var(--border);
    margin-top: 10px;
    padding-top: 10px;
}

.res-info-row .res-password {
    font-size: 1.4rem;
    color: #fff;
    letter-spacing: 2px;
}

.res-info-accent {
    color: var(--accent);
}

/* ---- Server connect block ---- */
.server-connect {
    text-align: center;
    margin-top: 20px;
}

.server-ip {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.server-cmd {
    display: block;
    background: #000;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

/* ---- Manage action buttons ---- */
.manage-actions {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ---- Invalid token ---- */
.invalid-token {
    text-align: center;
}

/* ---- Responsive ---- */

/* Tablet & Below (General Layout) */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero-section h1 {
        font-size: 3.5rem;
    }
}

/* Mobile Navigation & Header */
@media (max-width: 768px) {
    nav {
        width: 96%;
        padding: 0 12px;
        top: 10px;
        height: 54px;
        gap: 8px;
    }

    .logo-area {
        flex-shrink: 0;
    }

    .logo-big img {
        width: 32px;
        height: auto;
    }

    .logo-big span {
        display: none; /* Hide "MIX" text next to logo on mobile */
    }

    .nav-links {
        flex: 1;
        gap: 15px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scrollbar-width: none;
        padding: 0 5px;
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        font-size: 0.85rem;
        white-space: nowrap;
        gap: 6px;
        display: inline-flex; /* Ensure vertical alignment */
    }

    .nav-links a i {
        font-size: 1rem;
    }

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

    .nav-actions a {
        font-size: 1.3rem;
        padding-left: 5px;
    }


    .hero-section h1 {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .hero-logo {
        width: 180px;
    }

    .btn-reserve {
        padding: 15px 30px;
        font-size: 0.9rem;
    }

    main {
        padding-top: 100px;
    }

    .section-box {
        padding: 20px;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}

/* Very Small Screens */
@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .nav-links a span {
        display: none;
    }
    
    .nav-links {
        gap: 20px;
    }
}



/* ==============================================
   SHARED: back-link, container, header
   ============================================== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 30px;
    font-weight: 600;
    transition: gap 0.3s;
}

.back-link:hover {
    gap: 12px;
}

.page-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

/* Shared hero bg (simple, for history/ranking) */
.hero-bg-simple {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg);
}

.hero-bg-simple img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

/* ==============================================
   HISTORY PAGE
   ============================================== */

.match-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-card {
    background: var(--surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s;
}

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

.history-card__main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.map-thumb {
    width: 80px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: #000;
}

.map-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.match-date {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.score-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.score-box .score-ct {
    color: var(--accent-ct);
}

.score-box .score-t {
    color: var(--accent-t);
}

.score-sep {
    color: var(--text-dim);
    opacity: 0.5;
}

.btn-view {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.btn-page {
    padding: 10px 20px;
    background: var(--surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-page:hover:not(.disabled) {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
}

.btn-page.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    color: var(--text-dim);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-input {
    width: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #fff;
    padding: 5px;
    text-align: center;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}

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

.empty-msg {
    text-align: center;
    padding: 50px;
    color: var(--text-dim);
}

/* ==============================================
   RANKING PAGE
   ============================================== */

.ranking-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.ranking-table-container {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-spacing: 0;
    text-align: left;
}

.ranking-table th {
    padding: 15px;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: inset 0 -1px 0 var(--border);
}

.ranking-table td {
    padding: 20px 15px;
    font-size: 0.95rem;
    vertical-align: middle;
    box-shadow: inset 0 -1px 0 var(--border);
}

.ranking-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.ranking-table th:first-child,
.ranking-table td:first-child {
    width: 60px;
    text-align: center;
    padding-right: 0;
}

.ranking-table th:nth-child(2),
.ranking-table td:nth-child(2) {
    padding-left: 10px;
}

.rank-number {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.rank-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.rank-1 { background: rgba(255, 215, 0, 0.05) !important; }
.rank-2 { background: rgba(192, 192, 192, 0.03) !important; }
.rank-3 { background: rgba(205, 127, 50, 0.02) !important; }

.rank-1 .rank-number { color: #ffd700; font-size: 1.2rem; }
.rank-2 .rank-number { color: #c0c0c0; font-size: 1.1rem; }
.rank-3 .rank-number { color: #cd7f32; font-size: 1rem; }

.player-nick {
    font-weight: 700;
    color: #fff;
}

.points-val {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent);
}

.stat-badge {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.stat-hs {
    color: #ffa94d;
    font-weight: 600;
}

.stat-knife {
    color: #ff6b6b;
    font-weight: 600;
}

/* Tooltip */
.tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dashed var(--text-dim);
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    pointer-events: none;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

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

/* Info box (ranking formula) */
.info-box {
    margin-top: 50px;
    background: rgba(77, 171, 247, 0.05);
    border: 1px solid rgba(77, 171, 247, 0.2);
    border-radius: 16px;
    padding: 25px;
}

.info-box h3 {
    margin-bottom: 15px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box__desc {
    color: var(--text-dim);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.points-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    list-style: none;
}

.points-list li {
    font-size: 0.9rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.points-list li span:last-child {
    color: #fff;
    font-weight: 600;
}

/* ==============================================
   MANAGE RESERVATION PAGE
   ============================================== */

.manage-body {
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero-bg-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: brightness(0.4);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(5, 7, 10, 0.2) 0%, var(--bg) 100%);
    z-index: -1;
}

/* Manage nav (reuses .nav but with slight differences) */
.manage-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    height: 60px;
    background: var(--surface);
    backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
}

.manage-nav .logo {
    font-size: 1.2rem;
}

.manage-nav .nav-links a {
    font-size: 0.9rem;
    margin-left: 20px;
}

.manage-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    padding-bottom: 50px;
}

.panel-card {
    background: var(--surface);
    backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 90%;
    max-width: 550px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
}

.panel-card h1 {
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.panel-card h1 span {
    color: var(--accent);
}

.panel-form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.panel-input,
.panel-select {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
    cursor: pointer;
}

.panel-select option {
    background: #1a1d23;
    color: #fff;
}

.panel-input:focus,
.panel-select:focus {
    border-color: var(--accent);
    outline: none;
}

.panel-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: #000;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px var(--accent-glow);
    font-family: inherit;
}

.panel-btn:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.panel-btn:disabled {
    background: #333;
    color: #777;
    cursor: not-allowed;
    box-shadow: none;
}

.panel-btn--auto {
    width: auto;
    padding: 0 25px;
}

.info-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.info-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-item--accent {
    border-color: var(--accent);
}

.info-label {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.info-value {
    font-weight: 700;
    color: #fff;
}

.info-value--accent {
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--accent);
}

.console-box {
    background: #000;
    padding: 15px;
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #39ff14;
    margin-top: 15px;
    border: 1px solid #1a1a1a;
}

.alert-info {
    background: rgba(255, 202, 40, 0.1);
    border: 1px solid rgba(255, 202, 40, 0.3);
    padding: 15px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #ffca28;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Error box */
.error-box {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Extend time box */
.extend-box {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.extend-box__title {
    margin-bottom: 10px;
    color: #4caf50;
}

.extend-box__desc {
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.extend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.extend-btn {
    font-size: 0.7rem;
    padding: 10px;
}

/* Countdown box */
.countdown-box {
    background: rgba(255, 202, 40, 0.1);
    border: 1px solid rgba(255, 202, 40, 0.3);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    text-align: center;
}

.countdown-box__label {
    color: #ffca28;
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.countdown-timer {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #fff;
}

.countdown-box__sub {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 10px;
}

/* Change map form */
.map-change-form {
    margin-top: 30px;
}

.map-change-row {
    display: flex;
    gap: 10px;
}

.success-msg {
    color: #4caf50;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Logout link */
.logout-area {
    margin-top: 40px;
    text-align: center;
}

.logout-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
}

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

/* Status badges (translateStatus) */
.status-upcoming { color: #ffca28; }
.status-active    { color: #4caf50; }
.status-finished  { color: #9e9e9e; }
.status-cancelled { color: #f44336; }

/* ==============================================
   STATS / VIEW_MATCH – Shared Dashboard
   ============================================== */

.dashboard-body {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: grid;
    grid-template-areas:
        "header header header"
        "left center right"
        "footer footer footer";
    grid-template-columns: 320px 1fr 320px;
    grid-template-rows: 80px 1fr 100px;
    height: 100vh;
    gap: 15px;
    padding: 15px;
}






.app-container header {
    grid-area: header;
    background: var(--surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    align-items: center;
    padding: 0 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-area .back-nav {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 1.4rem;
    transition: color 0.2s;
}

.logo-area .back-nav:hover {
    color: #fff;
}

.logo-area .logo-big {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-area .logo-big .accent {
    color: var(--accent);
}

.score-wrap {
    display: flex;
    align-items: center;
    gap: 40px;
    justify-self: center;
}

.team-score {

    display: flex;
    align-items: center;
    gap: 15px;
}

.score-val {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.ct-score {
    color: var(--accent-ct);
    text-shadow: 0 0 20px rgba(77, 171, 247, 0.3);
}

.t-score {
    color: var(--accent-t);
    text-shadow: 0 0 20px rgba(255, 75, 75, 0.3);
}

.team-label {
    font-weight: 600;
}

.team-label--ct { color: var(--accent-ct); }
.team-label--t  { color: var(--accent-t); }

.team-alive {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.map-name {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.match-timer {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.status-tag {
    font-size: 0.6rem;
    margin-top: 4px;
    letter-spacing: 1px;
    font-weight: 700;
}

.header-actions {
    justify-self: end;
    padding-right: 10px;
}

.header-actions a,
.header-actions i {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 1.2rem;
}

.header-actions a:hover {
    color: #fff;
}

.header-icon-lg {
    font-size: 1.5rem;
    color: var(--text-dim);
}

/* Side panels */
.side-panel {
    background: var(--surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#panel-ct { grid-area: left; }
#panel-t  { grid-area: right; }

.main-view {
    grid-area: center;
    position: relative;
    background: var(--surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-container footer {
    grid-area: footer;
    background: var(--surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.app-container footer::-webkit-scrollbar { display: none; }

/* Panel header */
.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
}

.ct-header {
    color: var(--accent-ct);
    background: linear-gradient(90deg, rgba(77, 171, 247, 0.1), transparent);
}

.t-header {
    color: var(--accent-t);
    background: linear-gradient(270deg, rgba(255, 75, 75, 0.1), transparent);
}

/* Player list & cards */
.player-list {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
}

.player-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
}

.player-card:hover {
    background: rgba(20, 26, 35, 0.9);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.player-card.dead {
    opacity: 0.4;
    filter: grayscale(0.8);
}

.card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.p-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.p-name {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
}

.p-money {
    font-family: var(--font-mono);
    font-weight: 600;
}

.p-vitals {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}

.p-hp-group,
.p-ap-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.p-hp-group { flex: 1; }
.p-ap-group { width: 35%; }

.v-val {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 24px;
    text-align: right;
}

.hp-val { color: var(--green, #51cf66); }
.ap-val { color: var(--accent-ct); }

.p-hp-bar,
.p-ap-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    flex: 1;
    position: relative;
}

.p-hp-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.p-ap-fill {
    height: 100%;
    background: var(--accent-ct);
    transition: width 0.3s ease;
}

.p-weapon-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-dim);
    opacity: 0.8;
}

.p-weapon-icon { font-size: 0.85rem; }
.p-weapon-name {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ready-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    font-size: 0.6rem;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.player-card:hover .card-details {
    max-height: 250px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    color: #555;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-val {
    font-size: 0.85rem;
    font-weight: 500;
    color: #ddd;
}

.stat-item--full {
    grid-column: span 3;
}

.p-eq {
    font-size: 0.7rem;
    color: #fff;
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.p-eq-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Radar */
.radar-square-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
}

#radar-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border-radius: 4px;
    transition: background-image 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 1;
}

.radar-marker {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: left 0.5s linear, top 0.5s linear, opacity 0.5s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.marker-ct {
    background: var(--accent-ct);
    box-shadow: 0 0 15px rgba(77, 171, 247, 0.3);
}

.marker-t {
    background: var(--accent-t);
    box-shadow: 0 0 15px rgba(255, 75, 75, 0.3);
}

.view-direction {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 12px;
    background: #fff;
    transform-origin: bottom center;
    transform: translate(-50%, -100%);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    transition: transform 0.5s linear;
}

.marker-ct .view-direction { background: var(--accent-ct); }
.marker-t  .view-direction { background: var(--accent-t); }

.radar-marker.dead {
    opacity: 0.3;
    filter: grayscale(1);
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 5;
}

.marker-name {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Timeline Events */
.event-node {
    flex-shrink: 0;
    padding: 10px 20px;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.event-icon { font-size: 1.2rem; }
.event-text { font-size: 0.85rem; }
.event-text strong.team-ct { color: var(--accent-ct); }
.event-text strong.team-t  { color: var(--accent-t); }
.event-time {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
}

.event-icon--default { color: #fff; }
.event-icon--bomb    { color: #ffa94d; }
.event-icon--defuse  { color: var(--accent-ct); }

.event-weapon-info {
    opacity: 0.7;
    font-size: 0.75rem;
}

/* Replay panel (view_match only) */
.replay-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 100;
}

.btn-play {
    background: var(--accent);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn-play:hover { transform: scale(1.1); }

.seek-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.seek-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    width: 0%;
}

.time-info {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #fff;
    min-width: 90px;
    text-align: right;
}

/* ==============================================
   CALIBRATE PAGE
   ============================================== */

.calib-body {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(77, 171, 247, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(255, 169, 77, 0.05) 0%, transparent 50%);
}

/* Login page */
.calib-login-body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(77, 171, 247, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(255, 169, 77, 0.05) 0%, transparent 50%);
}

.login-box {
    background: var(--surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 380px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.login-box h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-box__icon {
    color: var(--accent-ct);
}

.login-box__sub {
    color: var(--text-dim);
    font-size: 1rem;
    margin-bottom: 30px;
}

.input-modern {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 20px;
    outline: none;
    transition: border-color 0.2s;
}

.input-modern:focus { border-color: var(--accent-ct); }

.btn-calib-save {
    background: rgba(77, 171, 247, 0.1);
    color: var(--accent-ct);
    border: 1px solid var(--accent-ct);
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-calib-save:hover {
    background: var(--accent-ct);
    color: #fff;
}

.btn-back-calib {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.btn-back-calib:hover { color: #fff; }

.auth-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 20px;
    text-align: left;
}

/* Calibrator main layout */
.calib-layout {
    display: flex;
    height: 100vh;
    padding: 15px;
    gap: 15px;
}

.calib-panel {
    width: 320px;
    background: var(--surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.calib-panel h2 {
    color: var(--text);
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.calib-panel h2 .panel-icon {
    color: var(--text-dim);
}

.calib-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calib-field label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.calib-field input[type="number"] {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.calib-field input:focus { border-color: var(--accent-ct); }

.calib-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.calib-checkboxes label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text);
}

.calib-checkboxes input[type="checkbox"] { cursor: pointer; }

.btn-calib-green {
    background: rgba(81, 207, 102, 0.1);
    color: #51cf66;
    border: 1px solid #51cf66;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-calib-green:hover {
    background: #51cf66;
    color: #000;
}

.btn-back-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
    color: var(--text-dim);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: auto;
    transition: all 0.2s;
}

.btn-back-panel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-logout-small {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout-small:hover {
    background: #ff6b6b;
    color: #000;
}

.calib-info-box {
    font-size: 0.75rem;
    color: var(--text-dim);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 8px;
    line-height: 1.6;
    font-family: var(--font-mono);
}

.calib-map-row {
    color: var(--text-dim);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.calib-map-name {
    color: var(--accent-ct);
    font-weight: bold;
}

#save-status {
    font-size: 0.85rem;
    text-align: center;
    min-height: 20px;
    font-weight: 600;
}

/* Calibrator main area */
.calib-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
}

.radar-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 0;
}

#radar {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 4 / 3;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #05080c;
    border-radius: 4px;
    transition: background-image 0.3s ease-in-out;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 64px 64px;
}

.mk {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: left 0.3s ease, top 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.mk-ct {
    background: var(--accent-ct);
    box-shadow: 0 0 15px rgba(77, 171, 247, 0.5);
}

.mk-t {
    background: #ffa94d;
    box-shadow: 0 0 15px rgba(255, 169, 77, 0.5);
}

.mk.dead {
    opacity: 0.3;
    filter: grayscale(1);
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 5;
}

.mk-name {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

#cursor-info {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text);
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
    pointer-events: none;
    z-index: 20;
}

.corner-pin {
    position: absolute;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border);
    padding: 5px 8px;
    border-radius: 4px;
    z-index: 20;
    cursor: pointer;
    user-select: all;
    line-height: 1.4;
    transition: border-color 0.2s;
}

.corner-pin:hover { border-color: var(--accent-ct); }

.corner-pin .cv {
    color: #51cf66;
    font-weight: bold;
    font-family: var(--font-mono);
}

.corner-pin .cl {
    color: var(--text-dim);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.corner-pin--tl { top: 10px; left: 10px; }
.corner-pin--tr { top: 10px; right: 10px; text-align: right; }
.corner-pin--bl { bottom: 40px; left: 10px; }
.corner-pin--br { bottom: 40px; right: 10px; text-align: right; }

.tbl-wrap {
    height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border);
    scrollbar-width: thin;
}

.calib-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.calib-table th {
    padding: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--surface);
    backdrop-filter: blur(10px);
    font-size: 0.75rem;
    text-align: left;
}

.calib-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-family: var(--font-mono);
}

#toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #51cf66;
    color: #000;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-100px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
}

#toast.show { transform: translateY(0); }
/* Tables & Lists Responsiveness */
.ranking-table-container, 
.rank-table-container,
.match-list-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-radius: 12px;
}

.ranking-table {
    min-width: 850px;
}

@media (max-width: 768px) {
    .history-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 25px;
    }

    .history-card__main {
        flex-direction: column;
        gap: 12px;
    }

    .map-thumb {
        width: 120px;
        height: 70px;
    }

    .score-box {
        justify-content: center;
    }

    .btn-view {
        width: 100%;
        text-align: center;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 15px;
    }

    .btn-page {
        flex: 1;
        text-align: center;
        padding: 12px;
        font-size: 0.9rem;
    }

    .page-info {
        order: -1;
        width: 100%;
        justify-content: center;
    }
}


/* Manage Panel & Misc Responsiveness */
@media (max-width: 768px) {
    .manage-nav {
        width: 95%;
        padding: 0 15px;
        top: 10px;
        height: 50px;
    }
    
    .manage-nav .logo span {
        display: none;
    }

    .manage-main {
        padding-top: 80px;
    }

    .panel-card {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .panel-card h1 {
        font-size: 1.5rem;
    }

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

    .map-change-row {
        flex-direction: column;
        gap: 10px;
    }

    .panel-btn--auto {
        width: 100%;
    }

    .match-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 25px;
    }

    .match-info {
        flex-direction: column;
        gap: 12px;
    }

    .match-map {
        width: 100px;
        height: 70px;
    }

    .match-score {
        font-size: 1.8rem;
    }

    .match-chevron {
        display: none;
    }
}


/* Stats Dashboard Responsive Overhaul */
@media (max-width: 1150px) {
    .dashboard-body {
        height: auto !important;
        overflow: auto !important;
    }

    .app-container {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 15px;
    }

    .app-container header {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 20px;
        gap: 20px;
        border-radius: 20px;
        align-items: center;
    }

    .app-container .logo-area {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border);
    }

    .app-container .score-wrap {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 10px 0;
    }

    .app-container .team-score {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 20px;
    }

    .app-container .score-val {
        font-size: 2.5rem;
        line-height: 1;
        min-width: 60px;
        text-align: center;
    }

    .app-container .team-label {
        font-size: 0.75rem;
        font-weight: 800;
        letter-spacing: 1px;
    }

    .app-container .team-alive {
        font-size: 0.75rem;
        color: var(--text-dim);
    }

    .app-container .match-info {
        order: -1; /* Place timer/map above the scores on mobile */
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        margin-bottom: 5px;
    }

    .app-container .match-timer {
        font-size: 1.5rem;
    }

    .app-container .header-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        padding-top: 15px;
        border-top: 1px solid var(--border);
    }

    .main-view {
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 10px;
        aspect-ratio: auto;
    }

    .radar-square-box {
        width: 100%;
        height: auto;
        aspect-ratio: auto;
    }

    #radar-container {
        width: 100%;
        aspect-ratio: 4/3;
        max-width: 600px;
    }

    .side-panel {
        width: 100%;
        height: auto;
        max-height: 600px;
    }

    .app-container footer {
        width: 100%;
        height: 80px;
        border-radius: 12px;
    }

    .replay-panel {
        width: 95%;
        padding: 8px 15px;
        bottom: 10px;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .app-container .score-val {
        font-size: 1.8rem;
    }
    .app-container .score-wrap {
        gap: 5px;
    }
    .app-container .team-label {
        display: none;
    }
}
/* ==============================================
   CALIBRATOR: RCON Console
   ============================================== */
.calib-rcon-box {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.calib-rcon-box h3 {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.rcon-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.rcon-input-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 15px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.rcon-input-group button {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    width: 45px;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rcon-input-group button:hover {
    transform: scale(1.05);
}

.rcon-log-area {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 120px;
    padding: 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #ccc;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.4;
}

.rcon-log-area span {
    display: block;
}
