/* =====================================================
   UAT RACING - STANDART HEADER COMPONENT v2.0
   Icons on top, labels below - vertical nav items
   ===================================================== */

/* Top User Bar */
.uat-topbar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    font-size: 13px;
    border-bottom: 1px solid rgba(100, 255, 218, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.uat-topbar-left {
    display: flex;
    align-items: stretch;
    gap: 2px;
    min-width: 0;
    overflow: visible;
    flex: 1;
}

/* Ana Sayfa butonu */
.uat-topbar-left > a {
    color: #64ffda;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(100, 255, 218, 0.1);
    white-space: nowrap;
    font-size: 10px;
    flex-shrink: 0;
}

.uat-topbar-left > a:hover {
    background: rgba(100, 255, 218, 0.2);
    transform: translateY(-1px);
}

.uat-topbar-left > a .nav-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.uat-topbar-nav {
    display: flex;
    gap: 1px;
    overflow: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    align-items: stretch;
}

.uat-topbar-nav::-webkit-scrollbar {
    display: none;
}

.uat-topbar-nav a {
    color: #8892b0;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    min-width: 48px;
    text-align: center;
    line-height: 1.2;
}

.uat-topbar-nav a .nav-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(100, 255, 218, 0.15);
    transition: all 0.2s;
}

.uat-topbar-nav a:hover {
    color: #64ffda;
    background: rgba(255,255,255,0.05);
}

.uat-topbar-nav a:hover .nav-icon {
    box-shadow: 0 0 12px rgba(100, 255, 218, 0.4);
    transform: scale(1.1);
}

.uat-topbar-nav a.active {
    color: #64ffda;
    background: rgba(100, 255, 218, 0.15);
}

.uat-topbar-nav a.active .nav-icon {
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}

.uat-topbar-nav a .nav-label {
    display: block;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right side - User info */
.uat-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-left: 8px;
}

.uat-user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.uat-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 6px 12px;
    border-radius: 20px;
}

.uat-user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #64ffda, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: #1a1a2e;
}

.uat-user-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.uat-user-name {
    font-weight: 600;
    color: #fff;
}

