@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* =========================================
   1. VARIABLES (RƏNGLƏR VƏ TƏNZİMLƏMƏLƏR)
   ========================================= */
:root {
    --bg-body: #0b0e14;
    /* Çox tünd fon */
    --bg-card: #151a25;
    /* Kartlar üçün tünd boz-göy */
    --bg-header: #151a25;
    /* Başlıq */
    --primary: #6f5eb7;
    /* Əsas Turuncu */
    --primary-hover: #6455ad;
    /* Parlaq Turuncu */
    --text-main: #ffffff;
    /* Ağ yazı */
    --text-muted: #94a3b8;
    /* Boz yazı */
    --border: #2b3245;
    /* Çərçivə rəngi */
    --input-bg: #0f121a;
    /* Input fonu */
    --radius: 10px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* =========================================
   2. BASE STYLES (ƏSAS)
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(90deg, #6c5cb5, #000000);
    color: var(--text-main);
    font-size: 14px;
    padding-bottom: 50px;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: .2s;
}

ul {
    list-style: none;
}

/* =========================================
   3. LAYOUT (STRUKTUR)
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- TOPBAR --- */
.topbar {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius:8px;
}

.topbar-nav {
    display: flex;
    gap: 10px;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -1px;
    color: #fff;
}

.logo span {
    color: var(--primary);
}

.nav-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-btn.blue {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px rgba(108, 13, 216, 0.5);
}

.nav-btn.blue:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 25px rgba(108, 13, 216, 0.5);
}

/* =========================================
   4. COMPONENTS (KİÇİK ELEMENTLƏR)
   ========================================= */

/* --- HERO CARDS --- */
.hero-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.hero-card {
    height: 100px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: transform 0.2s;
}

