/* ==========================================
   1. ZMIENNE KOLORYSTYCZNE I BAZA (Motyw CS:GO)
   ========================================== */
:root {
    --cs-bg-dark: #121419;
    --cs-panel-bg: #1e2229;
    --cs-panel-border: #2a2f38;
    --cs-gold: #e4a81d;
    --cs-gold-hover: #f1b72e;
    --cs-text-main: #d1d5da;
    --cs-text-muted: #8b929a;
}

body {
    font-family: 'Chakra Petch', sans-serif;
    background-color: var(--cs-bg-dark);
    color: var(--cs-text-main);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
}

.container {
    max-width: 1100px;
    width: 100%;
    margin: 40px auto;
    background-color: rgba(30, 34, 41, 0.95);
    padding: 30px;
    border: 1px solid var(--cs-panel-border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    flex: 1; 
    box-sizing: border-box;
}

/* ==========================================
   2. GÓRNE MENU NAWIGACYJNE
   ========================================== */
.main-nav {
    background-color: #1a1e24;
    border-bottom: 2px solid var(--cs-gold);
    padding: 0 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    position: sticky;
    top: 0;
    z-index: 900;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-links {
    display: flex;
    gap: 5px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.1em;
    padding: 10px 20px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background-color: rgba(228, 168, 29, 0.1);
    color: var(--cs-gold);
}

.nav-links a.active {
    background-color: var(--cs-gold);
    color: #000;
}

/* ==========================================
   3. NAGŁÓWEK I TOP BAR (Wyszukiwarka, Przyciski)
   ========================================== */
.header-logo {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: var(--cs-gold);
    font-size: 4em;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 2px 10px rgba(228, 168, 29, 0.3);
}

.subtitle {
    color: var(--cs-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.1em;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.top-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--cs-gold) 0%, #c48a12 100%);
    color: #000;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn:hover {
    background: linear-gradient(180deg, var(--cs-gold-hover) 0%, #d69814 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(228, 168, 29, 0.3);
}

.btn-login {
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    color: var(--cs-gold);
    border: 1px solid var(--cs-gold);
}

.btn-login:hover {
    background: linear-gradient(180deg, #34495e 0%, #2c3e50 100%);
    color: #fff;
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form input[type="text"] {
    padding: 12px 15px;
    width: 350px;
    border: 1px solid var(--cs-panel-border);
    border-radius: 4px;
    background-color: #16191f;
    color: #fff;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--cs-gold);
    box-shadow: 0 0 8px rgba(228, 168, 29, 0.3);
}

.clear-btn {
    color: var(--cs-text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.clear-btn:hover {
    color: #ff5252;
}

/* ==========================================
   4. TABELA GRACZY / WYNIKÓW
   ========================================== */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--cs-bg-dark);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--cs-panel-border);
}

th, td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--cs-panel-border);
}

th {
    background-color: #181b21;
    color: var(--cs-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    font-size: 1.1em;
}

tbody tr {
    transition: background-color 0.2s ease, border-left 0.2s ease;
    border-left: 3px solid transparent;
}

tbody tr:nth-child(even) {
    background-color: #1a1e24;
}

tbody tr:hover {
    background-color: rgba(228, 168, 29, 0.05);
    border-left: 3px solid var(--cs-gold);
}

.nick-cell {
    text-align: center;
    font-size: 1.1em;
}

a.nick-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

a.nick-link:hover {
    color: var(--cs-gold);
    text-shadow: 0 0 8px rgba(228, 168, 29, 0.4);
}

.stat-highlight {
    color: #4caf50;
    font-weight: 700;
}

.coins {
    color: var(--cs-gold);
    font-weight: bold;
}

.no-results {
    padding: 30px;
    color: var(--cs-text-muted);
    font-style: italic;
}

/* ==========================================
   5. PAGINACJA (Stronnicowanie)
   ========================================== */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 8px;
}

.pagination a {
    padding: 8px 15px;
    background-color: #16191f;
    color: var(--cs-text-main);
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid var(--cs-panel-border);
    font-weight: 600;
    transition: all 0.2s;
}

.pagination a.active {
    background-color: var(--cs-gold);
    color: #000;
    border-color: var(--cs-gold);
}

.pagination a:hover:not(.active) {
    background-color: #2a2f38;
    border-color: var(--cs-gold);
    color: #fff;
}

/* ==========================================
   6. MODAL (Okienko Logowania)
   ========================================== */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--cs-panel-bg);
    margin: 10% auto; 
    padding: 30px;
    border: 1px solid var(--cs-gold);
    border-radius: 8px;
    width: 350px;
    box-shadow: 0 5px 25px rgba(228, 168, 29, 0.2);
    position: relative;
}

