/* --- 1. TEMEL AYARLAR --- */
.youtool-light-theme, #youtool-hub-container {
    max-width: 1140px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, sans-serif;
    padding: 0 20px;
    box-sizing: border-box;
}

.youtool-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.05);
    color: #888 !important;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid #333;
    margin-bottom: 20px;
}

.youtool-back-link:hover {
    background: #cc0000;
    color: #fff !important;
    border-color: #ff0000;
    transform: translateX(-5px);
}

.youtool-back-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* --- 2. HUB (ANA SAYFA) TASARIMI --- */
.youtool-hub-header {
    text-align: center;
    margin-bottom: 60px;
}

.youtool-hub-header h1 {
    font-size: 42px !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    margin-bottom: 15px !important;
    letter-spacing: -1px;
}

.youtool-hub-header p {
    font-size: 18px !important;
    color: #666 !important;
    max-width: 600px;
    margin: 0 auto !important;
}

.youtool-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.youtool-tool-card {
    background: #ffffff !important;
    border-radius: 24px !important;
    padding: 40px !important;
    border: 1px solid #f0f0f0 !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03) !important;
    transition: all 0.3s ease-in-out !important;
    display: flex;
    flex-direction: column;
    min-height: 380px;
    box-sizing: border-box;
}

.youtool-tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.08) !important;
    border-color: #6200ee22 !important;
}

.tool-icon {
    font-size: 48px;
    margin-bottom: 25px;
    line-height: 1;
}

.youtool-tool-card h3 {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 15px 0 !important;
}

.youtool-tool-card p {
    font-size: 15px !important;
    color: #555 !important;
    line-height: 1.6 !important;
    margin-bottom: 30px !important;
    flex-grow: 1;
}

.tool-btn {
    background: #6200ee !important;
    color: #ffffff !important;
    padding: 14px 25px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    text-align: center;
    transition: background 0.2s;
    display: block;
}

.tool-btn:hover { background: #3700b3 !important; }

.youtool-tool-card.disabled {
    opacity: 0.75;
    background: #fafafa !important;
}

.status-badge {
    background: #eee !important;
    color: #888 !important;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* --- 3. ARAÇ İÇİ (ANALİZ) TASARIMLARI --- */
.youtool-search-section {
    display: flex;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin-bottom: 40px;
}

#youtool-url-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 20px;
    font-size: 16px;
    outline: none;
}

#youtool-analyze-btn, #youtool-video-analyze-btn {
    background: #ff0000;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

/* Sekmeler */
.youtool-sub-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.sub-tab {
    background: transparent;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
}

.sub-tab.active {
    color: #ff0000;
    border-bottom: 2px solid #ff0000;
}

/* Sonuç Kartları */
.main-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.m-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    text-align: center;
}

/* Puan Kartları (Kanal ve Video Analizi) */
/* Ana grid yapısına ekle */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start; /* CRITICAL: Kutuların birbirini uzatmasını engeller */
}

/* Kartların kendi içindeki yapısı */
.p-card {
    height: fit-content; /* Sadece kendi içeriği kadar uzasın */
    transition: all 0.3s ease;
}

