/* ============================================
   VideoShare - Main Stylesheet
   Minimalist Black & White Design
   ============================================ */

:root {
    --bg: #ffffff;
    --bg-alt: #f8f8f8;
    --bg-card: #ffffff;
    --text: #000000;
    --text-muted: #666666;
    --border: #e5e5e5;
    --hover: #f0f0f0;
    --accent: #000000;
    --accent-text: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

[data-theme="dark"] {
    --bg: #000000;
    --bg-alt: #0a0a0a;
    --bg-card: #111111;
    --text: #ffffff;
    --text-muted: #999999;
    --border: #222222;
    --hover: #1a1a1a;
    --accent: #ffffff;
    --accent-text: #000000;
    --shadow: 0 2px 8px rgba(0,0,0,0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
}

a { color: var(--text); text-decoration: none; transition: color var(--transition); }
a:hover { opacity: 0.7; }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* ====== HEADER ====== */
.header {
    position: sticky; top: 0; z-index: 100;
    background: var(--bg); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 0; gap: 20px;
}
.logo {
    font-size: 20px; 
    font-weight: 800; 
    letter-spacing: -0.4px;
    display: inline-flex; 
    align-items: center; 
    gap: 8px;
    color: var(--text);
    line-height: 1;
    height: 36px; /* header-ə uyğun sabit hündürlük */
    flex-shrink: 0;
}
/* İSTƏNİLƏN ÖLÇÜDƏ ATILAN LOGO AVTOMATİK UYĞUNLAŞDIRILIR */
.logo-img {
    /* Hündürlük sabit, genişlik avtomatik (aspect ratio qorunur) */
    height: 28px;
    width: auto;
    max-width: 140px; /* həddən artıq uzun logo-lar üçün */
    max-height: 28px;
    object-fit: contain;
    object-position: left center;
    display: block;
    /* Təsəvvür: nə qədər böyük yükləsəniz, avtomatik 28px hündürlükdə görünür */
}
.logo-text {
    display: inline-block;
    font-size: 18px;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .logo { font-size: 17px; gap: 6px; height: 32px; }
    .logo-img { height: 24px; max-height: 24px; max-width: 100px; }
    .logo-text { font-size: 16px; }
}
@media (max-width: 480px) {
    .logo { gap: 5px; }
    .logo-img { height: 22px; max-height: 22px; max-width: 80px; }
    .logo-text { font-size: 15px; }
}

.search-form {
    flex: 1; max-width: 500px; display: flex; gap: 8px;
}
.search-input {
    flex: 1; padding: 10px 16px; border: 1px solid var(--border);
    border-radius: 24px; background: var(--bg-alt); color: var(--text);
    font-size: 15px; transition: var(--transition);
}
.search-input:focus { outline: none; border-color: var(--text); }
.search-btn {
    padding: 10px 20px; background: var(--accent); color: var(--accent-text);
    border: none; border-radius: 24px; cursor: pointer; font-weight: 600;
}

/* Mobil axtarış düyməsi (lupa) - desktop-da gizli */
.search-mobile-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.search-mobile-btn:hover { background: var(--hover); }

/* Mobildə axtarış formunu gizlət, lupa düyməsini göstər */
@media (max-width: 768px) {
    .search-form {
        display: none !important;
    }
    .search-mobile-btn {
        display: flex;
    }
}

/* Mobil axtarış modal */
.search-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.search-modal.active {
    display: flex;
    opacity: 1;
}
.search-modal-inner {
    width: 100%;
    max-width: 600px;
    padding: 0 16px;
    animation: searchModalSlide 0.25s ease-out;
}
@keyframes searchModalSlide {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.search-modal-form {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.search-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}
.search-modal-close:hover { background: var(--hover); }
.search-modal-input {
    flex: 1;
    padding: 14px 8px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 17px;
    outline: none;
    min-width: 0;
}
.search-modal-input::placeholder {
    color: var(--text-muted);
}
.search-modal-submit {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: var(--accent-text);
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}
.search-modal-submit:hover { opacity: 0.85; }

.header-nav { display: flex; align-items: center; gap: 15px; }
.nav-btn {
    padding: 8px 16px; 
    border-radius: 20px; 
    font-size: 14px;
    font-weight: 500; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px;
    transition: var(--transition);
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}
.nav-btn:hover { background: var(--hover); opacity: 1; }
.nav-btn.primary { 
    background: var(--accent); 
    color: var(--accent-text); 
}
.nav-btn.primary:hover { opacity: 0.85; }
.nav-btn.icon { padding: 8px; }

.nav-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
}
.nav-btn-text {
    display: inline-block;
}

.theme-toggle {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
    background: transparent; cursor: pointer; color: var(--text);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.theme-toggle:hover { background: var(--hover); }

/* ====== LANGUAGE SELECTOR ====== */
.lang-selector { position: relative; }
.lang-btn {
    width: auto !important;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.lang-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 6px;
    display: none;
    z-index: 200;
}
.lang-dropdown.active { display: block; }
.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
}
.lang-option:hover { background: var(--hover); opacity: 1; }
.lang-option.active {
    background: var(--hover);
    font-weight: 600;
}
.lang-option.active::after {
    content: '✓';
    margin-left: auto;
    color: var(--text);
    font-weight: 700;
}
.lang-flag { font-size: 18px; flex-shrink: 0; }
.lang-name { flex: 1; }
.lang-code {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.lang-option.active .lang-code { display: none; }

/* ====== USER MENU ====== */
.user-menu { position: relative; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    border: 2px solid var(--border); overflow: hidden; background: var(--bg-alt);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 14px;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-dropdown {
    position: absolute; top: 45px; right: 0; width: 220px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow); padding: 8px; display: none; z-index: 150;
}
.user-dropdown.active { display: block; }
.user-dropdown a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 6px; font-size: 14px;
}
.user-dropdown a:hover { background: var(--hover); }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* ====== HERO / BANNER ====== */
.hero {
    padding: 40px 0 30px; text-align: center;
}
.hero h1 {
    font-size: clamp(28px, 5vw, 42px); font-weight: 800;
    letter-spacing: -1px; margin-bottom: 12px;
}
.hero p { color: var(--text-muted); font-size: 17px; }

/* ====== CATEGORIES BAR ====== */
.categories-bar {
    display: flex; gap: 10px; overflow-x: auto; padding: 15px 0;
    border-bottom: 1px solid var(--border); margin-bottom: 25px;
    scrollbar-width: none;
}
.categories-bar::-webkit-scrollbar { display: none; }
.category-chip {
    padding: 8px 18px; background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 20px; font-size: 14px; white-space: nowrap;
    transition: var(--transition); display: inline-flex; align-items: center; gap: 6px;
}
.category-chip:hover, .category-chip.active {
    background: var(--accent); color: var(--accent-text); border-color: var(--accent);
}

/* ====== SECTION ====== */
.section { margin-bottom: 40px; }
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.section-title { font-size: 22px; font-weight: 700; }

/* ====== VIDEO GRID ====== */
.videos-grid {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.video-card {
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; transition: var(--transition);
    border: 1px solid var(--border);
}
.video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.video-thumb {
    position: relative; aspect-ratio: 16/9;
    background: var(--bg-alt); overflow: hidden;
}
.video-thumb img { 
    width: 100%; height: 100%; object-fit: cover; 
    transition: opacity 0.25s ease, transform var(--transition); 
}
.video-card:hover .video-thumb img { transform: scale(1.05); }
.video-card.previewing .video-thumb img { 
    transform: none;
    /* Cross-fade görünüş üçün */
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Preview indikatorları (xətlər) */
.preview-dots {
    position: absolute;
    bottom: 6px;
    left: 6px;
    right: 6px;
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 2;
}
.video-card.previewing .preview-dots {
    opacity: 1;
}
.preview-dot {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    transition: background 0.3s;
}
.preview-dot.active {
    background: #ffffff;
}

.video-thumb .duration {
    position: absolute; top: 4px; right: 4px;
    background: rgba(0,0,0,0.75); color: #fff; padding: 2px 6px;
    border-radius: 4px; font-size: 10px; font-weight: 800;
    z-index: 3; letter-spacing: 0.5px;
}
.video-card.previewing .duration { opacity: 0.6; }
.video-thumb .play-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 54px; height: 54px; background: rgba(255,255,255,0.9);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition);
    z-index: 3;
}
.video-card:hover .play-icon { opacity: 1; }
.video-card.previewing .play-icon { opacity: 0; }

.video-info { padding: 14px; }
.video-title {
    font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-meta { display: flex; gap: 10px; font-size: 13px; color: var(--text-muted); align-items: center; flex-wrap: wrap; }

/* Video kartında 4 göstərici sırası */
.video-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    margin: 6px 0;
    line-height: 1.4;
}
.video-stats-row .vs-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    font-weight: 500;
}
.video-stats-row .vs-item:not(:first-child)::before {
    content: '·';
    margin-right: 6px;
    opacity: 0.5;
    font-weight: 400;
}
@media (max-width: 600px) {
    .video-stats-row { font-size: 11px; gap: 8px; }
    .video-stats-row .vs-item:not(:first-child)::before { margin-right: 4px; }
}

/* ====== VIDEO DETAIL PAGE ====== */
.video-detail { display: grid; grid-template-columns: 1fr 360px; gap: 30px; }
@media (max-width: 992px) { .video-detail { grid-template-columns: 1fr; } }

/* Video başlığı üstdə (pleyerdən əvvəl) */
.video-top-info {
    margin-bottom: 16px;
}
.video-category-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-text);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    transition: opacity 0.2s;
}
.video-category-badge:hover { opacity: 0.8; }
.video-top-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.3px;
    color: var(--text);
}
@media (max-width: 768px) {
    .video-top-title { font-size: 20px; }
    .video-category-badge { font-size: 11px; padding: 4px 10px; }
}