.close-modal {
    color: var(--cs-text-muted);
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #ff5252;
}

.modal-content h2 {
    color: var(--cs-gold);
    margin-top: 0;
    text-align: center;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    color: var(--cs-text-main);
}

.modal-content input[type="text"],
.modal-content input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: #16191f;
    border: 1px solid var(--cs-panel-border);
    color: #fff;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: 'Chakra Petch', sans-serif;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--cs-gold);
}

/* ==========================================
   7. PROFIL GRACZA (stats.php)
   ========================================== */
.profile-actions {
    text-align: center;
    margin-bottom: 30px;
}

.back-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1a1e24;
    color: var(--cs-text-main);
    text-decoration: none;
    border: 1px solid var(--cs-panel-border);
    border-radius: 4px;
    font-weight: 700;
    transition: all 0.2s;
}

.back-btn:hover {
    background-color: #2a2f38;
    color: var(--cs-gold);
    border-color: var(--cs-gold);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.stats-card {
    background-color: var(--cs-panel-bg);
    border: 1px solid var(--cs-panel-border);
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.stats-card h3 {
    color: var(--cs-gold);
    border-bottom: 1px solid var(--cs-panel-border);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.2em;
}

.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #2a2f38;
    font-size: 1.1em;
}

.stats-list li:last-child {
    border-bottom: none;
}

.stat-value {
    font-weight: 700;
    color: #fff;
}

.stat-value.highlight {
    color: #4caf50;
}

.stat-value.positive {
    color: #4caf50; 
}

.stat-value.negative {
    color: #ff5252; 
}

.stat-value.cs-gold {
    color: var(--cs-gold);
}

/* ==========================================
   8. STOPKA I ANIMOWANY SLIDER (footer.php)
   ========================================== */
.site-footer {
    background-color: #16191f;
    border-top: 1px solid var(--cs-panel-border);
    padding: 40px 20px;
    margin-top: auto; 
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-author p {
    margin: 5px 0;
    color: var(--cs-text-main);
}

.author-name {
    color: var(--cs-gold);
    font-weight: 700;
    font-size: 1.2em;
}

.footer-subtext {
    font-size: 0.9em;
    color: var(--cs-text-muted);
}

.footer-partners {
    flex-grow: 1;
    max-width: 500px;
    text-align: right;
    overflow: hidden;
}

.footer-partners h4 {
    color: var(--cs-text-muted);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 0.9em;
    letter-spacing: 2px;
}

.slider-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    /* Maskowanie krawędzi dla efektu zanikania */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.slider-track {
    display: inline-block;
    animation: slide-partners 15s linear infinite;
}

.slider-track:hover {
    animation-play-state: paused; 
}

.slide {
    display: inline-block;
    padding: 0 30px;
    color: var(--cs-gold);
    font-weight: 700;
    font-size: 1.2em;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: opacity 0.3s;
    cursor: default;
}

.slide:hover {
    opacity: 1;
    text-shadow: 0 0 10px rgba(228, 168, 29, 0.5);
}
.rank-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, rgba(30, 34, 41, 0) 100%) !important;
    border-left: 4px solid #ffd700 !important;
}

.rank-1 td {
    color: #ffd700;
    font-weight: 700;
}

.rank-1 a.nick-link {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.rank-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1) 0%, rgba(30, 34, 41, 0) 100%) !important;
    border-left: 4px solid #c0c0c0 !important;
}

.rank-2 td {
    color: #c0c0c0;
    font-weight: 700;
}

.rank-2 a.nick-link {
    color: #c0c0c0;
}

.rank-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.15) 0%, rgba(30, 34, 41, 0) 100%) !important;
    border-left: 4px solid #cd7f32 !important;
}

.rank-3 td {
    color: #cd7f32;
    font-weight: 700;
}

.rank-3 a.nick-link {
    color: #cd7f32;
}
@keyframes slide-partners {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}