/* =========================================
   1. PROFİL SAYFASI GENEL YAPISI
   ========================================= */

/* --- KAPAK VE ÜST BİLGİ ALANI --- */
.profile-header-wrapper {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0;
}

.profile-cover {
    height: 320px;
    background-color: var(--secondary-color);
    background-size: cover;
    background-position: center;
    position: relative;
}

.cover-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.8));
    z-index: 1;
}

.profile-info-bar {
    display: flex;
    align-items: flex-end;
    gap: 25px;
    margin-top: -80px; /* Avatarın kapak üzerine taşması */
    padding-bottom: 25px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap; 
}

/* --- AVATAR --- */
.profile-avatar {
    width: 160px;
    height: 160px;
    background-color: var(--bg-card);
    padding: 5px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-left: 10px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 1px solid var(--border-color);
}

/* --- KULLANICI DETAYLARI --- */
.profile-text {
    flex: 1;
    padding-bottom: 5px; 
    color: var(--text-main);
    min-width: 250px;
}

.profile-name {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text-main);
    text-shadow: 0 2px 4px rgba(255,255,255,0.8);
    line-height: 1.2;
}

/* Koyu mod desteği için text-shadow ayarı */
@media (prefers-color-scheme: dark) {
    .profile-name { text-shadow: none; }
}

.verified-badge {
    color: #3a86ff;
    font-size: 0.6em;
    vertical-align: middle;
}

.profile-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.username {
    font-weight: 600;
    color: var(--text-main);
}

.dot-separator {
    color: var(--border-color);
}

