/* ============================================================
   Nogden.eu - Punishments Stylesheet (FINAL FIX - ALIGNMENT)
   ============================================================ */

/* --- 1. GLOBAL BACKGROUND CONFIGURATION --- */
body.vote-page {
    width: 100%;
    min-height: 100vh;
    background-color: #181a1b !important; 
    display: flex;
    flex-direction: column;
    color: #ffffff !important;
    margin: 0;
    padding: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Enhanced background for desktop viewports */
@media (min-width: 769px) {
    body.vote-page {
        background: 
            linear-gradient(rgba(24, 26, 27, 0.8), rgba(24, 26, 27, 0.8)), 
            url('/files/pictures/bcknogden.webp?v=4') !important;
        background-position: center !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
        background-attachment: fixed !important;
    }
}

/* --- 2. Main Punishment Section --- */
.punishments-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 180px 20px 60px 20px; 
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    min-height: 800px; /* Fix pro LCP */
}

.punishments-section h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    font-weight: 900;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* --- 3. Category Tabs (Touch-friendly Navigation) --- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tabs .tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.tabs .tab.active, .tabs .tab:hover {
    background: #b000f4;
    border-color: #b000f4;
    box-shadow: 0 5px 15px rgba(176, 0, 244, 0.3);
}

/* --- 4. Database Search Implementation --- */
.search-section input[type="text"] {
    padding: 14px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 320px;
    max-width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    margin-bottom: 40px;
    outline: none;
    transition: 0.3s;
    text-align: center;
}

/* --- 5. Data Table Components --- */
.punishments-table {
    width: 100%;
    max-width: 1100px;
    border-collapse: collapse; 
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.punishments-table th, 
.punishments-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03); 
    text-align: left;
    font-size: 0.9rem;
    vertical-align: middle;
    white-space: nowrap; 
}

/* Kontrast hlavičky pro Lighthouse */
.punishments-table th {
    background-color: rgba(255, 255, 255, 0.08); 
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #cccccc; 
    letter-spacing: 1.5px;
}

.punishments-table td:nth-child(2) {
    white-space: normal;
    min-width: 200px;
    max-width: 400px;
}

.player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-head {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: #1a1c1e;
    display: block;
}

/* --- 6. Navigation & Pagination Controls --- */
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination-controls a, .pagination-controls span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.pagination-controls a:hover, .pagination-controls span.active {
    background: #b000f4;
}

/* ============================================================
    RESPONSIVE DESIGN & iOS BACKGROUND FIX
   ============================================================ */

@media (max-width: 768px) {
    #nav-menu li a.active {
        background-color: rgba(176, 0, 244, 0.25) !important;
        color: #b000f4 !important;
        box-shadow: inset 6px 0 0 0 #b000f4 !important;
        border-radius: 4px 12px 12px 4px !important;
    }

    body.vote-page::after {
        content: "";
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background-image: url('/files/pictures/bcknogden.webp?v=4');
        background-position: center top;
        background-size: cover;
        background-repeat: no-repeat;
        z-index: -1;
        pointer-events: none;
        background-color: rgba(24, 26, 27, 0.88);
        background-blend-mode: darken;
        will-change: transform;
    }

    .punishments-section { 
        padding-top: 140px; 
        background: transparent !important;
    }

    /* FIX: Nadpisy se na mobilu neposunou */
    .punishments-table {
        display: table !important; 
        width: 100%;
        min-width: 600px; /* Vynutí horizontální scroll, aby status byl vidět */
    }

    .punishments-table th, 
    .punishments-table td {
        display: table-cell !important; 
        padding: 12px 10px;
        font-size: 0.8rem;
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .punishments-section h1 { font-size: 1.8rem; }
    .tabs .tab { 
        padding: 12px 16px; 
        font-size: 0.75rem; 
        min-height: 48px;
    }
    .pagination-controls a, .pagination-controls span {
        min-width: 48px;
        height: 48px;
    }
}