/* main.css */
@import url('global_root.css');

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Zabránění scrollování na stránce blackjack/index.php */
body.no-scroll {
    min-height: 100vh;
    overflow: hidden;
}

/* Hlavička */
.admin-header {
    background: var(--bg-panel);
    border-bottom: 1px solid #2a2a3a;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Karta webu (Custom Card) */
.custom-card {
    background: var(--bg-card);
    border: 1px solid #2a2a3a;
    border-radius: 16px;
    padding: 1.5rem;
    height: 100%;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Efekt při najetí myší */
.card-btn:hover .custom-card {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(102, 126, 234, 0.2);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.card-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: monospace;
}

/* Modální okno */
.modal-bg {
    display: none;
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 20, 60, 0.85);
    justify-content: center;
    align-items: center;
}
.modal-bg.active {
    display: flex;
}

.modal-box {
    background: var(--bg-panel, #23233a);
    border-radius: 2.2rem;
    box-shadow: 0 12px 48px rgba(102,126,234,0.18), 0 2px 8px rgba(0,0,0,0.10);
    padding: 2.5rem 2.2rem 2rem 2.2rem;
    width: 100%;
    max-width: 370px;
    border: 1px solid #2a2a3a;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
}

.close-modal {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #aaa;
    background: none;
    border: none;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
}
.close-modal:hover, .close-modal:focus {
    background: rgba(102,126,234,0.10);
    color: #ff6a88;
}

.modal-box h2, .modal-box h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: #fff;
    text-align: left;
}

.modal-box input[type="text"],
.modal-box input[type="password"],
.modal-box input[type="email"] {
    border-radius: 1.2rem;
    border: 1.5px solid #3a3a5a;
    background: #19192a;
    color: #fff;
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    margin-bottom: 0.7rem;
    outline: none;
    transition: border 0.18s;
}
.modal-box input:focus {
    border-color: #764ba2;
}

.modal-box .btn-custom {
    margin-bottom: 0.5rem;
}

.modal-box p, .modal-box label {
    color: #bdbde6;
    font-size: 0.98rem;
    margin-bottom: 0.2rem;
}

.modal-error {
    margin-bottom: 0.5rem;
}

/* Tlačítka */
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
}
.btn-primary:hover {
    background: #5a6fd6;
    border-color: #5a6fd6;
}
.btn-outline-primary {
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline-primary:hover {
    background: var(--accent);
    color: #fff;
}

/* Moderní styly pro tlačítka */
.btn-custom {
    border-radius: 1.3rem !important;
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-custom:active, .btn-custom:focus {
    box-shadow: 0 1px 4px rgba(0,0,0,0.13);
}
.btn-custom.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
}
.btn-custom.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: #fff;
}
.btn-custom.btn-outline-primary {
    border: 2px solid #764ba2;
    color: #764ba2;
    background: #181828;
}
.btn-custom.btn-outline-primary:hover {
    background: var(--primary-gradient);
    color: #fff;
}
.btn-custom.btn-danger {
    background: linear-gradient(135deg, #ff6a88 0%, #ff99ac 100%);
    color: #fff;
    border: none;
}
.btn-custom.btn-danger:hover {
    background: linear-gradient(135deg, #ff99ac 0%, #ff6a88 100%);
    color: #fff;
}
.btn-custom.btn-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
    border: none;
}
.btn-custom.btn-success:hover {
    background: linear-gradient(135deg, #38f9d7 0%, #43e97b 100%);
    color: #fff;
}
.btn-custom.btn-outline-light {
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
}
.btn-custom.btn-outline-light:hover {
    background: #fff;
    color: #23233a;
}

/* --- ADMIN SPECIFICKÉ STYLY (Příjemnější tabulky) --- */

/* Kontejner tabulky - vypadá jako karta */
.admin-table-card {
    background-color: var(--bg-panel); /* Světlejší tmavá (stejná jako header) */
    border-radius: 16px;
    border: 1px solid #2a2a3a;
    overflow: hidden; /* Aby rohy tabulky nepřetékaly */
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Samotná tabulka */
.table-custom {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-main);
    vertical-align: middle;
}

/* Hlavička tabulky */
.table-custom thead th {
    background-color: rgba(0, 0, 0, 0.2); /* O trochu tmavší než zbytek */
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    padding: 18px 24px;
    border-bottom: 1px solid #2a2a3a;
    border-top: none;
}

/* Řádky tabulky */
.table-custom tbody td {
    padding: 18px 24px;
    border-bottom: 1px solid #2a2a3a;
    background-color: transparent; /* Dědí barvu z .admin-table-card */
    transition: background-color 0.2s;
}

/* Poslední řádek bez čáry */
.table-custom tbody tr:last-child td {
    border-bottom: none;
}

/* Hover efekt (příjemné zesvětlení) */
.table-custom tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.03);
    color: #fff;
}