.video-player-box {
    aspect-ratio: 16/9; background: #000; border-radius: var(--radius);
    overflow: hidden; margin-bottom: 20px;
    position: relative; /* overlay üçün */
    width: 100%;
    max-width: 100%;
}
.video-player-box video, .video-player-box iframe {
    width: 100%; height: 100%; border: none;
}

/* Plyr customizations */
.plyr {
    border-radius: var(--radius);
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
.video-player-box .plyr--video {
    height: 100%;
    width: 100%;
}
.plyr--video {
    background: #000;
}
/* Brand color - Plyr düymələrinin rəngi */
.plyr--full-ui input[type=range] {
    color: var(--accent);
}
.plyr__control--overlaid {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
}
.plyr__control--overlaid:hover {
    background: #fff !important;
}
.plyr--video .plyr__control:hover {
    background: var(--accent);
    color: var(--accent-text);
}
/* Plyr-in öz download düyməsini və ehtiyat yaradılan menyu elementlərini gizlət */
.plyr__menu__container button[data-plyr="download"] { display: none !important; }

/* ============================================
   VIDEO WATERMARK (Logo / Mətn player üzərində)
   ============================================ */
.video-watermark {
    position: absolute;
    z-index: 25; /* Plyr UI altında, lakin görünür */
    pointer-events: none; /* Klikləmə video-ya keçsin */
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.3s;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Mövqelər */
.video-watermark-top-left { top: 12px; left: 12px; }
.video-watermark-top-right { top: 12px; right: 12px; }
.video-watermark-bottom-left { bottom: 70px; left: 12px; } /* player kontroller üstündə */
.video-watermark-bottom-right { bottom: 70px; right: 12px; }
.video-watermark-center { 
    top: 50%; left: 50%; 
    transform: translate(-50%, -50%); 
}

/* Ölçülər - mətn üçün */
.video-watermark-size-small .video-watermark-text {
    font-size: 11px;
}
.video-watermark-size-medium .video-watermark-text {
    font-size: 14px;
}
.video-watermark-size-large .video-watermark-text {
    font-size: 18px;
}

.video-watermark-text {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Ölçülər - logo üçün */
.video-watermark-size-small .video-watermark-img { 
    height: 24px; 
    max-width: 80px; 
}
.video-watermark-size-medium .video-watermark-img { 
    height: 36px; 
    max-width: 120px; 
}
.video-watermark-size-large .video-watermark-img { 
    height: 50px; 
    max-width: 160px; 
}
.video-watermark-img {
    width: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}

/* Mobildə daha kiçik */
@media (max-width: 600px) {
    .video-watermark-size-small .video-watermark-text { font-size: 9px; }
    .video-watermark-size-medium .video-watermark-text { font-size: 12px; }
    .video-watermark-size-large .video-watermark-text { font-size: 14px; }
    
    .video-watermark-size-small .video-watermark-img { height: 18px; }
    .video-watermark-size-medium .video-watermark-img { height: 26px; }
    .video-watermark-size-large .video-watermark-img { height: 36px; }
    
    .video-watermark-top-left, .video-watermark-top-right { top: 8px; }
    .video-watermark-top-left, .video-watermark-bottom-left { left: 8px; }
    .video-watermark-top-right, .video-watermark-bottom-right { right: 8px; }
    .video-watermark-bottom-left, .video-watermark-bottom-right { bottom: 50px; }
}

/* Fullscreen rejimdə də işləsin */
.plyr--fullscreen-active .video-watermark {
    z-index: 999999;
}
.video-ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999; /* Plyr-in bütün UI elementlərindən yuxarı */
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    overflow: hidden;
    box-sizing: border-box;
}
.video-ad-overlay.active {
    display: flex;
}
.video-ad-overlay.finished {
    display: none;
}

/* Reklam yerləşdiyi "pəncərə" - player daxilində məhdud ölçü */
.video-ad-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 40px 16px 60px; /* üst: label, alt: skip düyməsi */
    box-sizing: border-box;
}

/* Reklam kontenti ciddi məhdudlaşdırılır */
.video-ad-inner {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
/* Bütün reklam elementləri cöngə salınır */
.video-ad-inner * {
    max-width: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box;
}
.video-ad-inner img,
.video-ad-inner video {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
    display: block;
}
.video-ad-inner iframe {
    width: 100% !important;
    max-width: 100% !important;
    border: 0;
}
.video-ad-inner ins.adsbygoogle,
.video-ad-inner ins {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
}

/* Reklam etiketi (yuxarı sol) */
.video-ad-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    z-index: 10;
    pointer-events: none;
}

/* Skip düyməsi (alt sağ) */
.video-ad-skip {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 14px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.7;
    transition: all 0.2s;
    z-index: 10;
    white-space: nowrap;
}
.video-ad-skip.enabled {
    cursor: pointer;
    opacity: 1;
    border-color: #fff;
}
.video-ad-skip.enabled:hover {
    background: #fff;
    color: #000;
}
.video-ad-skip:not(.enabled) {
    pointer-events: none;
}

/* Mobil adaptasiya */
@media (max-width: 768px) {
    .video-ad-content {
        padding: 34px 10px 50px;
    }
    .video-ad-label {
        font-size: 9px;
        padding: 2px 7px;
    }
    .video-ad-skip {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* Post-roll banner (player altında) */
.video-ad-banner {
    margin: 0 0 20px 0;
    padding: 15px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--border);
    overflow: hidden;
    max-width: 100%;
}
.video-ad-banner * {
    max-width: 100% !important;
    box-sizing: border-box;
}
.video-ad-banner img,
.video-ad-banner iframe {
    max-width: 100% !important;
    height: auto !important;
}

.video-header h1 {
    font-size: 24px; font-weight: 700; margin-bottom: 10px; line-height: 1.3;
}
.video-stats {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 15px; padding: 15px 0;
    border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.stats-left { 
    display: flex; align-items: center; gap: 12px; 
    color: var(--text-muted); font-size: 14px; 
    flex-wrap: wrap;
}
.stats-left strong {
    color: var(--text);
    font-weight: 700;
    font-size: 15px;
}
@media (max-width: 600px) {
    .stats-left { font-size: 13px; gap: 8px; }
    .stats-left strong { font-size: 14px; }
}
.stats-actions { display: flex; gap: 8px; }
.action-btn {
    padding: 8px 16px; background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 20px; cursor: pointer; font-size: 14px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px; color: var(--text);
    transition: var(--transition);
    text-decoration: none;
}
.action-btn-warning {
    background: #fff7ed !important;
    color: #c2410c !important;
    border-color: #fed7aa !important;
}
.action-btn-warning:hover {
    background: #fed7aa !important;
    color: #9a3412 !important;
}
[data-theme="dark"] .action-btn-warning {
    background: #431407 !important;
    color: #fdba74 !important;
    border-color: #7c2d12 !important;
}
[data-theme="dark"] .action-btn-warning:hover {
    background: #7c2d12 !important;
    color: #fed7aa !important;
}
.download-size {
    font-size: 11px;
    opacity: 0.75;
    font-weight: 600;
    margin-left: 2px;
}
.action-btn:hover { background: var(--hover); }
.action-btn.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.action-btn.favorite-active {
    background: #fce7f3 !important;
    color: #be123c !important;
    border-color: #fda4af !important;
    animation: heart-pop 0.4s ease;
}
[data-theme="dark"] .action-btn.favorite-active {
    background: #4c0519 !important;
    color: #fda4af !important;
    border-color: #881337 !important;
}
@keyframes heart-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.video-author {
    display: flex; gap: 12px; padding: 15px; background: var(--bg-alt);
    border-radius: var(--radius-sm); margin-bottom: 20px;
}
.video-author img {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
}
.author-name { font-weight: 600; font-size: 15px; }
.author-meta { color: var(--text-muted); font-size: 13px; }

.video-description {
    padding: 15px; background: var(--bg-alt); border-radius: var(--radius-sm);
    white-space: pre-wrap; line-height: 1.6; margin-bottom: 20px;
}

/* ====== COMMENTS ====== */
.comments-section { margin-top: 30px; }
.comments-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.comment-form { margin-bottom: 25px; }
.comment-form textarea {
    width: 100%; min-height: 80px; padding: 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg-alt); color: var(--text);
    font-family: inherit; font-size: 15px; resize: vertical;
}
.comment-form textarea:focus { outline: none; border-color: var(--text); }
.comment {
    display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--border);
}
.comment-avatar {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    background: var(--bg-alt);
}
.comment-content { flex: 1; }
.comment-header { display: flex; gap: 10px; margin-bottom: 5px; font-size: 14px; }
.comment-author { font-weight: 600; }
.comment-time { color: var(--text-muted); }
.comment-text { line-height: 1.5; word-wrap: break-word; }
.comment-reply-btn {
    margin-top: 8px; font-size: 13px; color: var(--text-muted);
    background: none; border: none; cursor: pointer;
}
.replies { margin-left: 52px; margin-top: 10px; }

/* ====== FORMS ====== */
.form-container {
    max-width: 500px; margin: 50px auto; padding: 35px;
    background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border);
}
.form-container h1 { font-size: 26px; margin-bottom: 8px; }
.form-container .subtitle { color: var(--text-muted); margin-bottom: 25px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg); color: var(--text);
    font-size: 15px; font-family: inherit; transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--text);
}
.form-textarea { resize: vertical; min-height: 100px; }
.btn {
    display: inline-block; padding: 12px 24px; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600; cursor: pointer; border: none;
    transition: var(--transition); text-align: center;
}
.btn-primary { background: var(--accent); color: var(--accent-text); width: 100%; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }

