/* discover.css */

/* ═══════════════════════════════════════════════════════════════════
   🎬 YouTube Creator Studio — Admin Panel Discover Section
   ═══════════════════════════════════════════════════════════════════ */

/* ── Stat pills in header ──────────────────────────────────────────── */
.studio-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: color-mix(in srgb, var(--c) 12%, transparent);
    color: var(--c);
    border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
    white-space: nowrap;
}

/* ── Create buttons ────────────────────────────────────────────────── */
.studio-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--text);
    transition: background 180ms;
    white-space: nowrap;
}
.studio-create-btn:hover { background: var(--hover); }

/* ── Filter tabs ───────────────────────────────────────────────────── */
.studio-filter-tab {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    color: #666;
    border: 1.5px solid transparent;
    transition: all 160ms;
    background: transparent;
}
.studio-filter-tab:hover { color: #aaa; background: rgba(255,255,255,0.04); }
.studio-filter-tab.active {
    color: #fff;
    background: rgba(62,166,255,0.14);
    border-color: rgba(62,166,255,0.35);
}

/* ═══════════════════════════════════════════════════════════════════
   🎬 YouTube Studio – Table rows بالضبط زي يوتيوب
   ═══════════════════════════════════════════════════════════════════ */

/* ─── رأس الجدول ─────────────────────────────────────────────────── */
.yt-th-row {
    display: grid;
    align-items: center;
    padding: 0 16px;
    height: 48px;
    font-size: 12px;
    font-weight: 500;
    color: #aaa;
    border-bottom: 1px solid #272727;
    background: #0f0f0f;
    gap: 8px;
}

/* ─── صف محتوى ───────────────────────────────────────────────────── */
.yt-content-row {
    display: grid;
    grid-template-columns: 42px minmax(340px, 1.55fr) 120px 130px 110px 110px 130px 184px;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 120ms;
    cursor: default;
    min-width: 0;
}
.yt-content-row:hover { background: rgba(255,255,255,0.035); }
.yt-content-row:last-child { border-bottom: none; }

.yt-col-check {
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-col-video {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.yt-thumb-box {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    aspect-ratio: 16/9;
    background: #111;
    border-radius: 4px;
    overflow: hidden;
}
.yt-thumb-box img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: opacity 200ms;
}
.yt-content-row:hover .yt-thumb-box img { opacity: 0.85; }

.yt-thumb-play-btn {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.55);
    opacity: 0; transition: opacity 180ms;
}
.yt-thumb-play-btn svg { width: 28px; height: 28px; color: #fff; }
.yt-content-row:hover .yt-thumb-play-btn { opacity: 1; }

.yt-video-meta { flex: 1; min-width: 0; padding-top: 2px; }

.yt-type-chip {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 5px;
}

.yt-video-title {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 150ms;
    margin-bottom: 4px;
}

.yt-video-desc {
    font-size: 11px;
    color: #717171;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.yt-hover-actions {
    display: flex; align-items: center; gap: 2px;
    margin-top: 8px;
    opacity: 0; transition: opacity 180ms;
}
.yt-content-row:hover .yt-hover-actions { opacity: 1; }

.yt-action-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: #aaa;
    background: transparent;
    transition: background 140ms, color 140ms;
}
.yt-action-icon-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.yt-action-icon-btn svg { width: 16px; height: 16px; }

.yt-col-stat {
    font-size: 13px;
    color: #aaa;
    text-align: center;
    white-space: nowrap;
}
.yt-privacy-col { font-size: 12px; }
.yt-date-col { font-size: 11px; color: #666; }

.yt-likes-wrap {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-size: 12px; color: #aaa;
}
.yt-likes-bar {
    width: 80px; height: 3px;
    border-radius: 2px; overflow: hidden;
}
.yt-likes-bar > div { height: 100%; border-radius: 2px; transition: width 600ms; }
.yt-likes-abs { font-size: 10px; color: #555; }

.yt-col-actions { display: none; }

/* ── Discover list toolbar (management screen) ───────────────────────── */
.discover-list-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, rgba(19, 24, 50, 0.9), rgba(13, 17, 37, 0.95));
    border: 1px solid rgba(102, 123, 198, 0.26);
    border-radius: 14px;
    padding: 12px;
}

.discover-toolbar-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.discover-bulk-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.45);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.discover-bulk-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.discover-search-wrap {
    position: relative;
}