.p-value { font-size: 36px; font-weight: 800; color: #2ecc71; }

.p-badge {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

/* Koyu Mod Kartları (Video Analizi İçin) */
.dark-card { background: #1a1a1a; color: white; border: 1px solid #333; }
.dark-card .p-header { color: #eee; }

#youtool-hub-container { background: #0f0f0f; padding: 60px 20px; border-radius: 30px; }
.youtool-hub-header h1 { color: #ffffff !important; }
.youtool-hub-header p { color: #aaaaaa !important; }

.youtool-tool-card {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #fff !important;
}

.youtool-tool-card h3 { color: #fff !important; }
.youtool-tool-card p { color: #bbb !important; }

.tool-btn {
    background: #cc0000 !important; /* Görseldeki kırmızı tonu */
    transition: 0.3s;
}

.tool-btn:hover { background: #ff0000 !important; transform: scale(1.05); }

.youtool-tool-card.disabled { opacity: 0.5; filter: grayscale(1); }

/* Kart Kapsayıcısı */
.video-analysis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 30px;
}

/* Ana Kart Tasarımı */
.v-perf-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.2s ease;
}

/* Kart Başlığı */
.v-perf-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Büyük Puan Alanı */
.v-perf-score-wrap {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 10px;
}

.v-perf-score {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    color: #2ecc71; /* SEO için yeşil, Etkileşim için farklı olabilir */
}

.v-perf-total {
    color: #444;
    font-size: 18px;
}

/* İlerleme Çubuğu */
.v-progress-bg {
    background: #222;
    height: 6px;
    border-radius: 10px;
    margin-bottom: 25px;
    overflow: hidden;
}

.v-progress-fill {
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

/* Alt Detay Listesi */
.v-details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.v-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #aaa;
}

.v-detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.v-detail-value {
    color: #fff;
    font-weight: 600;
}


#youtool-keyword-input {
    color: #333 !important; /* Koyu gri/siyah yazı rengi */
    background-color: #ffffff !important; /* Beyaz arka plan */
    border: 1px solid #444;
    padding: 10px 15px;
    border-radius: 8px;
}

/* Tıklandığında kenarlık rengini belirginleştirme */
#youtool-keyword-input:focus {
    outline: none;
    border-color: #ff0000;
}

/* Ana Kapsayıcı Düzenlemesi */
.youtool-keyword-results-wrap {
    display: flex; /* Grid yerine Flex bazen daha esnek sonuç verir */
    flex-wrap: wrap; 
    gap: 25px;
    margin-bottom: 40px;
    align-items: stretch;
}

.youtool-main-score-card {
    flex: 2; /* Grafiğe daha fazla alan bırak */
    min-width: 600px; /* Çok küçülmesini engelle */
}

.youtool-side-metrics {
    flex: 1;
    min-width: 300px;
}

/* Optimization Recommendations Sıkışıklığını Gider */
.optimization-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.opt-card {
    padding: 25px !important; /* İç boşluğu artır */
    line-height: 1.5;
}

.opt-card h4 {
    margin-bottom: 10px !important;
    font-size: 16px !important;
}

.opt-card p {
    font-size: 13px !important;
    color: #999 !important;
}

.upload-bar-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: space-between; /* Barları kutuya yay */
    gap: 4px;
    height: 180px; /* Biraz daha yükseklik ferahlık verir */
    padding: 20px 10px;
    background: rgba(255,255,255,0.02); /* Hafif bir zemin grafiği belli eder */
    border-radius: 10px;
}

#youtool-keyword-dynamic-data .tag-pill {
    background: #222;
    border: 1px solid #333;
    padding: 8px 16px;
    margin: 5px;
    border-radius: 8px;
    color: #bbb;
    display: inline-block;
    font-size: 13px;
    transition: 0.2s;
}

#youtool-keyword-dynamic-data .tag-pill:hover {
    border-color: #ff0000;
    color: #fff;
    background: #1a1a1a;
}

/* Ana Metrik Paneli Düzenlemesi */
.keyword-analysis-result .performance-grid:first-of-type {
    display: flex !important;
    flex-wrap: wrap;
    gap: 30px;
    align-items: stretch;
}

/* Sol taraf (Puan ve Grafik) */
.keyword-analysis-result .performance-grid:first-of-type > .p-card:first-child {
    flex: 2;
    min-width: 500px; /* Sıkışmayı engellemek için minimum genişlik */
    padding: 35px !important;
}

/* Sağ taraf (Metrikler) */
.keyword-analysis-result .performance-grid:first-of-type > div:last-child {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Alt Öneriler Grid Düzenlemesi */
.keyword-analysis-result .performance-grid[style*="repeat(3, 1fr)"] {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 25px !important;
    margin-top: 30px !important;
}

.keyword-analysis-result .dark-card {
    padding: 25px !important;
    line-height: 1.6;
}

.keyword-analysis-result .dark-card p {
    font-size: 13px !important;
    margin-top: 15px !important;
    color: #999 !important;
}

.heatmap-container {
    padding: 25px !important;
    margin-top: 20px !important;
}

.heatmap-container > div:first-child {
    gap: 4px !important; /* Barlar arasındaki boşluğu açar */
    justify-content: space-between;
}

.heatmap-container > div:first-child div {
    border-radius: 4px !important; /* Barları biraz daha yumuşak yap */
}

.keyword-analysis-result .main-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 25px !important;
    margin-bottom: 40px !important;
}

.keyword-analysis-result .m-card {
    padding: 25px !important;
    border: 1px solid #222 !important;
}