.uat-user-role {
    font-size: 11px;
    color: #64ffda;
    background: rgba(100, 255, 218, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Action buttons (Kuponlarım, Çıkış) */
.uat-logout-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.uat-logout-btn .nav-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

.uat-logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

/* Subscription Badge */
.uat-subscription-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.uat-subscription-badge.premium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.uat-subscription-badge.basic {
    background: rgba(100, 255, 218, 0.2);
    color: #64ffda;
}

.uat-subscription-badge.expired {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.uat-subscription-badge.admin {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
}

.uat-days-remaining {
    font-size: 10px;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 4px;
}

.uat-days-remaining.warning {
    color: #f59e0b;
    animation: blink 1.5s infinite;
}

.uat-days-remaining.critical {
    color: #ef4444;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Guest state */
.uat-guest-actions {
    display: flex;
    gap: 10px;
}

.uat-login-btn {
    background: linear-gradient(135deg, #64ffda, #3b82f6);
    border: none;
    color: #1a1a2e;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
}

.uat-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(100, 255, 218, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .uat-topbar {
        padding: 4px 8px;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .uat-topbar-nav {
        display: none;
    }
    
    .uat-user-details {
        display: none;
    }
    
    .uat-subscription-badge span:not(.badge-icon) {
        display: none;
    }
}

/* ═══ LANGUAGE TOGGLE ═══ */
.lang-toggle-btn {
    display: flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px; padding: 4px 10px; cursor: pointer;
    color: white; font-size: 12px; font-weight: 600;
    transition: all 0.2s; margin-right: 8px;
}
.lang-toggle-btn:hover { background: rgba(255,255,255,0.2); border-color: rgba(100,255,218,0.4); }
.lang-flag { font-size: 16px; line-height: 1; }
.lang-code { letter-spacing: 1px; }


/* ═══════════════════════════════════════════════════════════════
   UAT RACING — MOBİL ALT NAVİGASYON ÇUBUĞU (Bottom Nav Bar)
   Tüm ana sayfalara her ekrandan erişim
   ═══════════════════════════════════════════════════════════════ */

/* Çubuk kendisi */
.uat-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, #16213e 0%, #1a1a2e 100%);
    border-top: 1px solid rgba(100, 255, 218, 0.25);
    z-index: 1100;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}

/* Tek bir nav öğesi */
.uat-bn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #8892b0;
    text-decoration: none;
    flex: 1;
    height: 100%;
    padding: 6px 4px 4px;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.2s;
}

.uat-bn-item .uat-bn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: box-shadow 0.2s, transform 0.2s;
}

.uat-bn-item .uat-bn-label {
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 62px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.uat-bn-item.active {
    color: #64ffda;
}
.uat-bn-item.active .uat-bn-icon {
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.55);
}
.uat-bn-item:active .uat-bn-icon {
    transform: scale(0.92);
}

/* Daha Fazla butonu */
.uat-bn-more-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(100, 255, 218, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s;
}
.uat-bn-item.more-open .uat-bn-more-icon {
    background: rgba(100, 255, 218, 0.25);
}
.uat-bn-item.more-open {
    color: #64ffda;
}

/* Backdrop (drawer arkası) */
.uat-bn-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1150;
    backdrop-filter: blur(2px);
}
.uat-bn-backdrop.open { display: block; }

/* Drawer (yukarı çıkan tüm menü) */
.uat-bn-drawer {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    background: #16213e;
    border-top: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 18px 18px 0 0;
    z-index: 1200;
    padding: 12px 16px 20px;
    max-height: 75vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -8px 30px rgba(0,0,0,0.5);
    visibility: hidden;
}
.uat-bn-drawer.open {
    transform: translateY(0);
    visibility: visible;
}

/* Drawer sürükleme çubuğu */
.uat-bn-drawer-handle {
    width: 36px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 0 auto 16px;
}

/* Drawer ızgara */
.uat-bn-drawer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.uat-bn-drawer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #a0aec0;
    text-decoration: none;
    padding: 12px 6px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    transition: all 0.18s;
    border: 1px solid transparent;
}
.uat-bn-drawer-item:active {
    background: rgba(100, 255, 218, 0.12);
    border-color: rgba(100, 255, 218, 0.2);
}
.uat-bn-drawer-item.active {
    color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
    border-color: rgba(100, 255, 218, 0.25);
}
.uat-bn-drawer-item img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
}
.uat-bn-drawer-item span {
    font-size: 10.5px;
    text-align: center;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


/* ═══ MOBİL KATEGORİ POPUP (alt ikon kategorileri) ═══ */
.uat-cat-popup {
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    background: linear-gradient(160deg, #1a2744 0%, #0f1f3d 100%);
    border-top: 1px solid rgba(100, 255, 218, 0.25);
    border-radius: 18px 18px 0 0;
    z-index: 1200;
    padding: 8px 12px 14px;
    display: none;
    transform: translateY(100%);
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.45);
}
.uat-cat-popup-handle {
    width: 36px; height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 0 auto 10px;
}
.uat-cat-popup-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64ffda;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}
.uat-cat-popup-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 4px;
}
.uat-cat-popup-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #a0aec0;
    text-decoration: none;
    padding: 10px 8px 8px;
    border-radius: 12px;
    min-width: 62px;
    max-width: 72px;
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    transition: all 0.18s;
    flex: 0 0 auto;
}
.uat-cat-popup-item:active {
    background: rgba(100, 255, 218, 0.12);
    border-color: rgba(100, 255, 218, 0.2);
}
.uat-cat-popup-item.active {
    color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
    border-color: rgba(100, 255, 218, 0.25);
}
.uat-cat-popup-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.uat-cat-popup-item span {
    font-size: 9.5px;
    text-align: center;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Aktif kategori buton vurgusu */
.uat-bn-cat-btn.cat-open {
    color: #64ffda;
}
.uat-bn-cat-btn.cat-open .uat-bn-icon {
    box-shadow: 0 0 12px rgba(100, 255, 218, 0.6);
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .uat-cat-popup { display: block; }
    .uat-cat-popup.open {
        transform: translateY(0);
        visibility: visible;
    }
}

/* Drawer bölüm başlığı */
.uat-bn-drawer-section {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4a5568;
    margin: 12px 0 6px;
    font-family: -apple-system, sans-serif;
}

@media (max-width: 768px) {
    /* Bottom nav'ı göster */
    .uat-bottom-nav { display: flex; }
    .uat-bn-drawer { display: block; }
    .uat-bn-backdrop.open { display: block; }

    /* İçerik alanını alta bastırmak için padding */
    body { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }

    /* Paylaş butonu çakışmasın diye yukarı taşı */
    .uat-share-fab { bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }

    /* Versiyon badge yukarı */
    #uat-version-badge { bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important; }
}


/* ═══════════════════════════════════════════════════════════════
   UAT RACING — KATEGORİLİ DROPDOWN NAV (Desktop)
   ═══════════════════════════════════════════════════════════════ */

/* Grup wrapper */
.uat-topbar-group {
    position: relative;
    display: flex;
    align-items: stretch;
    flex-shrink: 1;
    min-width: 0;
}

/* Grup tetikleyici buton */
.uat-topbar-group-btn {
    color: #8892b0;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    min-width: 52px;
    text-align: center;
    line-height: 1.2;
    cursor: pointer;
    border: none;
    background: none;
    position: relative;
}

.uat-topbar-group-btn .nav-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(100, 255, 218, 0.15);
    transition: all 0.2s;
}

.uat-topbar-group-btn:hover,
.uat-topbar-group:hover .uat-topbar-group-btn,
.uat-topbar-group.js-open .uat-topbar-group-btn {
    color: #64ffda;
    background: rgba(255,255,255,0.05);
}