.discover-search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a8abc;
}

.discover-search-input {
    width: 100%;
    background: rgba(7, 10, 22, 0.7);
    border: 1px solid rgba(114, 133, 201, 0.3);
    border-radius: 10px;
    padding: 10px 12px 10px 36px;
    color: #edf2ff;
    font-size: 13px;
    font-weight: 700;
    outline: none;
}

.discover-search-input::placeholder { color: #7285b4; }
.discover-search-input:focus { border-color: #3ea6ff; }

.discover-toolbar-note {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 1px;
}

.discover-toolbar-note span {
    color: #8da2da;
    font-size: 11px;
}

.discover-toolbar-note strong {
    color: #d8e3ff;
    font-size: 12px;
}

.discover-toolbar-note small {
    color: #6f83b5;
    font-size: 10px;
}

@media (max-width: 1023px) {
    .yt-content-row { grid-template-columns: 42px 1fr auto; }
    .yt-privacy-col,.yt-date-col,.yt-col-stat { display: none; }
    .yt-col-actions-desktop { display: none; }
    .yt-col-actions { display: flex; flex-direction: column; gap: 6px; }
    .yt-hover-actions { opacity: 1 !important; }
    .yt-thumb-play-btn { opacity: 0 !important; }
    .discover-list-toolbar { grid-template-columns: 1fr; }
    .discover-toolbar-main { grid-template-columns: 1fr; }
    .discover-toolbar-note { align-items: flex-start; text-align: right; }
}

/* ── Table header for discover (legacy) ─────────────────────────── */
.studio-table-header {
    display: flex; align-items: center; gap: 16px; padding: 10px 18px;
    border-bottom: 1px solid #1e1e1e; font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.05em; color: #444;
}

/* ── Misc helper ─────────────────────────────────────────────────── */
.studio-list-desc {
    font-size: 11.5px; color: #666; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}


/* ═══════════════════════════════════════════════════════════════════
   🎬 New Studio Forms — تصميم جديد كامل
   ═══════════════════════════════════════════════════════════════════ */

/* ── حقول الإدخال الموحّدة ───────────────────────────────────────── */
.ds-input, .ds-textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: border 160ms, background 160ms;
    resize: vertical;
    font-family: inherit;
}
.ds-input:focus, .ds-textarea:focus {
    border-color: rgba(62,166,255,0.6);
    background: rgba(255,255,255,0.07);
}
.ds-input::placeholder, .ds-textarea::placeholder { color: #555; }
select.ds-input option { background: #1a1a1a; color: #fff; }

/* ── Labels & Hints ─────────────────────────────────────────────── */
.ds-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #ccc;
    margin-bottom: 6px;
}
.ds-hint {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
}

/* ── Upload buttons ─────────────────────────────────────────────── */
.ds-upload-btn-label { display: block; cursor: pointer; }

/* ── Thumbnail upload box ───────────────────────────────────────── */
.ds-thumb-upload {
    display: block;
    border: 2px dashed rgba(255,255,255,0.12);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    transition: border-color 150ms, background 150ms;
}
.ds-thumb-upload:hover {
    border-color: rgba(62,166,255,0.45);
    background: rgba(62,166,255,0.05);
}

/* ── Outline button ─────────────────────────────────────────────── */
.ds-btn-outline {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #aaa;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.1);
    cursor: pointer;
    white-space: nowrap;
    transition: background 150ms;
}
.ds-btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ── Attach button (community) ──────────────────────────────────── */
.ds-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #aaa;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 150ms;
}
.ds-attach-btn:hover { background: rgba(255,255,255,0.07); color: #fff; border-color: rgba(255,255,255,0.2); }

/* ── Type tabs ──────────────────────────────────────────────────── */
.ds-type-tab { transition: all 160ms; }
.ds-type-tab:hover { filter: brightness(1.15); }

/* ── Responsive: تراص عمودي على الموبايل ───────────────────────── */
@media (max-width: 1023px) {
    #discover-posting-wrapper > div[style*='grid'] { display: flex !important; flex-direction: column !important; }
}

/* ── Legacy selectors (needed for backwards compat) ─────────────── */
.studio-shell .studio-label { display:block; font-size:13px; font-weight:500; color:#ccc; margin-bottom:6px; }
.studio-shell .studio-hint  { font-size:11px; color:#666; margin-top:4px; }
.studio-shell .studio-input,
.studio-shell .studio-textarea,
.studio-shell .studio-select { width:100%; background:rgba(255,255,255,0.05); border:1.5px solid rgba(255,255,255,0.1); border-radius:10px; padding:12px 14px; font-size:14px; color:#fff; outline:none; transition:border 160ms; resize:vertical; }
.studio-shell .studio-input:focus,
.studio-shell .studio-textarea:focus { border-color:rgba(62,166,255,0.6); }
.studio-type-btn { padding:7px 16px !important; border-radius:18px !important; font-size:13px !important; font-weight:500 !important; cursor:pointer !important; }

.discover-tab-btn {
    padding-bottom: 0.5rem;
    transition: all 200ms;
    cursor: pointer;
}
.discover-tab-btn:not(.active):hover {
    color: #ef4444;
    border-bottom: 2px solid #fca5a5;
}
.discover-tab-btn.active {
    border-bottom: 2px solid #dc2626 !important;
}

.content-title {
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 600;
    color: #0f172a;
}

.publisher-name {
    font-size: 0.95rem;
}

.info-line {
    font-size: 0.85rem;
}

.discover-video-card {
    background-color: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.discover-video-card > div {
    padding: 0.75rem;
}

.discover-video-card a[href] .publisher-name:hover {
    text-decoration: underline;
}

/* ========================================================================= */
/* 🛑 تصميم يوتيوب للموبايل (بدون أي هوامش أو فراغات بملء الشاشة) 🛑 */
/* ========================================================================= */

@media (max-width: 1023px) {
    /* إزالة المسافات من الحاويات الرئيسية للاقتراحات والمحتوى */
    #discover-content-container,
    #suggested-videos-container,
    #discover-suggested-list {
         padding: 0 !important;
         margin: 0 !important;
         width: 100% !important;
         max-width: 100% !important;
    }

    /* إزالة الفراغات (Gaps) بين الفيديوهات */
    #discover-content-container > div,
    #discover-suggested-list > div,
    .grid {
         gap: 0 !important;
         padding: 0 !important;
         margin: 0 !important;
    }

    /* كارت الفيديو نفسه بملء الشاشة وبدون حواف */
    .discover-full-bleed-item {
        background-color: white !important; 
        border-radius: 0 !important; 
        border-bottom: 4px solid #f3f4f6 !important; /* فاصل رمادي خفيف جداً بين الفيديوهات */
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        overflow: hidden !important;
        box-shadow: none !important;
        padding-bottom: 0 !important; 
        margin: 0 !important; 
        width: 100% !important;
        max-width: 100% !important;
    }

    .discover-full-bleed-item .relative.w-full.aspect-video,
    .discover-full-bleed-item .bg-gray-50\/50,
    .discover-full-bleed-item img {
        border-radius: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .discover-full-bleed-item .p-4.bg-white,
    .discover-full-bleed-item > div.flex.items-start {
        background-color: white !important; 
        padding: 12px 14px !important; 
        box-shadow: none !important;
    }
}

/* ========================================================================= */
/* ===== 🌟 شبكة فيديوهات الشاشات الكبيرة (كمبيوتر) 🌟 ===== */
/* ========================================================================= */

@media (min-width: 1024px) { 
    .discover-full-bleed-item {
        border-radius: 0.75rem !important; 
        border: 1px solid #e5e7eb !important;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important;
        margin-bottom: 1rem !important; 
    }

    .discover-full-bleed-item .relative.w-full.aspect-video {
        border-radius: 0.75rem 0.75rem 0 0 !important; 
    }
}

/* ================================================= */
/* ===== Discover Player Styles ===== */
/* ================================================= */

.discover-player-controls-bar {
    height: 80px; 
    background-color: rgba(0, 0, 0, 0.8) !important; 
    backdrop-filter: none; 
    border-radius: 0;
}

.seek-btn-custom {
    border: none;
    cursor: pointer;
    background-color: transparent;
    color: white;
    box-shadow: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.rewind-btn-design, .forward-btn-design, .play-pause-btn-design {
    width: auto;
    height: auto;
    border-radius: 0;
    background-color: transparent !important;
    padding: 0;
    transform: none;
}

.rewind-btn-design:hover, .forward-btn-design:hover, .play-pause-btn-design:hover {
     background-color: rgba(255, 255, 255, 0.1); 
}

.discover-player-controls-bar .player-icon {
     filter: brightness(0) invert(1);
}

.discover-player-outer-frame:-webkit-full-screen {
    background-color: black;
}
.discover-player-outer-frame:-webkit-full-screen iframe,
.discover-player-outer-frame:-webkit-full-screen video {
    object-fit: contain !important;
}

.publisher-name,
.content-title,
.publisher-name-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
    max-width: 100% !important;
    vertical-align: bottom;
}

.publisher-name-text {
    max-width: 150px !important; 
}

/* ========================================================================= */
/* 🌟 تصميم شبكة الشورتس / الريلز 🌟 */
/* ========================================================================= */
.shorts-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background-color: #fff;
    padding: 2px 0;
}

@media (min-width: 640px) {
    .shorts-grid-container { grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; }
}
@media (min-width: 1024px) {
    .shorts-grid-container { grid-template-columns: repeat(5, 1fr); }
}

.short-grid-item {
    position: relative;
    display: block;
    aspect-ratio: 9 / 16; 
    background-color: #000;
    overflow: hidden;
    border-radius: 0 !important; 
}

.short-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.short-grid-item:hover img {
    transform: scale(1.05);
}

.short-grid-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 30%, transparent 100%);
    pointer-events: none;
}

.short-grid-info {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.short-grid-title {
    color: white !important;
    font-size: 13px !important;
    font-weight: bold;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal !important;
}

.short-grid-views {
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    font-weight: 500;
}

.discover-player-controls-bar {
    height: auto !important;
    min-height: 80px;
    padding: 20px 10px 10px 10px !important;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%) !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.discover-player-outer-frame .content-title {
    color: white !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    white-space: normal !important; 
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 8px !important; 
    text-shadow: 1px 1px 3px black;
    max-width: 100%;
}

.discover-player-outer-frame video {
    object-fit: contain !important; 
    background-color: black;
}

/* =========================================================
   🌟 تصميم كروت القنوات — نمط داكن متوافق مع Netflix Theme
   ========================================================= */

/* زر متابعة القناة */
.publisher-follow-btn {
    transition: all 0.2s ease;
}
.publisher-follow-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.03);
}

/* شبكة القنوات */
@media (max-width: 639px) {
    .grid .channel-card {
        padding: 14px 10px;
    }
    .grid .channel-card img.w-24 {
        width: 68px !important;
        height: 68px !important;
    }
}

/* ========================================================================= */
/* Discover Posting Studio (from-scratch, isolated)                          */
/* ========================================================================= */

#discover-posting-wrapper.ds-studio-shell {
    --studio-accent: #3ea6ff;
    color: #edf2ff;
    font-family: "Tajawal", "Segoe UI", sans-serif;
    min-height: 100vh;
    padding: 18px;
    border-radius: 18px;
    background:
        radial-gradient(1200px 320px at 80% -10%, rgba(96, 96, 255, 0.22), transparent 60%),
        radial-gradient(900px 240px at -10% 0%, rgba(62, 166, 255, 0.25), transparent 55%),
        linear-gradient(165deg, #0d1028 0%, #151a38 45%, #12162f 100%);
    border: 1px solid rgba(120, 135, 255, 0.16);
}

#discover-posting-wrapper.ds-tone-video { --studio-accent: #3ea6ff; }
#discover-posting-wrapper.ds-tone-reel { --studio-accent: #ff4e6a; }
#discover-posting-wrapper.ds-tone-community { --studio-accent: #2ec27e; }

#discover-posting-wrapper .ds-studio-topbar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(21, 25, 53, 0.9), rgba(16, 19, 42, 0.92));
    border: 1px solid rgba(120, 135, 255, 0.14);
}

#discover-posting-wrapper .ds-studio-brand {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

#discover-posting-wrapper .ds-studio-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    margin-top: 8px;
    background: var(--accent);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent);
}