/* ====== ALERTS ====== */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 15px; font-size: 14px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
[data-theme="dark"] .alert-success { background: #064e3b; color: #d1fae5; }
[data-theme="dark"] .alert-error { background: #7f1d1d; color: #fee2e2; }

/* ====== PAGINATION ====== */
.pagination {
    display: flex; justify-content: center; gap: 6px; margin: 30px 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; min-width: 36px; text-align: center;
}
.pagination .active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pagination a:hover { background: var(--hover); }

/* ====== FOOTER ====== */
.footer {
    margin-top: 60px; 
    padding: 30px 20px; 
    border-top: 1px solid var(--border);
    text-align: center; 
    color: var(--text-muted); 
    font-size: 14px;
}
.footer-hashtags {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.footer-hashtag {
    display: inline-block;
    background: var(--bg-alt);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.footer-hashtag:hover {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}
.footer-brand {
    margin-bottom: 16px;
}
.footer-site-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}
.footer-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--text);
    text-decoration: underline;
}
@media (max-width: 600px) {
    .footer { padding: 24px 16px; margin-top: 40px; }
    .footer-site-name { font-size: 15px; }
    .footer-text { font-size: 12px; }
}

/* ====== AD ZONES ====== */
.ad-zone { margin: 20px 0; text-align: center; }
.ad-zone-sidebar { margin-bottom: 20px; }

/* ============================================
   KATEQORİYA SƏHİFƏSİ - AYRI XANALAR
   ============================================ */
.category-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

/* ============================================
   ANA SƏHİFƏ BÖLMƏLƏRİ (home cards)
   ============================================ */
.home-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.home-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.home-card-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
    margin: 0;
}

