/* --- ЗМІННІ (Глобальна палітра RES) --- */
:root {
    --bg-main: #0B0E14;          /* Головний фон сайту */
    --bg-surface: #171E2E;       /* Колонки / Контейнери / Картки */
    --text-main: #FFFFFF;        /* Головний текст */
    --text-muted: rgba(255, 255, 255, 0.6); /* Другорядний текст */
    --accent-primary: #8A52FF;   /* Акцент 1 (Фіолетовий) */
    --accent-secondary: #00E5FF; /* Акцент 2 (Блакитний) */
    --border-color: rgba(255, 255, 255, 0.1); /* Легкі бордери */

    /* Зворотна сумісність для старих сторінок (щоб нічого не зламалося) */
    --bg-card: var(--bg-surface);
    --accent-orange: var(--accent-primary);
    --accent-gold: var(--accent-secondary);
    --accent-pink: var(--accent-primary);
    --accent-blue: var(--accent-secondary);
}

/* --- БАЗОВІ НАЛАШТУВАННЯ --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* --- СТИЛІ ДЛЯ КІМНАТИ КАСТИНГУ --- */
.casting-card {
    background: rgba(255,255,255,0.02);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

.casting-card.ready { border-color: #50E3C2; box-shadow: 0 0 15px rgba(80, 227, 194, 0.1); }
.casting-card.warning { border-color: #FFB347; }
.casting-card.rejected { border-color: #ff4646; opacity: 0.6; }
.casting-card.approved { border-color: var(--accent-primary); background: rgba(138, 82, 255, 0.05); }

.casting-player-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.3);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 13px;
}

.casting-badge {
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Manrope', sans-serif;
    min-height: 100vh;
    padding: 0 60px;
    overflow-x: hidden;
    
    /* Анімація переходу */
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

body.fade-in, body.no-animation {
    opacity: 1;
}

body.fade-out {
    opacity: 0;
}

/* --- УНІВЕРСАЛЬНА ШАПКА (HEADER) --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    z-index: 1001;
}

.logo-icon {
    height: 45px;
    display: block;
}

.logo-text {
    color: var(--text-main);
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

/* Активна вкладка з рискою */
.nav-links a.active {
    color: var(--accent-primary);
    font-weight: 600;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-primary);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(138, 82, 255, 0.5); /* Фіолетова тінь */
}

/* Гамбургер меню для мобільних */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* --- БАЗОВИЙ КОНТЕЙНЕР ДЛЯ ВСІХ СТОРІНОК --- */
.main-container {
    padding-bottom: 40px;
}

/* =========================================
   УНІВЕРСАЛЬНІ UI КОМПОНЕНТИ (Бокси, Форми, Кнопки)
   ========================================= */

/* --- 1. КАРТКИ ТА КОНТЕЙНЕРИ --- */
.t-card, .mod-content, .reg-form, .admin-card, .auth-box, .tourney-summary, .card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-main);
}

.card, .mod-content, .reg-form, .admin-card {
    padding: 25px;
}

/* Ефект наведення для інтерактивних карток */
.t-card:hover, .admin-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 15px 40px rgba(138, 82, 255, 0.15); /* Фіолетова тінь */
}

/* --- 2. СІТКИ (Bento Grids) --- */
.bento-grid, .tournaments-grid, .admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1440px;
    margin: 30px auto 0 auto;
    width: 100%;
}

.page-header {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 10px;
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.news-content {
    margin-top: 15px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
}

.embed-container {
    margin-top: 20px;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}
.embed-container iframe, .embed-container blockquote {
    max-width: 100% !important;
}

/* --- 3. ФОРМИ ТА ІНПУТИ --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.4);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    font-size: 15px;
    font-family: 'Manrope', sans-serif;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(138, 82, 255, 0.2); /* Фіолетова тінь */
}

/* --- 4. УНІВЕРСАЛЬНІ КНОПКИ --- */
.submit-btn, .update-btn, .action-btn {
    display: inline-block;
    width: 100%;
    padding: 15px;
    background-color: var(--accent-primary); /* Було помаранчевим, тепер Фіолетове */
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.submit-btn:hover, .update-btn:hover, .action-btn:hover {
    background-color: var(--accent-secondary); /* Змінюється на Блакитний при наведенні */
    color: var(--bg-main); /* Темний текст на яскравому фоні */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.3); /* Блакитна тінь */
}