#discover-posting-wrapper .ds-studio-kicker {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8da4e8;
}

#discover-posting-wrapper .ds-studio-title {
    margin: 4px 0 2px;
    font-size: 21px;
    font-weight: 900;
    color: #ffffff;
}

#discover-posting-wrapper .ds-studio-subtitle {
    margin: 0;
    color: #a8b5dd;
    font-size: 12px;
}

#discover-posting-wrapper .ds-studio-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 10px;
    min-width: 320px;
}

#discover-posting-wrapper .ds-mini-card {
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(141, 164, 232, 0.2);
}

#discover-posting-wrapper .ds-mini-card span {
    display: block;
    font-size: 11px;
    color: #8898c9;
}

#discover-posting-wrapper .ds-mini-card strong {
    display: block;
    margin-top: 4px;
    color: #fff;
    font-size: 13px;
}

#discover-posting-wrapper .ds-type-switcher {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    border-radius: 14px;
    padding: 10px;
    margin-bottom: 16px;
    background: rgba(15, 18, 40, 0.9);
    border: 1px solid rgba(120, 135, 255, 0.16);
}

#discover-posting-wrapper .ds-type-label {
    color: #90a0d2;
    font-size: 12px;
    font-weight: 700;
    margin-inline-start: 4px;
}

#discover-posting-wrapper .ds-type-tab {
    border: 1px solid rgba(130, 145, 200, 0.24);
    background: rgba(255, 255, 255, 0.02);
    color: #9eadd8;
    border-radius: 12px;
    padding: 9px 12px;
    min-width: 170px;
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 2px 8px;
    text-align: right;
    cursor: pointer;
    transition: 0.18s ease;
}