@media (max-width: 768px) {
    .home-card { padding: 16px; margin-bottom: 16px; }
    .home-card-title { font-size: 17px; }
    .home-card-header { margin-bottom: 14px; padding-bottom: 12px; }
}

/* ============================================
   OXŞAR VİDEOLAR SIDEBAR (related card)
   ============================================ */
.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 80px;
}
.related-card-header {
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.related-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.2px;
}
.related-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.related-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s;
}
.related-item:hover {
    background: var(--hover);
    opacity: 1;
}
.related-thumb {
    width: 120px;
    height: 70px;
    background: #000;
    border-radius: 6px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-info {
    flex: 1;
    min-width: 0;
}
.related-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
}
.related-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

@media (max-width: 992px) {
    .related-card { position: static; }
}
@media (max-width: 768px) {
    .related-card { padding: 14px; }
    .related-thumb { width: 100px; height: 58px; }
}
.category-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: var(--text);
}
.category-description {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 14px;
}
.category-meta {
    display: flex;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.category-videos-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .category-header-card { padding: 20px; }
    .category-title { font-size: 22px; }
    .category-videos-card { padding: 15px; }
}

/* ============================================
   SIDEBAR LAYOUT (Sol kategoriyalar paneli)
   ============================================ */
.app-wrapper {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    min-height: calc(100vh - 70px);
    position: relative;
    align-items: flex-start; /* sticky üçün vacib */
}