button:disabled, .btn-disabled {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* --- 5. МОДАЛЬНІ ВІКНА --- */
.t-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.t-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.t-hero-card {
    background: var(--bg-surface);
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    border: 1px solid rgba(0, 229, 255, 0.2); /* Блакитний легкий бордер */
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.t-modal-overlay.active .t-hero-card {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}
.close-modal:hover { background: #ff4646; border-color: #ff4646; }

.hero-banner {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    padding: 30px;
}

.hero-title {
    font-size: 28px;
    color: var(--text-main);
    margin-bottom: 15px;
}

.hero-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 15px;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.hero-stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.hero-stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-stat-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

/* =========================================
   СТИЛІ СТОРІНКИ ТУРНІРІВ
   ========================================= */

.t-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.t-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.t-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.t-card:hover .t-image {
    transform: scale(1.05);
}

.t-status-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.t-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
}

.t-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.t-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.t-info-val {
    font-weight: 600;
    color: var(--text-main);
}

.t-info-row[style*="margin-top: auto"] {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

/* =========================================
   СТИЛІ СТОРІНКИ СТАТИСТИКИ
   ========================================= */
.player-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
}

.player-header {
    position: relative;
    height: 100px;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.player-banner {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.3;
}

.player-info, .ranks-container {
    position: relative;
    z-index: 2;
}

.player-info {
    margin-right: auto;
}

.player-name {
    font-size: 1.2rem;
    font-weight: 700;
}
.player-tag {
    color: var(--text-muted);
}

.ranks-container {
    display: flex;
    gap: 10px;
}
.rank-box {
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
    padding: 5px 10px;
    text-align: center;
}
.rank-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.rank-icon {
    width: 40px;
    height: 40px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat-box {
    padding: 15px;
    text-align: center;
    border-left: 1px solid var(--border-color);
}
.stat-box:first-child { border-left: none; }

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
}
.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.kd-good { color: var(--accent-secondary); } /* Блакитний для хорошого K/D */
.kd-bad { color: #ff4646; }

.last-updated {
    padding: 8px 15px;
    font-size: 12px;
    text-align: right;
    color: rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.2);
}

/* =========================================
   СТИЛІ ПАНЕЛІ МОДЕРАТОРА
   ========================================= */
.mod-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.mod-sidebar {
    flex: 0 0 250px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 15px;
}

.mod-menu-btn {
    display: block;
    width: 100%;
    padding: 12px 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mod-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.mod-menu-btn.active {
    background-color: rgba(138, 82, 255, 0.1);
    color: var(--accent-primary);
    font-weight: 700;
}

.mod-content {
    flex: 1;
}

.admin-card .icon-box {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.05);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* =========================================
   СТИЛІ СТОРІНКИ НОВИН
   ========================================= */
.news-hero, .hero-banner-container, .main-article {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    margin-top: 10px;
    grid-column: 1 / -1;
}

.news-hero img, .hero-banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* === ТУРНІРНА СІТКА (BENTO BRACKETS) === */
.bracket-wrapper {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px dashed rgba(255,255,255,0.1);
}

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

.bracket-round-title {
    text-align: center;
    color: var(--accent-secondary); /* Блакитний для стадій турніру */
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.bracket-match {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bracket-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.bracket-team:last-child {
    border-bottom: none;
}

/* Стиль для переможця */
.bracket-team.winner {
    background: rgba(0, 229, 255, 0.1); /* Блакитний напівпрозорий фон */
    border-left: 3px solid var(--accent-secondary);
}

.bracket-team.winner .b-name,
.bracket-team.winner .b-score {
    color: var(--accent-secondary);
    font-weight: 800;
}

.b-name { font-size: 14px; color: var(--text-main); }
.b-score { font-size: 15px; color: var(--text-muted); font-weight: bold; }

/* === БЛОК ЗДІБНОСТЕЙ (ABILITIES) === */
.abilities-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.ability-slot {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: 800;
    color: #444;
    position: relative;
    transition: all 0.2s ease;
}

/* Коли здібність заряджена */
.ability-slot.active {
    border-color: var(--accent-secondary);
    color: var(--text-main);
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* Спеціальний стиль для Ульти (X) */
.ability-slot.ult.active {
    border-color: var(--accent-primary);
    background: rgba(138, 82, 255, 0.15);
    box-shadow: 0 0 15px rgba(138, 82, 255, 0.3);
    color: var(--accent-primary);
}

.charge-badge {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: #111;
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.ability-slot:not(.active) .charge-badge {
    border-color: #444;
    color: #444;
}

/* === БЛОК ЗБРОЇ ТА ПАТРОНІВ === */
.weapon-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.w-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.w-ammo {
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    color: var(--accent-secondary);
}

.w-reserve {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
    body { padding: 0 30px; }
    .bento-grid, .tournaments-grid, .admin-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    body { padding: 0 15px; }
    .header { padding: 20px 0; }
    .menu-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-surface);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    .nav-links.active { display: flex; }
    .nav-links a { font-size: 18px; }

    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .page-header h1, .page-header h2 { font-size: 24px !important; }

    .bento-grid, .tournaments-grid, .admin-grid {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }

    .card, .t-card, .mod-content, .reg-form, .admin-card { padding: 15px; }
    .t-modal-overlay { padding: 10px; }
    .t-hero-card { max-height: 95vh; }
    .hero-content { padding: 20px; }
    .hero-title { font-size: 22px; }
    .hero-grid { grid-template-columns: 1fr 1fr; }

    #m-modal-layout { flex-direction: column !important; }
    #m-left-panel { flex: none !important; }
    #m-right-panel {
        border-left: none !important;
        border-top: 1px solid rgba(255,255,255,0.05);
        padding: 20px 15px !important;
    }

    .player-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        height: auto;
        padding-top: 30px;
    }

    .player-info { margin-right: 0; margin-bottom: 15px; }
    .ranks-container { justify-content: center; }
    .stats-row { grid-template-columns: 1fr 1fr; }

    .stat-box {
        border-left: none;
        border-bottom: 1px solid var(--border-color);
    }
    .stat-box:nth-child(even) { border-left: 1px solid var(--border-color); }
    .stat-box:nth-child(3), .stat-box:nth-child(4) { border-bottom: none; }

    .mod-container { flex-direction: column; }
    .mod-sidebar {
        flex: none;
        width: 100%;
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding: 10px;
    }

    .mod-menu-btn { white-space: nowrap; width: auto; }
    .form-group.grid { grid-template-columns: 1fr !important; }
    #section-tournaments > div:nth-child(2) { grid-template-columns: 1fr !important; }
    .hero-banner { height: 150px; }
}

@media (max-width: 400px) {
    .logo-text { display: none; }
    }

    /* --- CUSTOM MODAL ALERT --- */
    .custom-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex; justify-content: center; align-items: center;
    z-index: 99999;
    opacity: 0; visibility: hidden;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    }
    .custom-modal-overlay.active {
    opacity: 1; visibility: visible;
    }
    .custom-modal {
    background: #1f2326;
    border: 2px solid #ff4655;
    padding: 30px;
    border-radius: 12px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
    transform: scale(0.8);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .custom-modal-overlay.active .custom-modal {
    transform: scale(1);
    }
    .custom-modal-message {
    font-size: 18px;
    color: #ece8e1;
    margin-bottom: 30px;
    line-height: 1.6;
    font-weight: 500;
    }
    .custom-modal-btn {
    background: #ff4655;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 800;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: 0.2s;
    width: 100%;
    }
    .custom-modal-btn:hover {
    background: #ff5e6a;
    box-shadow: 0 0 20px rgba(255, 70, 85, 0.4);
    }
    .custom-modal-btn:active {
    transform: scale(0.98);
    }

    /* --- MOBILE RESPONSIVE OVERRIDES (Small screens) --- */
    @media (max-width: 576px) {
    /* Global fixes */
    .bento-grid, .tournaments-grid, .admin-grid, .stats-row, .profile-dashboard, .hero-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Target common multi-column layouts used in moderator/admin panels */
    [style*="grid-template-columns: 1fr 2fr"], 
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: repeat"] {
        grid-template-columns: 1fr !important;
    }

    /* Teams & Profile Banner */
    .team-banner, .player-badge, .player-header {
        flex-direction: column !important;
        text-align: center;
        padding: 20px !important;
        gap: 20px !important;
    }

    .team-logo, .p-avatar-wrapper {
        margin: 0 auto;
    }

    /* Modals & Forms */
    .modal-form, .t-hero-card {
        padding: 20px !important;
        width: 95% !important;
        max-height: 95vh !important;
    }

    /* Teams Registration Modal Fix */
    #reg-modal .modal-form.expanded {
        max-width: 95% !important;
    }

    .reg-split-layout {
        flex-direction: column !important;
        width: 100% !important;
        gap: 20px !important;
    }

    .reg-left-pane, .reg-right-pane {
        width: 100% !important;
    }

    /* Navigation & Headers */
    .page-header {
        text-align: center;
    }

    .hero-carousel {
        height: 350px !important;
    }

    .hero-title {
        font-size: 28px !important;
        letter-spacing: 1px !important;
    }

    .hero-subtitle {
        font-size: 14px !important;
        padding: 0 10px;
    }

    .market-header {
        justify-content: center !important;
    }

    /* Member/Player Rows */
    .member-row, .p-info-row {
        flex-direction: column !important;
        gap: 10px;
        text-align: center;
    }

    /* Buttons */
    .submit-btn {
        width: 100% !important;
    }

    /* Veto Room specific */
    .presence-bar {
        flex-direction: column !important;
        align-items: center;
        gap: 10px !important;
    }

    .map-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    }
    }

    @media (max-width: 480px) {
    .hero-title { font-size: 20px !important; }
    .hero-grid { grid-template-columns: 1fr !important; }
    .custom-modal { padding: 20px !important; }
    }

    /* Global Table & Scroll fixes */
    .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
    }
    table {
    min-width: 600px; /* Force scroll on small screens for tables */
    }
    @media (max-width: 600px) {
    table { font-size: 13px; }
    }