/* --- PROFİL AKSİYONLARI --- */
.profile-actions-top {
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Genel Buton Stilleri */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-outline-light {
    background-color: var(--bg-body);
    border-color: var(--border-color);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.btn-outline-light:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

.btn-core {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.btn-core:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(var(--primary-rgb), 0.4);
}

.btn-sub-active {
    background-color: var(--bg-body);
    color: var(--text-muted);
    border-color: var(--border-color);
}

.btn-sub-active:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: #dc3545;
}

/* =========================================
   2. SEKMELER (TABS) & MOBİL DROPDOWN
   ========================================= */

.profile-tabs-container {
    margin-top: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-left: 180px; /* Avatar boşluğu */
}

.profile-tabs-nav {
    display: flex;
    gap: 20px;
    position: relative;
    border-bottom: none; 
    margin-top: 0;
    padding-left: 0;
    overflow: visible; /* Dropdown taşması için */
}

.tab-btn {
    padding: 12px 5px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.count-badge {
    background-color: var(--bg-body);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
}

.tab-btn.active .count-badge {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* --- DROPDOWN MENÜ STİLLERİ (EKSİK OLAN KISIM) --- */
.mobile-only { display: none; }
.desktop-only { display: flex; }

.mobile-more-dropdown {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
}

.more-btn {
    width: 40px;
    justify-content: center;
    padding: 10px;
}

/* Dropdown Menü Temel Hali (Gizli) */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 180px;
    z-index: 1000; /* Çok önemli: Diğer öğelerin üstünde kalmalı */
    flex-direction: column;
    padding: 5px;
    margin-top: 5px;
}

/* JS ile 'show' sınıfı eklenince görünür olur */
.dropdown-menu.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.dropdown-item {
    background: none;
    border: none;
    padding: 12px 15px;
    text-align: left;
    color: var(--text-main);
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    width: 100%;
}

.dropdown-item:hover, .dropdown-item.active {
    background: var(--bg-body);
    color: var(--primary-color);
}

.count-badge-small {
    margin-left: auto;
    background: var(--bg-body);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* --- İÇERİK ALANI --- */
.profile-content-area {
    min-height: 400px;
    padding-bottom: 60px;
    margin-top: 30px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   3. KART VE GRID SİSTEMİ
   ========================================= */

.grid-layout {
    display: grid;
    gap: 25px;
}

.video-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.music-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.lyrics-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* --- KART YAPISI --- */
.card-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.card-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.media-card, .lyric-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Thumbnail / Kapak */
.thumbnail-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    overflow: hidden;
}

.cover-wrapper {
    position: relative;
    padding-top: 100%; /* 1:1 */
    background: var(--bg-body);
    overflow: hidden;
}

.thumbnail-img, .cover-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card-wrapper:hover .thumbnail-img,
.card-wrapper:hover .cover-img {
    transform: scale(1.08);
}

/* Rozetler ve İkonlar */
.duration-badge {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(2px);
}

.hover-play-icon, .play-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 2.5rem;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}

.card-wrapper:hover .hover-play-icon,
.card-wrapper:hover .play-overlay {
    opacity: 1;
}

.playlist-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 5px;
    text-align: center;
    backdrop-filter: blur(3px);
}

/* İçerik Bilgileri */
.media-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.media-title {
    font-size: 1rem;
    margin: 0 0 5px;
    color: var(--text-main);
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-meta, .artist-name {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dot { margin: 0 4px; }

/* Şarkı Sözü Kartı */
.lyric-icon-box {
    height: 140px;
    background: linear-gradient(135deg, #fb8500 0%, #ffb703 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 3rem;
}

.lyric-info {
    padding: 20px;
    text-align: center;
}

.lyric-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-main);
}

.lyric-artist {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* SAHİP AKSİYONLARI */
.card-actions {
    display: flex;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-body);
}

.btn-icon {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: none;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
}

.btn-icon.edit { border-right: 1px solid var(--border-color); }
.btn-icon.edit:hover { color: var(--primary-color); background-color: var(--bg-card); }
.btn-icon.delete:hover { color: #dc3545; background-color: rgba(220, 53, 69, 0.1); }

.card-actions form { flex: 1; display: flex; }
.card-actions form button { width: 100%; }

/* BOŞ DURUMLAR */
.empty-state, .empty-state-profile {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-icon, .empty-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: var(--bg-body);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.empty-state p, .empty-state-profile p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* HAKKINDA */
.about-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.about-card h3 { margin-bottom: 20px; font-size: 1.4rem; color: var(--text-main); }
.about-text { line-height: 1.8; color: var(--text-main); }
.text-subtle { color: var(--text-muted); }

/* =========================================
   4. KANALLAR SAYFASI (CHANNELS) STİLLERİ
   ========================================= */

/* channels/index.php için gerekli stiller */
.settings-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.channels-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.settings-title {
    font-size: 1.8rem;
    color: var(--text-main);
    font-weight: 700;
}

.settings-divider {
    margin: 20px 0 40px 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.channel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.channel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.channel-header-bg {
    height: 100px;
    background-size: cover;
    background-position: center;
    background-color: var(--border-color);
    position: relative;
    margin-bottom: 40px; /* Avatar için boşluk */
}

.channel-avatar-container {
    position: absolute;
    bottom: -35px;
    left: 20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 3px;
    background: var(--bg-card);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.channel-avatar-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.channel-body {
    padding: 0 20px 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.channel-name-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-slug {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: block;
}

/* Ana Hesap Rozeti */
.main-badge {
    background-color: #28a745; /* Yeşil */
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.channel-stats-row {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.channel-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-action-outline, .btn-action-primary {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.btn-action-outline {
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-action-outline:hover { background-color: var(--bg-body); }

.btn-action-primary {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #fff;
}
.btn-action-primary:hover { background-color: var(--primary-hover); }

/* btn-primary (Genel) */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    border: none;
    transition: var(--transition);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* =========================================
   5. RESPONSIVE AYARLAR (MOBILE FIRST)
   ========================================= */

@media (max-width: 768px) {
    /* PROFİL HEADER */
    .profile-info-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -65px;
        gap: 15px;
    }
    
    .profile-avatar { width: 120px; height: 120px; margin-left: 0; }
    .profile-text { min-width: 100%; padding-bottom: 0; }
    .profile-name { justify-content: center; }
    .profile-meta { justify-content: center; }
    .profile-actions-top { width: 100%; justify-content: center; }

    /* TABLAR */
    .profile-tabs-container { padding-left: 0; margin-top: 20px; }
    
    .profile-tabs-nav {
        width: 100%;
        justify-content: space-between;
        align-items: stretch;
        gap: 0;
        overflow: visible; /* Dropdown taşması için şart */
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
        padding: 12px 5px;
        font-size: 0.95rem;
    }
    
    /* GÖRÜNÜRLÜK AYARLARI */
    .desktop-only { display: none; }
    .mobile-only { display: block; }
    
    .mobile-more-dropdown { 
        margin-left: 0;
        display: flex; 
    }
    
    .more-btn { 
        width: 50px; 
        flex: none; 
    }

    /* İÇERİK */
    .profile-content-area {
        margin-top: 15px;
        padding: 0 10px 60px 10px;
    }

    .grid-layout, .video-grid, .channel-grid {
        gap: 12px;
    }

    /* MOBİL KOLONLAR */
    .video-grid { grid-template-columns: 1fr; }
    .music-grid { grid-template-columns: repeat(2, 1fr); }
    .lyrics-grid { grid-template-columns: 1fr; }
    
    /* Kanallar Sayfası Mobilde Tek Sütun */
    .channel-grid { grid-template-columns: 1fr; }

    .media-info { padding: 10px; }
    .media-title { font-size: 0.95rem; }
}