/* Bordo - Mavi Özel Renk Geçişi (Gradient Text) */
.ts-gradient-text {
    background: linear-gradient(135deg, #a31236 0%, #00a8e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Cam Efekti */
.glass-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Küresel Tema Arka Plan ve Tipografi Standartları */
:root {
    --bg-light: #f8fafc;
    --bg-dark: #090d16;
    --text-light: #0f172a;
    --text-dark: #f8fafc;
}

body {
    background-color: var(--bg-light);
    color: var(--text-light);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

html.dark body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

/* Koyu Tema Kart ve Panel Renk Uyum Kuralları */
html.dark .dark\:bg-slate-900 {
    background-color: #0d121f !important;
}

html.dark .dark\:bg-slate-900\/60 {
    background-color: rgba(13, 18, 31, 0.75) !important;
}

html.dark .dark\:bg-slate-950 {
    background-color: #060911 !important;
}

html.dark .dark\:border-slate-800 {
    border-color: rgba(30, 41, 59, 0.7) !important;
}

/* Üst Bar (Header / Navbar) Dikey Ortalama ve Boşluk Kuralları */
header,
.app-header-navbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 24px !important;
    margin-bottom: 24px !important;
    box-sizing: border-box;
}

header > div,
header button,
header a {
    display: flex;
    align-items: center;
}

/* Sayfa İçerik Alanı Üst Boşluğu (Header + 24px Margin-Bottom Uyumlu) */
main {
    padding-top: 100px !important;
}

/* ==========================================
   MODERN KART & MODÜL KUTUSU TASARIM SİSTEMİ (UI/UX)
   ========================================== */

/* 1. KUTU (CARD) YAPISI VE İÇ BOŞLUKLAR (PADDING, GLASSMORPHISM & BORDER) */
/* 1. KUTU (CARD) YAPISI VE İÇ BOŞLUKLAR (PADDING, GLASSMORPHISM & BORDER) */
.academy-card,
.module-card,
.content-card,
.card-modern,
.announcement-card,
.course-card,
.doc-card,
.repo-card,
.group-card,
.ad-card,
.tool-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 20px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Sol Kenar Bordo-Mavi Dikey Geçiş Çizgisi (Gradient Strip) */
.academy-card::before,
.module-card::before,
.content-card::before,
.card-modern::before,
.announcement-card::before,
.course-card::before,
.doc-card::before,
.repo-card::before,
.group-card::before,
.ad-card::before,
.tool-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 6px !important;
    height: 100% !important;
    background: linear-gradient(180deg, #800020 0%, #00a8e8 100%) !important;
    border-top-left-radius: 16px !important;
    border-bottom-left-radius: 16px !important;
    opacity: 0.85 !important;
    transition: opacity 0.3s ease !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

.academy-card:hover::before,
.module-card:hover::before,
.content-card:hover::before,
.card-modern:hover::before,
.announcement-card:hover::before,
.course-card:hover::before,
.doc-card:hover::before,
.repo-card:hover::before,
.group-card:hover::before,
.ad-card:hover::before,
.tool-card:hover::before {
    opacity: 1 !important;
}

@media (min-width: 640px) {
    .academy-card,
    .module-card,
    .content-card,
    .card-modern,
    .announcement-card,
    .course-card,
    .doc-card,
    .repo-card,
    .group-card,
    .ad-card,
    .tool-card {
        padding: 24px !important;
    }
}

html.dark .academy-card,
html.dark .module-card,
html.dark .content-card,
html.dark .card-modern,
html.dark .stats-card,
html.dark .announcement-card,
html.dark .course-card,
html.dark .doc-card,
html.dark .repo-card,
html.dark .group-card,
html.dark .ad-card,
html.dark .tool-card {
    background: #111b21 !important;
    background-color: #111b21 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.3) !important;
}

/* İSTATİSTİK KARTLARI ÖZEL RESPONSIVE & TAŞMA ENGELLEME KURALLARI */
.stats-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 18px !important;
    min-height: 88px !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

@media (min-width: 640px) {
    .stats-card {
        gap: 16px !important;
        padding: 20px 24px !important;
        min-height: 96px !important;
    }
}

.stats-card > div:first-child {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    flex-shrink: 0 !important;
}

.stats-card h4,
.stats-card p {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    margin: 0 !important;
}

/* 2. ETKİLEŞİM VE HOVER (FARETLE ÜZERİNE GELME) EFEKTLERİ */
.academy-card:hover,
.module-card:hover,
.content-card:hover,
.card-modern:hover,
.stats-card:hover,
.announcement-card:hover,
.course-card:hover,
.doc-card:hover,
.repo-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 24px -10px rgba(37, 99, 235, 0.25) !important;
    border-color: rgba(37, 99, 235, 0.4) !important;
}

/* 3. İÇERİK DÜZENİ VE İKON KUTULARI (GRADIENT & VİBRANT BLUE/CYAN) */
.card-icon-box {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(14, 165, 233, 0.15) 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    color: #0284c7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    margin-bottom: 16px !important;
    flex-shrink: 0 !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* SADE VE ORANTILI BAŞLIK İKONU KURALLARI */
h1 svg, h2 svg, h3 svg, .header-icon {
    width: 22px !important;
    height: 22px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

.card-icon-box svg {
    width: 24px !important;
    height: 24px !important;
}

html.dark .card-icon-box {
    color: #38bdf8 !important;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(14, 165, 233, 0.25) 100%) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
}

.academy-card:hover .card-icon-box,
.module-card:hover .card-icon-box,
.card-modern:hover .card-icon-box,
.course-card:hover .card-icon-box {
    transform: scale(1.08) rotate(3deg) !important;
}

/* 4. EN ALT LİNK / AKSİYON SABİTLEME (MARGIN-TOP: AUTO) */
.card-action-footer,
.academy-card > div:last-child,
.module-card > div:last-child,
.course-card > div:last-child {
    margin-top: auto !important;
}

/* ==========================================
   CANLI KÜRESEL ARAMA HEDEF KART VURGU (HIGHLIGHT) EFEKTLERİ
   ========================================== */
@keyframes globalSearchHighlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 168, 232, 0.8);
        border-color: #00a8e8 !important;
    }
    30% {
        transform: scale(1.02);
        box-shadow: 0 0 30px 8px rgba(0, 168, 232, 0.6);
        border-color: #800020 !important;
    }
    70% {
        transform: scale(1.01);
        box-shadow: 0 0 20px 4px rgba(0, 168, 232, 0.4);
        border-color: #00a8e8 !important;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 168, 232, 0);
    }
}

.global-search-highlight {
    animation: globalSearchHighlightPulse 2.8s ease-in-out forwards !important;
    z-index: 30 !important;
}

/* ==========================================
   KAPALI SİDEBAR (COLLAPSED STATE) ALT MENÜ GİZLEME
   ========================================== */
#app-sidebar.lg\:w-20 #tools-submenu,
#app-sidebar.lg\:w-20 .sidebar-text {
    display: none !important;
}

/* ==========================================
   ÖZEL İNCE & ŞEFFAF OVAL KAYDIRMA ÇUBUKLARI (CUSTOM SCROLLBARS)
   ========================================== */

/* Firefox Uyumlu İnce Kaydırma Çubuğu */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

/* WebKit (Chrome, Safari, Edge) Kaydırma Çubuğu Standartları */
::-webkit-scrollbar {
    width: 6px !important;
    height: 5px !important;
}

::-webkit-scrollbar-track {
    background: transparent !important;
    border-radius: 9999px !important;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25) !important;
    border-radius: 9999px !important;
    transition: background 0.3s ease !important;
}

html.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 9999px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 168, 232, 0.6) !important;
}

html.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 168, 232, 0.7) !important;
}

::-webkit-scrollbar-corner {
    background: transparent !important;
}