#discover-posting-wrapper .ds-type-tab:hover {
    background: color-mix(in srgb, var(--tab-accent) 12%, rgba(255, 255, 255, 0.02));
    border-color: color-mix(in srgb, var(--tab-accent) 42%, transparent);
}

#discover-posting-wrapper .ds-type-tab.is-active {
    background: color-mix(in srgb, var(--tab-accent) 20%, rgba(255, 255, 255, 0.02));
    border-color: color-mix(in srgb, var(--tab-accent) 55%, transparent);
    color: #ffffff;
}

#discover-posting-wrapper .ds-type-icon {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tab-accent);
}

#discover-posting-wrapper .ds-type-main {
    font-weight: 900;
    font-size: 13px;
    line-height: 1.2;
}

#discover-posting-wrapper .ds-type-hint {
    font-size: 10px;
    color: #93a0c7;
    line-height: 1.2;
}

#discover-posting-wrapper .ds-page-grid {
    display: grid;
    gap: 14px;
    align-items: start;
}

#discover-posting-wrapper .ds-page-grid--video {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
}

#discover-posting-wrapper .ds-page-grid--reel {
    grid-template-columns: 300px minmax(0, 1fr) minmax(280px, 0.85fr);
}

#discover-posting-wrapper .ds-page-grid--community {
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
}