.uat-topbar-group:hover .uat-topbar-group-btn .nav-icon,
.uat-topbar-group.js-open .uat-topbar-group-btn .nav-icon {
    box-shadow: 0 0 14px rgba(100, 255, 218, 0.45);
    transform: scale(1.08);
}

.uat-topbar-group-btn.group-active {
    color: #64ffda;
    background: rgba(100, 255, 218, 0.12);
}
.uat-topbar-group-btn.group-active .nav-icon {
    box-shadow: 0 0 12px rgba(100, 255, 218, 0.5);
}

/* Ok chevron */
.uat-group-chevron {
    font-size: 7px;
    opacity: 0.5;
    transition: transform 0.2s, opacity 0.2s;
    margin-top: -1px;
    display: block;
}
.uat-topbar-group:hover .uat-group-chevron,
.uat-topbar-group.js-open .uat-group-chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: #64ffda;
}

/* Dropdown paneli */
.uat-topbar-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(160deg, #1a2744 0%, #0f1f3d 100%);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 12px;
    padding: 10px;
    min-width: 220px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    z-index: 2000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(100,255,218,0.05);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

/* Dropdown okta bağlayan küçük üçgen */
.uat-topbar-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top: 0;
    border-bottom-color: rgba(100, 255, 218, 0.25);
}

.uat-topbar-group:hover .uat-topbar-dropdown,
.uat-topbar-group.js-open .uat-topbar-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Dropdown içindeki her link */
.uat-dd-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px 6px;
    border-radius: 8px;
    color: #8892b0;
    text-decoration: none;
    text-align: center;
    font-size: 9.5px;
    line-height: 1.3;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.uat-dd-item img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(100,255,218,0.1);
    transition: all 0.15s;
}

.uat-dd-item:hover {
    color: #64ffda;
    background: rgba(100, 255, 218, 0.08);
    border-color: rgba(100, 255, 218, 0.15);
}
.uat-dd-item:hover img {
    box-shadow: 0 0 12px rgba(100,255,218,0.4);
    transform: scale(1.1);
}

.uat-dd-item.active {
    color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
    border-color: rgba(100, 255, 218, 0.2);
}
.uat-dd-item.active img {
    box-shadow: 0 0 10px rgba(100,255,218,0.45);
}

/* Tek sütun — sadece 1 veya 2 öğe olan gruplar için */
.uat-topbar-dropdown.single-col {
    grid-template-columns: 1fr;
    min-width: 130px;
}
.uat-topbar-dropdown.two-items {
    grid-template-columns: 1fr 1fr;
    min-width: 180px;
}

/* Dropdown soldan taşmasın (ilk ve son gruplar) */
.uat-topbar-group:first-child .uat-topbar-dropdown,
.uat-topbar-group:nth-child(2) .uat-topbar-dropdown {
    left: 0;
    transform: translateX(0);
}
.uat-topbar-group:first-child .uat-topbar-dropdown::before,
.uat-topbar-group:nth-child(2) .uat-topbar-dropdown::before {
    left: 40px;
}
.uat-topbar-group:first-child:hover .uat-topbar-dropdown,
.uat-topbar-group:nth-child(2):hover .uat-topbar-dropdown,
.uat-topbar-group:first-child.js-open .uat-topbar-dropdown,
.uat-topbar-group:nth-child(2).js-open .uat-topbar-dropdown {
    transform: translateX(0) translateY(0);
}

/* Son 2 grup: dropdown sağa taşmasın */
.uat-topbar-group:nth-last-child(1) .uat-topbar-dropdown,
.uat-topbar-group:nth-last-child(2) .uat-topbar-dropdown {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(-6px);
}
.uat-topbar-group:nth-last-child(1) .uat-topbar-dropdown::before,
.uat-topbar-group:nth-last-child(2) .uat-topbar-dropdown::before {
    left: auto;
    right: 22px;
}
.uat-topbar-group:nth-last-child(1):hover .uat-topbar-dropdown,
.uat-topbar-group:nth-last-child(2):hover .uat-topbar-dropdown,
.uat-topbar-group:nth-last-child(1).js-open .uat-topbar-dropdown,
.uat-topbar-group:nth-last-child(2).js-open .uat-topbar-dropdown {
    transform: translateX(0) translateY(0);
}

/* Standalone link (Destek gibi bağımsız ikonlar) */
.uat-topbar-standalone-link {
    color: #8892b0;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    min-width: 48px;
    text-align: center;
    line-height: 1.2;
    flex-shrink: 0;
}
.uat-topbar-standalone-link .nav-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(100, 255, 218, 0.15);
    transition: all 0.2s;
}
.uat-topbar-standalone-link:hover {
    color: #64ffda;
    background: rgba(255,255,255,0.05);
}
.uat-topbar-standalone-link:hover .nav-icon {
    box-shadow: 0 0 12px rgba(100, 255, 218, 0.3);
    transform: scale(1.05);
}