.app-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 70px; /* header hündürlüyü + 6px */
    align-self: flex-start;
    height: calc(100vh - 70px);
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: var(--bg);
    transition: transform 0.3s ease;
    z-index: 90;
}

.app-sidebar-inner {
    padding: 16px 0;
}

.cat-menu {
    display: flex;
    flex-direction: column;
}

.cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1.3;
}
.cat-link:hover {
    background: var(--hover);
    opacity: 1;
}
.cat-link.active {
    background: var(--hover);
    border-left-color: var(--text);
    font-weight: 600;
}
.cat-count {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.app-main {
    flex: 1;
    min-width: 0;
    padding: 20px 24px 40px;
}

/* ====== HAMBURGER BUTTON ====== */
.hamburger-btn {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 8px;
    flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--hover); }
.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}

/* ====== SIDEBAR OVERLAY (mobil üçün) ====== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
}
.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
    .hamburger-btn { display: flex; }
    
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%);
        z-index: 100;
        border-right: 1px solid var(--border);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        padding-top: 0; /* Mobil bağla düyməsi öz padding-ini idarə edir */
    }
    .app-sidebar.active {
        transform: translateX(0);
    }
    
    .app-main {
        padding: 15px;
    }
    
    /* Mobil sidebar header - bağla düyməsi */
    .sidebar-mobile-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 14px 16px;
        border-bottom: 1px solid var(--border);
        background: var(--bg-card);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    .sidebar-mobile-title {
        flex: 1;
        text-align: center;
        font-size: 17px;
        font-weight: 800;
        color: var(--text);
        letter-spacing: 0.3px;
        padding-left: 36px; /* X düyməsi sağdadır, mətn mərkəzdə qalsın */
    }
    .sidebar-close-btn {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-alt);
        border: 1px solid var(--border);
        border-radius: 50%;
        color: var(--text);
        font-size: 18px;
        cursor: pointer;
        transition: var(--transition);
        font-weight: 600;
    }
    .sidebar-close-btn:hover {
        background: #ef4444;
        color: #fff;
        border-color: #ef4444;
        transform: rotate(90deg);
    }
}

