html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.transition-all {
  transition: all 0.2s ease-in-out;
}

.hover-shadow:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.hover-bg:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.extra-small {
  font-size: 0.75rem;
}

/* ==========================================================================
   Kompakt Satır & Dikey Alan Tasarrufu (Global Space-Saving Utilities)
   Satırlardan ve gereksiz dikey boşluklardan tasarruf sağlar.
   ========================================================================== */
.table-compact th, 
.table-compact td {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    vertical-align: middle;
}

.card-compact .card-body {
    padding: 0.85rem 1rem !important;
}

.card-compact .card-header,
.card-compact .card-footer {
    padding: 0.5rem 1rem !important;
}

/* Satır aralıklarını ve marginleri optimize et */
.section-compact {
    margin-bottom: 1.25rem !important;
}

/* Video kartı dikey alan tasarrufu */
.compact-video-card .card-body {
    padding: 0.65rem 0.75rem !important;
}

.compact-video-card .card-title {
    font-size: 0.88rem !important;
    line-height: 1.25;
}

/* Tablo genel satır yüksekliklerini sıkılaştır */
.table > :not(caption) > * > * {
    padding: 0.5rem 0.65rem;
}

/* Mini Player Responsive Adjustments */
@media (max-width: 767.98px) {
    #mini-player-ui {
        padding: 0.25rem 0 !important;
    }
    #mini-player-thumb-wrap {
        width: 32px !important;
        height: 32px !important;
    }
    #mini-player-title {
        font-size: 0.75rem !important;
    }
    #mini-player-artist {
        font-size: 0.65rem !important;
    }
    /* Hide volume and progress bar on very small screens to save space */
    #mini-seek-bar, #mini-current-time, #mini-duration, #mini-volume-slider, #mini-volume-btn {
        display: none !important;
    }
    #mini-btn-play-pause {
        width: 30px !important;
        height: 30px !important;
    }
    #mini-player-btn-icon {
        font-size: 1.2rem !important;
    }
}

/* Header Search Input Responsive Tuning */
.header-search-wrap {
    transition: all 0.25s ease-in-out;
    width: 220px;
    max-width: 100%;
}

@media (min-width: 1400px) {
    .header-search-wrap {
        width: 280px;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .header-search-wrap {
        width: 200px;
    }
}

@media (max-width: 1199.98px) {
    .header-search-wrap {
        width: 180px;
        margin-right: 0.5rem;
    }
    .header-search-wrap:focus-within {
        width: 230px;
        box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    }
}

@media (max-width: 575.98px) {
    .header-search-wrap {
        width: 140px;
    }
    .header-search-wrap input::placeholder {
        font-size: 0.72rem;
    }
}

/* Category Filter Pills */
.category-pill {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #adb5bd;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-pill:hover {
    background: rgba(37, 140, 251, 0.1);
    border-color: rgba(37, 140, 251, 0.4);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(37, 140, 251, 0.2);
}

.category-pill.active {
    background: linear-gradient(135deg, #258cfb 0%, #1a6ac2 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 15px rgba(37, 140, 251, 0.4);
    transform: translateY(-2px);
}

/* Sarı Arkaplanlı Tüm Öğelerin Yazı Rengini Siyah Yap */
.bg-warning,
.btn-warning:not(:hover):not(:focus),
.badge.bg-warning,
.alert-warning,
[style*="background-color: yellow"],
[style*="background: yellow"],
[style*="background-color: #ffc107"],
[style*="background: #ffc107"] {
    color: #000 !important;
}
.bg-warning *,
.btn-warning:not(:hover):not(:focus) *,
.badge.bg-warning *,
[style*="background-color: yellow"] *,
[style*="background: yellow"] *,
[style*="background-color: #ffc107"] *,
[style*="background: #ffc107"] * {
    color: #000 !important;
}

/* Back to Top Floating Button */
#back-to-top-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37, 140, 251, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(37, 140, 251, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1090;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#back-to-top-btn:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 20px rgba(37, 140, 251, 0.5);
    color: #fff;
    background: linear-gradient(135deg, rgba(37, 140, 251, 1) 0%, rgba(139, 92, 246, 1) 100%);
}

#back-to-top-btn:active {
    transform: translateY(-1px) scale(0.95);
}

/* Persistent player açıkken butonun üstte kalması */
body.has-active-mini-player #back-to-top-btn {
    bottom: 80px;
}

/* ==========================================================================
   Mobil Ekran Optimizasyonu (Mobile Screen Optimization & Space Efficiency)
   Gereksiz boşlukları azaltır, mobil ekranı maksimum verimle kullanır.
   ========================================================================== */