#discover-posting-wrapper .ds-main-stack,
#discover-posting-wrapper .ds-side-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

#discover-posting-wrapper .ds-card {
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(19, 24, 52, 0.88), rgba(14, 18, 40, 0.92));
    border: 1px solid rgba(116, 134, 196, 0.2);
    overflow: hidden;
}

#discover-posting-wrapper .ds-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(120, 135, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
}

#discover-posting-wrapper .ds-card-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 900;
    color: #f5f7ff;
}

#discover-posting-wrapper .ds-card-head span {
    font-size: 11px;
    color: #8ea0d6;
    border: 1px solid rgba(120, 135, 255, 0.2);
    border-radius: 999px;
    padding: 2px 8px;
}

#discover-posting-wrapper .ds-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#discover-posting-wrapper .ds-video-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #090b17;
    border: 1px dashed rgba(133, 148, 212, 0.35);
}

#discover-posting-wrapper .ds-stage-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6d7aa7;
    text-align: center;
    font-size: 12px;
}

#discover-posting-wrapper .ds-upload-row {
    display: grid;
    grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
    gap: 10px;
    align-items: end;
}

#discover-posting-wrapper .ds-primary-upload {
    width: 100%;
    padding: 12px 14px;
    text-align: center;
    border-radius: 10px;
    font-weight: 900;
    cursor: pointer;
    color: #03182a;
    background: linear-gradient(135deg, #3ea6ff, #77c5ff);
    box-shadow: 0 8px 18px rgba(62, 166, 255, 0.28);
}