/* Desktop-da X düyməsi gizli amma "Kateqoriyalar" başlığı görünür */
@media (min-width: 901px) {
    .sidebar-mobile-header {
        display: flex !important;
        justify-content: center;
        align-items: center;
        padding: 18px 16px 14px;
        border-bottom: 1px solid var(--border);
        background: transparent;
    }
    .sidebar-mobile-title {
        font-size: 15px !important;
        font-weight: 800 !important;
        color: var(--text) !important;
        text-align: center;
        padding-left: 0 !important;
        letter-spacing: 0.3px;
        text-transform: uppercase;
    }
    .sidebar-close-btn {
        display: none !important; /* Yalnız mobildə görünür */
    }
}

@media (max-width: 768px) {
    .header-inner { 
        flex-wrap: nowrap;  /* Bir sırada qalsın */
        gap: 6px;
        align-items: center;
    }
    .hero h1 { font-size: 26px; }
    .videos-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .video-title { font-size: 13px; }
    
    /* Mobildə nav düymələri: mətn gizlənir, ikon qalır */
    .nav-btn .nav-btn-text { display: none; }
    .nav-btn {
        padding: 8px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        justify-content: center;
        flex-shrink: 0;
    }
    .nav-btn .nav-btn-icon {
        font-size: 16px;
        letter-spacing: 0;
    }
    
    /* Header-də nav düymələri yığcam görünsün */
    .header-nav { 
        gap: 4px; 
        flex-shrink: 0;
    }
    .theme-toggle, .lang-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        flex-shrink: 0;
    }
    
    /* Hamburger və logo da yığcam */
    .hamburger-btn {
        flex-shrink: 0;
    }
    .logo { 
        font-size: 16px; 
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }
    .logo-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Search düyməsini yığcam */
    .search-mobile-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    
    /* User avatar da yığcam */
    .user-avatar {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
        flex-shrink: 0;
    }
}

/* Çox kiçik ekranlar (telefon) - daha sıxılmış */
@media (max-width: 420px) {
    .header-inner { gap: 4px; }
    .header-nav { gap: 3px; }
    .nav-btn, .theme-toggle, .lang-btn, .search-mobile-btn, .user-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }
    .nav-btn .nav-btn-icon { font-size: 14px; }
    .logo-text { font-size: 14px; }
    .logo-img { height: 20px !important; max-height: 20px !important; }
    /* Çox kiçik ekranlarda da 2 sütun */
    .videos-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .video-title { font-size: 12px; }
    .video-stats-row { font-size: 10px; gap: 4px; }
}

/* ====== UTILITIES ====== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; color: var(--text); }

/* ============================================
   BİLDİRİŞLƏR SİYAHISI
   ============================================ */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s;
    position: relative;
}
.notification-item:hover {
    background: var(--hover);
    transform: translateX(2px);
    opacity: 1;
}
.notification-item.unread {
    background: var(--bg-card);
    border-color: var(--text);
}
.notification-icon {
    font-size: 22px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 50%;
}
.notification-content {
    flex: 1;
    min-width: 0;
}
.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
    color: var(--text);
}
.notification-item.unread .notification-title {
    font-weight: 700;
}
.notification-message {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.notification-time {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 5px;
}
.notification-dot {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .notification-item { padding: 12px 14px; gap: 10px; }
    .notification-icon { width: 34px; height: 34px; font-size: 18px; }
    .notification-title { font-size: 13px; }
    .notification-message { font-size: 12px; }
}

/* ============================================
   "MƏNİM VİDEOLARIM" SƏHİFƏSİ - sıra siyahı
   ============================================ */
.my-videos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-video-row {
    display: flex;
    gap: 14px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    align-items: flex-start;
}
.my-video-row:hover {
    border-color: var(--text);
    box-shadow: var(--shadow);
}

/* Thumbnail (kiçik şəkil - sabit, hərəkətsiz, watermark yoxdur) */
.my-video-thumb {
    flex-shrink: 0;
    width: 160px;
    height: 90px; /* 16:9 aspect ratio */
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    position: relative;
    display: block;
    text-decoration: none;
}
.my-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Heç bir hover, transition, transform - sadə şəkil */
}
.my-video-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