@media (max-width: 767.98px) {
    /* 1. Body & Temel Boşluklar */
    body {
        margin-bottom: 50px;
    }

    /* Container kenar boşluklarını daralt */
    .container, .container-fluid {
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
    }

    .container.mt-4, .container-fluid.mt-4 {
        margin-top: 0.75rem !important;
    }

    /* 2. Kart (Card) İç ve Dış Boşlukları */
    .card {
        border-radius: 12px !important;
    }

    .card-body {
        padding: 0.75rem !important;
    }

    .card-header, .card-footer {
        padding: 0.65rem 0.75rem !important;
    }

    .root-item-card {
        padding: 0.85rem !important;
        margin-bottom: 0.85rem !important;
    }

    /* 3. Hero / Ana Sayfa Banner Alanı */
    .home-hero {
        padding: 2rem 1rem !important;
        margin-bottom: 1.25rem !important;
        border-radius: 12px !important;
    }

    .hero-title {
        font-size: 2.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .hero-tagline {
        font-size: 0.95rem !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.4 !important;
    }

    .cta-pill {
        padding: 0.5rem 1.4rem !important;
        font-size: 0.88rem !important;
    }

    .home-hero img {
        max-height: 48px !important;
        width: auto !important;
    }

    /* 4. Bölüm Aralıkları & Başlıklar */
    .featured-strip,
    .trending-section,
    section.card {
        margin-bottom: 1.5rem !important;
    }

    section.card.p-4, section.card.p-md-5 {
        padding: 1rem !important;
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }

    h1, .h1 {
        font-size: 1.6rem !important;
    }
    h2, .h2 {
        font-size: 1.35rem !important;
    }
    h3, .h3 {
        font-size: 1.2rem !important;
    }
    h4, .h4 {
        font-size: 1.05rem !important;
    }
    h5, .h5 {
        font-size: 0.95rem !important;
    }

    .mb-4, .my-4 {
        margin-bottom: 1rem !important;
    }
    .mb-5, .my-5 {
        margin-bottom: 1.25rem !important;
    }
    .mt-4, .my-4 {
        margin-top: 1rem !important;
    }
    .mt-5, .my-5 {
        margin-top: 1.25rem !important;
    }

    /* 5. Izgara (Grid) Boşlukları (Gap / Gutter) */
    .row.g-4 {
        --bs-gutter-x: 0.65rem !important;
        --bs-gutter-y: 0.65rem !important;
    }
    .row.g-3 {
        --bs-gutter-x: 0.5rem !important;
        --bs-gutter-y: 0.5rem !important;
    }

    /* 6. Sanatçı Şeridi (Featured Strip) */
    .artist-avatar {
        width: 68px !important;
        height: 68px !important;
        margin-bottom: 0.4rem !important;
    }
    .featured-strip .d-flex.gap-4 {
        gap: 0.75rem !important;
    }
    .artist-name {
        font-size: 0.75rem !important;
    }

    /* 7. Trend Parça Kartları */
    .trending-card {
        padding: 0.45rem !important;
        gap: 0.5rem !important;
    }
    .trend-rank {
        width: 24px !important;
        font-size: 0.95rem !important;
    }
    .trending-card .position-relative {
        width: 58px !important;
        height: 40px !important;
    }

    /* 8. Breadcrumb */
    nav[aria-label="breadcrumb"].mb-4,
    nav[aria-label="breadcrumb"].mb-3 {
        margin-bottom: 0.65rem !important;
    }
    .breadcrumb {
        padding: 0.35rem 0.65rem !important;
        font-size: 0.78rem !important;
    }

    /* 9. Video İzleme (Watch) Sayfası */
    .ratio-16x9 {
        border-radius: 10px !important;
        margin-bottom: 0.65rem !important;
    }
    .rating-strip {
        padding: 0.4rem 0.65rem !important;
        margin-bottom: 0.65rem !important;
    }

    /* 10. Tablolar & Admin Paneli */
    .table td, .table th {
        padding: 0.45rem 0.5rem !important;
        font-size: 0.82rem !important;
    }

    .btn-sm {
        padding: 0.25rem 0.65rem !important;
        font-size: 0.78rem !important;
    }

    /* 11. Modal & Alert Bildirimleri */
    .alert {
        padding: 0.55rem 0.85rem !important;
        font-size: 0.85rem !important;
        margin-bottom: 0.75rem !important;
    }
}

/* Global Paylaşım Butonları Stili */
.share-icon-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.share-icon-btn:hover {
    transform: scale(1.15);
}

/* ==========================================================================
   Canlı & Yanar Dönerli (Hareketli Gradient & Neon Glow) Sohbet Menüsü
   ========================================================================== */
.nav-chat-btn {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem !important;
    margin: 0 0.25rem;
    border-radius: 50rem;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    z-index: 1;
    overflow: hidden;
    background: rgba(18, 12, 38, 0.75);
    border: 1px solid transparent;
    box-shadow: 0 0 12px rgba(255, 0, 128, 0.35), 0 0 24px rgba(0, 242, 254, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Yanar dönerli hareketli kenarlık efekti */
.nav-chat-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50rem;
    background: linear-gradient(90deg, #ff007f, #7928ca, #00f2fe, #ff7b00, #ff007f);
    background-size: 300% 300%;
    z-index: -2;
    animation: chatGradientFlow 3s ease infinite;
}

/* İç zemin koyuluğu (kenarlığı belirginleştirmek için) */
.nav-chat-btn::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 50rem;
    background: linear-gradient(135deg, rgba(20, 10, 35, 0.95), rgba(10, 20, 40, 0.95));
    z-index: -1;
    transition: background 0.3s ease;
}

/* Yanar Dönerli Gradient Başlık Metni */
.nav-chat-text {
    background: linear-gradient(90deg, #ff71ce, #01cdfe, #05ffa1, #fffb96, #ff71ce);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: chatGradientFlow 3s linear infinite;
    letter-spacing: 0.3px;
    font-weight: 800;
}

/* Hareketli Chat İkonu */
.nav-chat-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-chat-icon {
    color: #00f2fe;
    font-size: 1.05rem;
    filter: drop-shadow(0 0 6px #00f2fe);
    animation: chatIconWiggle 2.5s ease-in-out infinite;
    display: inline-block;
}

/* Canlı Yeşil/Cyan Nabız Noktası */
.nav-chat-live-dot {
    position: absolute;
    top: -2px;
    right: -3px;
    width: 7px;
    height: 7px;
    background-color: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
}
.nav-chat-live-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid #00ff88;
    animation: livePulseRing 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* CANLI Mikro Rozeti */
.nav-chat-badge {
    font-size: 0.62rem;
    font-weight: 900;
    padding: 0.12rem 0.4rem;
    border-radius: 1rem;
    background: linear-gradient(90deg, #ff007f, #ff5e62);
    color: #ffffff;
    letter-spacing: 0.6px;
    box-shadow: 0 0 8px rgba(255, 0, 128, 0.6);
    animation: chatBadgeGlow 2s ease-in-out infinite alternate;
}

/* Hover Etkisi */
.nav-chat-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.6), 0 0 35px rgba(0, 242, 254, 0.5);
}
.nav-chat-btn:hover::after {
    background: linear-gradient(135deg, rgba(35, 15, 60, 0.85), rgba(15, 35, 70, 0.85));
}
.nav-chat-btn:hover .nav-chat-icon {
    color: #ff71ce;
    filter: drop-shadow(0 0 8px #ff71ce);
}

/* Animasyon Keyframe'leri */
@keyframes chatGradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes chatIconWiggle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    15% { transform: scale(1.18) rotate(-12deg); }
    30% { transform: scale(1.18) rotate(12deg); }
    45% { transform: scale(1.1) rotate(-6deg); }
    60% { transform: scale(1.05) rotate(0deg); }
}

@keyframes livePulseRing {
    0% { transform: scale(0.6); opacity: 1; }
    80%, 100% { transform: scale(2.4); opacity: 0; }
}

@keyframes chatBadgeGlow {
    0% { transform: scale(0.96); filter: brightness(0.95); }
    100% { transform: scale(1.05); filter: brightness(1.25); box-shadow: 0 0 12px rgba(255, 0, 128, 0.9); }
}

@media (max-width: 1199.98px) {
    .nav-chat-btn {
        margin: 0.4rem 0;
        display: inline-flex !important;
        width: fit-content;
    }
}

/* ==========================================================================
   Renkli & Uyumlu Alt Kategori Rozetleri (Harmonic Spectrum Badges)
   ========================================================================== */
.category-subcat-badge {
    font-size: 0.84rem;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.category-subcat-badge:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 18px var(--subcat-glow, rgba(139, 92, 246, 0.4)) !important;
    border-color: var(--subcat-border, #8b5cf6) !important;
    color: #ffffff !important;
}

.category-subcat-badge i {
    transition: transform 0.25s ease;
    font-size: 0.88rem;
}

.category-subcat-badge:hover i {
    transform: scale(1.22) rotate(-6deg);
}