.hero-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.hero-card:nth-child(1) {
    background: linear-gradient(135deg, #6c5cb5, #000000);
}

.hero-card:nth-child(2) {
    background: linear-gradient(135deg, #e10000, #111827);
}

.hero-card:nth-child(3) {
    background: linear-gradient(135deg, #6c5cb5, #000000);
}

.hero-card:nth-child(4) {
    background: linear-gradient(135deg, #6c5cb5, #000000);
}

.hero-card span {
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* --- FILTER BAR & INPUTS --- */
.filter-bar {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.filter-group {
    flex: 1;
}

.filter-group label {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Genel Select & Input Stili */
select,
select.form-input {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    outline: none;
    transition: 0.2s;

    /* Custom Arrow */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
}

select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 69, 0, 0.1);
}

.btn-apply {
    background: var(--primary);
    color: white;
    border: none;
    padding: 13px 24px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(255, 69, 0, 0.2);
}

.btn-apply:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(148, 19, 180, 0.3);
}

/* --- BADGES & BUTTONS --- */
.tracker-btn {
    display: inline-flex;
    align-items: center;
    background: #fb0000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    margin-top: 4px;
    text-decoration: none;
    transition: 0.2s;
    text-transform: uppercase;
}

.tracker-btn:hover {
    background: var(--primary);
}

.ign-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    margin-top: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(159, 23, 213, 0.1);
    color: var(--primary);
    border: 1px solid rgba(124, 22, 172, 0.25);
    transition: all 0.3s ease;
    cursor: default;
}

.ign-badge:hover {
    background: linear-gradient(90deg, #6f5eb7, #6455ad);
    color: #fff;
    border-color: #6f5eb7;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

/* =========================================
   5. MAIN TABLE (CƏDVƏL)
   ========================================= */
.table-container {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr 0.8fr 0.8fr 0.8fr;
    padding: 15px 20px;
    background: url(https://itemsatis.az/arxa.png);
    background-size: cover;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 800;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr 0.8fr 0.8fr 0.8fr;
    padding: 18px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    align-items: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.table-row:last-child {
    border-bottom: none;
}

/* HOVER EFFECT (LƏZZƏTLİ) */
.table-row:hover {
    transform: scale(1.02) translateY(-5px);
    z-index: 10;
    border-color: #6f5eb7;
    background-image: linear-gradient(90deg, rgba(11, 14, 20, 0.95) 0%, rgba(11, 14, 20, 0.6) 100%), url('https://itemsatis.az/arxa.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 20px 40px -5px rgba(114, 26, 165, 0.25);
}

.table-row:hover .username,
.table-row:hover .col-time,
.table-row:hover div {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    color: #fff !important;
}

.table-row:hover .time-icon,
.table-row:hover .avatar-img {
    filter: drop-shadow(0 0 5px #6f5eb7);
}

/* Sütunlar */
.col-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.col-code {
    color: var(--primary);
    font-weight: 800;
    font-family: monospace;
    font-size: 15px;
    background: rgba(109, 21, 211, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
    border: 1px solid rgba(98, 18, 226, 0.2);
    position: relative;
}

.col-code::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #6f5eb7;
    transition: width 0.3s ease-in-out;
}

.col-code:hover::after {
    width: 100%;
}

.col-ranks {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.col-ranks img {
    width: 24px;
    transition: all 0.3s;
    position: relative;
}

.col-ranks img:hover {
    filter: drop-shadow(0 0 8px rgba(225, 0, 255, 0.8));
    transform: scale(1.3) rotate(5deg);
    cursor: help;
    z-index: 10;
}

.col-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
}

.time-icon {
    color: var(--primary);
    transition: transform 0.4s ease-in-out;
}

.col-time:hover .time-icon {
    transform: rotate(360deg);
}

.avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0f121a;
    border: 2px solid var(--border);
    object-fit: cover;
    transition: 0.2s;
}

.avatar-img:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.slots-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #10b981;
    font-weight: 800;
    font-size: 14px;
}

.empty-state {
    padding: 60px;
    text-align: center;
    color: var(--text-muted);
}

/* Hover Text Gradient */
.hover-gradient {
    transition: all 0.3s ease;
    display: inline-block;
}

.hover-gradient:hover {
    background: linear-gradient(90deg, #6f5eb7, #6455ad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    transform: translateX(2px);
}

.username.hover-gradient:hover {
    color: transparent;
}

/* =========================================
   6. AUTH PAGES (GİRİŞ & QEYDİYYAT)
   ========================================= */
.auth-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #151a25;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    text-align: center;
    animation: slideUpFade 0.8s ease-out;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

/* Google Button Clean Fix */
.btn-google {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background-color: #fff !important;
    color: #1f2937 !important;
    font-weight: 700;
    font-size: 14px;
    padding: 12px;
    border-radius: 8px;
    border: none;
    text-decoration: none !important;
    transition: 0.2s;
    margin-bottom: 20px;
}

.btn-google:hover {
    background-color: #f3f4f6 !important;
    transform: translateY(-2px);
}

.btn-google img {
    width: 20px;
    height: 20px;
    display: block;
}

/* Auth Inputs */
.auth-card .form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    font-size: 14px;
    padding: 14px 16px;
    border-radius: 8px;
    transition: 0.2s;
    margin-bottom: 0;
}

.auth-card .form-input:focus {
    border-color: var(--primary) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.15) !important;
}

.auth-card .form-input::placeholder {
    color: #9ca3af !important;
    opacity: 1;
}

.auth-card label {
    text-align: left;
    display: block;
    margin-bottom: 8px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
    margin-left: 2px;
}

.auth-card .btn-apply {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    font-size: 16px;
    border-radius: 8px;
}

.divider {
    display: flex;
    align-items: center;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider::before {
    margin-right: 15px;
}

.divider::after {
    margin-left: 15px;
}

.alert {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #6455ad;
}

/* =========================================
   7. CREATE ROOM PAGE (İZOLYASİYA EDİLMİŞ)
   ========================================= */
.create-wrapper {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.create-card {
    width: 100%;
    max-width: 800px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

.create-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

.create-card .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.create-card .form-full {
    grid-column: 1 / -1;
}

.create-card .form-group {
    margin-bottom: 15px;
}

.create-card .form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
}

.create-card .form-input {
    width: 100%;
    background: var(--input-bg) !important;
    border: 1px solid var(--border) !important;
    color: #fff !important;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    height: auto;
}

.create-card .form-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.15) !important;
}

.create-card .btn-apply {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s;
}

.create-card .btn-apply:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
    height: 100%;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* =========================================
   8. MOBILE RESPONSIVE
   ========================================= */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(21, 26, 37, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    z-index: 1000;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

@media (max-width: 900px) {
    .topbar-nav {
        display: none !important;
    }

    .mobile-bottom-bar {
        display: flex !important;
    }

    body {
        padding-bottom: 90px;
    }

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

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 0;
        border: none;
        background: transparent;
    }

    .filter-group {
        width: 100%;
    }

    .btn-apply {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }

    .table-header {
        display: none;
    }

    .table-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
        border-radius: 8px;
        margin-bottom: 15px;
        border: 1px solid var(--border);
    }

    .col-user {
        border-bottom: 1px solid var(--border);
        padding-bottom: 12px;
    }

    .col-time {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .create-card {
        padding: 20px;
    }

    .create-card .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .create-card .form-full[style*="flex"] {
        flex-direction: column;
        gap: 10px;
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* ===== MODAL POPUP (Hazırlanır Pəncərəsi) ===== */
.modal-overlay {
    display: none;
    /* Başlanğıcda gizlidir */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    /* Tünd arxa fon */
    z-index: 2000;
    /* Hər şeyin üstündə olsun */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    /* Arxanı bulandıran effekt */
    transition: opacity 0.3s ease;
}

.modal-box {
    background: #151a25;
    border: 2px solid #6c5cb5;
    /* Turuncu Çərçivə */
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 50px rgba(93, 8, 126, 0.4);
    /* Parıltı */
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    color: #6c5cb5;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}

.modal-text {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 25px;
}

.modal-btn {
    background: #6c5cb5;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
}

.modal-btn:hover {
    background: #6c5cb5;
    transform: scale(1.05);
}

/* Animasiya */
@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


/* ===== SIDE FLOATING BANNERS (Uçan Reklamlar) ===== */
.side-banner {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    /* Tam mərkəzləmək üçün */
    width: 160px;
    /* Reklamın eni */
    height: 600px;
    /* Reklamın hündürlüyü */
    z-index: 90;
    /* Məzmunun altında, fonun üstündə */
    display: block;
}

.side-banner a,
.side-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}

.side-banner:hover {
    transform: translateY(-50%) scale(1.02);
    /* Üzərinə gələndə azca böyüsün */
}

/* Sol tərəf */
.banner-left {
    left: 20px;
}

/* Sağ tərəf */
.banner-right {
    right: 20px;
}

/* --- RESPONSIVE GİZLƏTMƏ --- */
/* Ekran 1550px-dən kiçikdirsə, reklamları gizlət (Saytın üstünə çıxmasın deyə) */
@media (max-width: 1550px) {
    .side-banner {
        display: none !important;
    }
}