/* Sağ tərəf - məlumatlar */
.my-video-info {
    flex: 1;
    min-width: 0; /* text-overflow düzgün işləsin */
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.my-video-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.my-video-title a {
    color: var(--text);
    text-decoration: none;
}
.my-video-title a:hover {
    text-decoration: underline;
}
.my-video-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.my-video-meta .meta-sep {
    opacity: 0.5;
}
.my-video-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.my-video-stats strong {
    color: var(--text);
    font-weight: 700;
    margin-left: 2px;
}

/* MOBİL - thumbnail kiçilir amma yan-yana qalır */
@media (max-width: 600px) {
    .my-video-row {
        padding: 10px;
        gap: 10px;
    }
    .my-video-thumb {
        width: 120px;
        height: 68px;
    }
    .my-video-title {
        font-size: 14px;
    }
    .my-video-meta, .my-video-stats {
        font-size: 11px;
        gap: 8px;
    }
}

@media (max-width: 400px) {
    .my-video-thumb {
        width: 100px;
        height: 56px;
    }
    .my-video-title {
        font-size: 13px;
    }
}

/* ============================================
   VİDEO BAXIŞ SƏHİFƏSİ - MOBİL DÜZƏLİŞİ
   ============================================ */
.video-detail {
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* Daxili elementlər kənara çıxmasın */
}

.video-main {
    width: 100%;
    max-width: 100%;
    min-width: 0; /* flex/grid-də sıxılma icazəsi */
    overflow: hidden;
}

/* Player container və daxili elementlər */
.video-player-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.video-player-box video,
.video-player-box iframe,
.video-player-box .plyr {
    width: 100% !important;
    max-width: 100% !important;
}

/* Stats sırası - mobildə sıxılsın və wrap olsun */
.video-stats {
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}

.stats-actions {
    flex-wrap: wrap;
    gap: 6px;
}

/* Video təsviri qutusu */
.video-description-box,
.video-tags,
.comments-section,
.related-videos {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Şərhlər */
.comment-item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.comment-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Mobile-specific - daha sıxılmış */
@media (max-width: 768px) {
    /* App main padding kiçilsin */
    .app-main {
        padding: 12px !important;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Container kiçilsin */
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    /* Video detail tam ekran istifadə etsin */
    .video-detail {
        gap: 16px;
        padding: 0;
        margin: 0;
    }
    
    /* Stats action düymələri yığcam */
    .video-stats .action-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    .video-stats .stats-left {
        font-size: 12px;
        gap: 6px;
    }
    .video-stats .stats-left strong {
        font-size: 13px;
    }
    
    /* Stats icon əskik göstərilsin */
    .download-size {
        font-size: 10px;
    }
    
    /* Plyr player mobildə tam genişlikdə */
    .plyr {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .app-main {
        padding: 8px !important;
    }
    .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    .video-stats {
        gap: 6px;
    }
    .video-stats .stats-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .video-stats .action-btn {
        padding: 6px 9px;
        font-size: 11px;
    }
    .video-stats .stats-left {
        font-size: 11px;
        flex-wrap: wrap;
    }
    
    /* Reklam zonası mobildə yığcam */
    .ad-zone {
        margin: 10px 0;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Watermark mobildə daha kiçik və daha az incə */
    .video-watermark {
        padding: 3px 6px;
    }
    
    /* Video title kiçik mobildə */
    .video-top-title {
        font-size: 17px !important;
    }
}

/* HTML və body horizontal scroll qarşısı - sticky pozulmasın */
html {
    max-width: 100vw;
    overflow-x: clip; /* clip sticky ilə uyğundur, hidden pozur */
}
body {
    max-width: 100vw;
    overflow-x: clip;
}

/* SMS POPUP */
.ticker-outer {
    position: relative;
    margin-bottom: 10px;
}

.chat-sms-popup {
    /* Çatın ALTINDA yapışıq, gizli */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 99;
    /* Slide animation */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.3s ease;
    pointer-events: none;
}
.chat-sms-popup.open {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Form - üfüqi sıra (çat ticker kimi yan-yana) */
.chat-sms-form {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    margin: 0;
}

/* Adınız sahəsi - sabit eni */
.chat-sms-name {
    flex: 0 0 160px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    height: 38px;
    box-sizing: border-box;
}
.chat-sms-name:disabled {
    background: var(--bg-alt);
    cursor: not-allowed;
    font-weight: 600;
}

/* Mesaj sahəsi - geniş, qalan boşluğu doldurur */
.chat-sms-message {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    height: 38px;
    box-sizing: border-box;
}
.chat-sms-name:focus, .chat-sms-message:focus {
    outline: none;
    border-color: var(--text);
}

/* Göndər düyməsi - yaşıl */
.chat-sms-send-btn {
    flex-shrink: 0;
    padding: 0 18px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    height: 38px;
    white-space: nowrap;
}
.chat-sms-send-btn:hover {
    background: #059669;
}

/* Nəticə (xəta/uğur) mesajı */
.chat-sms-result {
    padding: 0 10px 10px;
    font-size: 13px;
}
.chat-sms-result:empty {
    padding: 0;
}

@media (max-width: 600px) {
    /* Mobildə SMS popup kompakt */
    .chat-sms-popup.open {
        max-height: 220px;
    }
    .chat-sms-form {
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px;
    }
    .chat-sms-name {
        flex: 1 1 100%;
        height: 36px;
        font-size: 13px;
    }
    .chat-sms-message {
        flex: 1 1 calc(100% - 88px);
        height: 36px;
        font-size: 13px;
    }
    .chat-sms-send-btn {
        flex: 0 0 80px;
        padding: 0 10px;
        font-size: 13px;
        height: 36px;
    }
}

/* ============================================
   UPLOAD XƏBƏRDARLIĞI
   ============================================ */
.upload-warning {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-left: 6px solid #dc2626;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #7f1d1d;
}
.upload-warning-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #dc2626;
    letter-spacing: 0.3px;
}
.upload-warning-list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.6;
}
.upload-warning-list li {
    margin-bottom: 8px;
}
.upload-warning-list li:last-child {
    margin-bottom: 0;
}
.upload-warning-list strong {
    color: #991b1b;
    font-weight: 700;
}

[data-theme="dark"] .upload-warning {
    background: #450a0a;
    border-color: #7f1d1d;
    color: #fee2e2;
}
[data-theme="dark"] .upload-warning-title {
    color: #fca5a5;
}
[data-theme="dark"] .upload-warning-list strong {
    color: #fecaca;
}

@media (max-width: 600px) {
    .upload-warning {
        padding: 14px 16px;
        margin-bottom: 18px;
    }
    .upload-warning-title {
        font-size: 16px;
    }
    .upload-warning-list {
        font-size: 13px;
        padding-left: 18px;
    }
}

/* Çatda admin sil düyməsi */
.chat-admin-del {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 11px;
    color: #ef4444;
    transition: 0.2s;
    line-height: 1;
}
.chat-admin-del:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

/* ============================================
   GENDER BADGE (rəngli ikon)
   ============================================ */
.gender-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: bold;
    margin-right: 4px;
    text-shadow: 0 0 1px rgba(0,0,0,0.1);
}

/* ============================================
   REGISTER - Cinsiyyət seçimi
   ============================================ */
.gender-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gender-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    background: var(--bg);
    user-select: none;
}

.gender-option:hover {
    border-color: var(--text);
    background: var(--bg-alt);
}

.gender-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

.gender-option input[type="radio"]:checked {
    border-color: var(--text);
}

.gender-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 8px; height: 8px;
    background: var(--text);
    border-radius: 50%;
}

.gender-option:has(input:checked) {
    border-color: var(--text);
    background: var(--bg-alt);
    font-weight: 600;
}

.gender-option .gender-icon {
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
}

.gender-option[data-gender="male"] .gender-icon { color: #3b82f6; }
.gender-option[data-gender="female"] .gender-icon { color: #ec4899; }
.gender-option[data-gender="gay"] .gender-icon { color: #a855f7; }
.gender-option[data-gender="lesbian"] .gender-icon { color: #f97316; }

@media (max-width: 480px) {
    .gender-select {
        grid-template-columns: 1fr;
    }
}

/* Related videos - stats */
.related-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    margin: 3px 0;
}
.related-stats span { white-space: nowrap; }
.related-duration {
    position: absolute;
    top: 4px; right: 4px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    z-index: 3;
}

/* Profil linklər */
.pub-profile-link {
    text-decoration: none;
    color: inherit;
}
.pub-profile-link:hover .comment-author,
.pub-profile-link:hover .author-name {
    text-decoration: underline;
}
.video-author-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.video-author-link:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Online dot - söhbət siyahısı */
.conv-online-dot {
    position: absolute;
    bottom: 2px; right: 2px;
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}
.conv-online-dot.online { background: #10b981; }
.conv-online-dot.offline { background: #9ca3af; }

/* ============================================
   AVATAR BADGE - mesaj / bildiriş
   ============================================ */
.user-avatar-wrap {
    position: relative;
    cursor: pointer;
}

.avatar-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid var(--bg);
    animation: badgePulse 2s infinite;
    line-height: 1;
    z-index: 10;
}

.avatar-badge-msg {
    background: #ef4444;
    color: #fff;
}

.avatar-badge-notif {
    background: #f59e0b;
    color: #fff;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ============================================
   BALANS BANNERİ
   ============================================ */
.balance-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: linear-gradient(90deg, #059669, #10b981);
    color: #fff;
    border-radius: 10px;
    margin-bottom: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}
.balance-banner:hover {
    background: linear-gradient(90deg, #047857, #059669);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.4);
}
.balance-banner strong { font-weight: 800; font-size: 15px; }
.balance-banner-btn {
    background: rgba(255,255,255,0.25);
    border-radius: 8px;
    padding: 4px 10px;
    font-weight: 700;
    flex-shrink: 0;
}

[data-theme="dark"] .balance-banner {
    box-shadow: 0 2px 8px rgba(16,185,129,0.15);
}

@media (max-width: 600px) {
    .balance-banner { font-size: 13px; padding: 8px 12px; }
}

/* Çatda istifadəçi adı linki */
.chat-username-link {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.chat-username-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Ticker sürət düymələri */
.ticker-speed-controls {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    align-items: center;
}
.ticker-speed-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.15s;
    line-height: 1.4;
}
.ticker-speed-btn:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}
.ticker-speed-btn.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

/* Video format badge - yuxarı sol künc */
.video-format-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(2px);
}

/* Video məlumatları cədvəli */
.video-info-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px 0;
    margin: 14px 0;
}
.video-info-table {
    width: 100%;
    border-collapse: collapse;
}
.video-info-table tr {
    border-bottom: 1px solid var(--border);
}
.video-info-table tr:last-child {
    border-bottom: none;
}
.vit-label {
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    width: 110px;
    vertical-align: middle;
}
.vit-value {
    padding: 9px 14px 9px 0;
    font-size: 14px;
    color: var(--text);
    vertical-align: middle;
}