#discover-posting-wrapper .ds-primary-upload--reel {
    color: #fff;
    background: linear-gradient(135deg, #ff4e6a, #ff986d);
    box-shadow: 0 8px 18px rgba(255, 78, 106, 0.3);
}

#discover-posting-wrapper .ds-progress-track {
    height: 5px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

#discover-posting-wrapper .ds-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--studio-accent), color-mix(in srgb, var(--studio-accent) 40%, #fff));
}

#discover-posting-wrapper .ds-status-line {
    margin: 0;
    color: #8da0d6;
    font-size: 11px;
    text-align: center;
}

#discover-posting-wrapper .ds-two-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

#discover-posting-wrapper .ds-inline-note {
    border: 1px solid rgba(120, 135, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 9px 10px;
    color: #9ba9d3;
    font-size: 11px;
}

#discover-posting-wrapper .ds-inline-note p {
    margin: 0 0 3px;
}

#discover-posting-wrapper .ds-inline-note a,
#discover-posting-wrapper .ds-inline-link {
    color: var(--studio-accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 11px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#discover-posting-wrapper .ds-inline-link {
    padding: 4px 0;
}

#discover-posting-wrapper .ds-required {
    color: #ff7e8f;
}

#discover-posting-wrapper .ds-thumb-uploader {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#discover-posting-wrapper .ds-thumb-upload {
    position: relative;
    min-height: 120px;
}

#discover-posting-wrapper .ds-thumb-upload--wide {
    aspect-ratio: 16 / 9;
}

#discover-posting-wrapper .ds-thumb-upload--reel {
    width: 105px;
    height: 184px;
    border-radius: 12px;
}

#discover-posting-wrapper .ds-thumb-uploader--reel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

#discover-posting-wrapper .ds-thumb-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    color: #8390bc;
    font-size: 11px;
    font-weight: 700;
}

#discover-posting-wrapper .ds-check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

#discover-posting-wrapper .ds-check-list li {
    position: relative;
    padding-right: 18px;
    color: #b3bfdf;
    font-size: 12px;
    line-height: 1.5;
}

#discover-posting-wrapper .ds-check-list li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--studio-accent);
}

#discover-posting-wrapper .ds-card--tips {
    background: color-mix(in srgb, var(--studio-accent) 8%, rgba(18, 24, 50, 0.95));
}

#discover-posting-wrapper .ds-promo-title {
    margin: 0;
    color: #f5f7ff;
    font-size: 13px;
    font-weight: 800;
}

#discover-posting-wrapper .ds-promo-subtitle {
    margin: 2px 0 0;
    color: #90a1d4;
    font-size: 11px;
}

#discover-posting-wrapper .ds-radio-label {
    color: #b0bee2;
}

#discover-posting-wrapper .ds-form-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(120, 135, 255, 0.2);
    padding-top: 14px;
    margin-top: 2px;
}

#discover-posting-wrapper .ds-form-footer p {
    margin: 0;
    color: #8fa0d3;
    font-size: 12px;
}

#discover-posting-wrapper #discover-submit-post-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 34px;
    font-size: 15px;
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    background: var(--accent);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 35%, transparent);
}

#discover-posting-wrapper .ds-reel-preview-card .ds-card-body {
    position: sticky;
    top: 16px;
}

#discover-posting-wrapper .ds-phone-shell {
    width: 240px;
    margin: 0 auto;
    border-radius: 30px;
    border: 3px solid rgba(136, 152, 207, 0.35);
    background: #0b0e1f;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
    aspect-ratio: 9 / 16;
    position: relative;
}

#discover-posting-wrapper .ds-phone-overlay {
    position: absolute;
    bottom: 0;
    inset-inline: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}

#discover-posting-wrapper .ds-phone-overlay p {
    margin: 0;
    color: #fff;
    font-size: 11px;
    line-height: 1.45;
}