/* Tlačítka akcí v tabulce - zarovnání */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Malá tlačítka */
.btn-sm-custom {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.btn-icon-view { background: rgba(102, 126, 234, 0.15); color: #667eea; }
.btn-icon-view:hover { background: #667eea; color: #fff; }

.btn-icon-edit { background: rgba(255, 171, 0, 0.15); color: #ffab00; }
.btn-icon-edit:hover { background: #ffab00; color: #000; }

.btn-icon-delete { background: rgba(255, 107, 107, 0.15); color: #ff6b6b; }
.btn-icon-delete:hover { background: #ff6b6b; color: #fff; }

/* Status Badge */
.badge-admin {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-success { background: rgba(127, 255, 175, 0.15); color: var(--success); border: 1px solid rgba(127, 255, 175, 0.2); }
.badge-warning { background: rgba(255, 171, 0, 0.15); color: var(--warning); border: 1px solid rgba(255, 171, 0, 0.2); }

/* --- RESPONZIVNÍ TABULKY PRO MOBILY --- */
@media (max-width: 576px) {
    /* Zmenšení paddingu v tabulce */
    .table-custom tbody td, 
    .table-custom thead th {
        padding: 10px 8px !important; /* Menší mezery */
        font-size: 0.85rem; /* O trochu menší písmo */
    }

    /* Ikony v tlačítkách trochu zmenšíme */
    .btn-sm-custom {
        padding: 5px 8px;
        font-size: 0.85rem;
    }

    /* Skryje se sloupec "Název" v hlavičce, protože bude sloučený s obsahem */
    .mobile-hide-header {
        display: none;
    }
}

@media (max-width: 600px) {
    .header-actions { display: none !important; }
    .mobile-menu-btn { display: inline-flex !important; }
}
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.mobile-menu-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
}
.mobile-menu-modal.active {
    display: flex;
}
.mobile-menu-box {
    background: var(--bg-panel, #23233a);
    border-radius: 18px;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: stretch;
    position: relative;
}
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 1.2rem;
    gap: 0.5rem;
    position: relative;
}
.mobile-menu-close {
    margin-left: 0.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    color: #fff;
    background: none;
    border: none;
    border-radius: 50%;
    transition: background 0.15s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
    background: rgba(102,126,234,0.12);
    color: #ff6a88;
}

/* Nové styly pro blackjack role boxy */
.bj-role-row {
    gap: 2.5rem;
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.bj-role-card {
    min-width: 320px;
    max-width: 420px;
    flex: 1 1 340px;
    margin-bottom: 2rem;
    font-size: 1.15rem;
    padding: 2.5rem 2rem;
}
@media (max-width: 900px) {
    .bj-role-row {
        flex-direction: column;
        gap: 1rem;
    }
    .bj-role-card {
        max-width: 98vw;
        min-width: 0;
        width: 100%;
        font-size: 1.01rem;
        padding: 1.2rem 0.7rem 1.5rem 0.7rem;
        margin-bottom: 0.5rem;
    }
}

/* Nové styly pro přesné centrování */
.bj-main-center {
    min-height: 100dvh; /* Použijeme min-height, aby se dalo scrollovat na malých mobilech */
    width: 100%;
    display: flex;
    align-items: center; /* Vertikální střed */
    justify-content: center; /* Horizontální střed */
    padding: 20px; /* Odsazení od krajů */
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Úprava pro mobily - stále centrujeme, ale povolíme wrap */
@media (max-width: 900px) {
    .bj-main-center {
        /* Odstranili jsme align-items: flex-start, aby to zůstalo uprostřed */
        align-items: center; 
        padding-top: 20px;
        padding-bottom: 20px;
        height: auto; /* Povolíme natažení výšky */
    }
}