#discover-posting-wrapper .ds-card--community-editor .ds-card-body {
    gap: 14px;
}

#discover-posting-wrapper .ds-community-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

#discover-posting-wrapper .ds-community-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(130, 145, 200, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

#discover-posting-wrapper #comm-pub-name {
    margin: 0 0 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

#discover-posting-wrapper .ds-pill-public {
    border: 1px solid rgba(62, 166, 255, 0.35);
    color: #8fd1ff;
    background: rgba(62, 166, 255, 0.12);
    border-radius: 999px;
    font-size: 11px;
    padding: 2px 10px;
}

#discover-posting-wrapper .ds-community-textarea {
    width: 100%;
    border: 1px solid rgba(130, 145, 200, 0.3);
    border-radius: 12px;
    background: rgba(8, 11, 26, 0.55);
    color: #eef2ff;
    padding: 12px;
    resize: vertical;
    min-height: 180px;
    line-height: 1.8;
    outline: none;
    font-family: inherit;
}

#discover-posting-wrapper .ds-community-textarea:focus {
    border-color: color-mix(in srgb, var(--studio-accent) 65%, transparent);
}

#discover-posting-wrapper .ds-community-tools {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

#discover-posting-wrapper .ds-community-image-wrap {
    margin-top: -2px;
}

#discover-posting-wrapper .ds-community-image {
    max-height: 320px;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(120, 135, 255, 0.25);
    object-fit: cover;
}

#discover-posting-wrapper .ds-remove-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    border: 0;
    border-radius: 999px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.64);
    cursor: pointer;
}

#discover-posting-wrapper .ds-community-preview {
    min-height: 120px;
    margin: 0;
    color: #c4cff1;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    border-radius: 10px;
    border: 1px dashed rgba(130, 145, 200, 0.3);
    padding: 10px;
    background: rgba(255, 255, 255, 0.015);
}

#discover-posting-wrapper .ds-input,
#discover-posting-wrapper .ds-textarea {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(130, 145, 200, 0.3);
    color: #fff;
}

#discover-posting-wrapper .ds-input::placeholder,
#discover-posting-wrapper .ds-textarea::placeholder {
    color: #7f8cb5;
}

#discover-posting-wrapper .ds-input:focus,
#discover-posting-wrapper .ds-textarea:focus {
    border-color: color-mix(in srgb, var(--studio-accent) 60%, transparent);
    background: rgba(255, 255, 255, 0.05);
}

#discover-posting-wrapper .ds-label {
    color: #c6d1f0;
}

#discover-posting-wrapper .ds-hint {
    color: #90a1d4;
}

#discover-posting-wrapper .ds-btn-outline {
    border-color: rgba(130, 145, 200, 0.35);
    color: #c8d3f6;
    background: rgba(255, 255, 255, 0.02);
}

#discover-posting-wrapper .ds-btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

#discover-posting-wrapper .ds-attach-btn {
    border-color: rgba(130, 145, 200, 0.35);
    color: #d3dcf8;
}

@media (max-width: 1320px) {
    #discover-posting-wrapper .ds-page-grid--reel {
        grid-template-columns: minmax(0, 1fr) minmax(270px, 0.9fr);
    }
    #discover-posting-wrapper .ds-reel-preview-card {
        grid-column: 1 / -1;
    }
    #discover-posting-wrapper .ds-reel-preview-card .ds-card-body {
        position: static;
    }
}

@media (max-width: 1080px) {
    #discover-posting-wrapper .ds-page-grid--video,
    #discover-posting-wrapper .ds-page-grid--reel,
    #discover-posting-wrapper .ds-page-grid--community {
        grid-template-columns: 1fr;
    }
    #discover-posting-wrapper {
        padding: 12px;
    }
    #discover-posting-wrapper .ds-studio-stats {
        min-width: 0;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }
    #discover-posting-wrapper .ds-upload-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 740px) {
    #discover-posting-wrapper .ds-studio-title {
        font-size: 18px;
    }
    #discover-posting-wrapper .ds-mini-card {
        padding: 9px 10px;
    }
    #discover-posting-wrapper .ds-type-tab {
        min-width: 140px;
        padding: 8px 10px;
    }
    #discover-posting-wrapper .ds-phone-shell {
        width: 210px;
    }
}
