.iht-yt-wrap {
    --yt-bg:      #0d0d12;
    --yt-card:    #16161f;
    --yt-input:   #1e1e2a;
    --yt-border:  #2a2a38;
    --yt-text:    #f0f0f5;
    --yt-muted:   #8888a0;
    --yt-accent:  #ef4444; 
    --yt-accent2: #f97316;
    background: var(--yt-bg); border-radius: 24px; max-width: 600px; margin: 32px auto;
    color: var(--yt-text); box-shadow: 0 0 0 1px var(--yt-border), 0 32px 80px rgba(0,0,0,0.6);
    position: relative; overflow: hidden; font-family: 'Inter', sans-serif;
}
.iht-yt-wrap::before {
    content: ''; position: absolute; top: -100px; right: -100px; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(239,68,68,0.1) 0%, transparent 70%); pointer-events: none;
}
.iht-yt-header { display: flex; align-items: center; gap: 16px; padding: 24px 30px; border-bottom: 1px solid var(--yt-border); background: var(--yt-card); position: relative; }
.iht-yt-icon { width: 48px; height: 48px; background: linear-gradient(135deg, var(--yt-accent), var(--yt-accent2)); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; flex-shrink: 0; box-shadow: 0 4px 16px rgba(239,68,68,0.3); }
.iht-yt-title { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.iht-yt-subtitle { font-size: 13px; color: var(--yt-muted); margin: 0; }
.iht-yt-body { padding: 30px; }
.iht-yt-input-group { margin-bottom: 20px; }
.iht-yt-input-group input { width: 100%; background: var(--yt-input); border: 1px solid var(--yt-border); border-radius: 14px; padding: 18px 20px; color: #fff; font-size: 15px; outline: none; transition: 0.2s; box-sizing: border-box; }
.iht-yt-input-group input:focus { border-color: var(--yt-accent); box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.iht-yt-actions { display: flex; gap: 12px; }
.yt-btn { flex: 1; border: none; border-radius: 14px; padding: 16px; font-size: 15px; font-weight: 700; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; }
.yt-btn-analyze { background: linear-gradient(135deg, #a855f7, #ec4899); box-shadow: 0 4px 12px rgba(168,85,247,0.25); }
.yt-btn:hover { opacity: 0.9; transform: translateY(-2px); }
.yt-btn:disabled { opacity: 0.5; cursor: wait; transform: none; }
.iht-yt-result { margin-top: 24px; padding: 20px; border-radius: 14px; background: var(--yt-input); border: 1px solid var(--yt-border); animation: yt-fadein 0.3s ease; }
.iht-yt-result.error { text-align: center; background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #fca5a5; }

/* =========================================================
   КАРТОЧКА ПРЕВЬЮ ВИДЕО
   ========================================================= */
.yt-preview-card {
    display: flex;
    gap: 16px;
    background: rgba(0,0,0,0.15);
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 24px;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.05);
}
.yt-preview-img {
    width: 140px;
    height: 78px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    flex-shrink: 0;
}
.yt-preview-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 480px) {
    .yt-preview-card { flex-direction: column; text-align: center; padding: 16px; }
    .yt-preview-img { width: 100%; height: auto; aspect-ratio: 16/9; }
}

/* =========================================================
   КНОПКИ РЕЗУЛЬТАТОВ (КОМПАКТНАЯ СЕТКА)
   ========================================================= */
.format-btn { 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    padding: 8px 4px; border-radius: 10px; color: #fff; text-decoration: none; 
    transition: 0.2s; border: none; cursor: pointer; text-align: center; gap: 4px;
    box-sizing: border-box;
}
.format-btn:hover { opacity: 0.9; transform: translateY(-2px); }
.format-btn-title { font-size: 13px; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.format-btn-desc { font-size: 10px; font-weight: 600; opacity: 0.85; }

/* 0. Только Аудио (Фиолетовый) */
.btn-audio { background: linear-gradient(135deg, #a855f7, #8b5cf6); box-shadow: 0 4px 10px rgba(168,85,247,0.2); }

/* 1. 1080p / 4K (Малиновый) */
.btn-vid-1080-aud { background: linear-gradient(135deg, #ec4899, #e11d48); box-shadow: 0 4px 10px rgba(236,72,153,0.2); }
.btn-vid-1080-mut { background: linear-gradient(135deg, #831843, #4c0519); border: 1px solid #be123c; color: #fda4af; }

/* 2. 720p (Оранжевый) */
.btn-vid-720-aud { background: linear-gradient(135deg, #f97316, #ea580c); box-shadow: 0 4px 10px rgba(249,115,22,0.2); }
.btn-vid-720-mut { background: linear-gradient(135deg, #7c2d12, #431407); border: 1px solid #9a3412; color: #fdba74; }

/* 3. 480p (Зеленый) */
.btn-vid-480-aud { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 10px rgba(16,185,129,0.2); }
.btn-vid-480-mut { background: linear-gradient(135deg, #064e3b, #022c22); border: 1px solid #065f46; color: #6ee7b7; }

/* 4. 360p (Синий) */
.btn-vid-360-aud { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 4px 10px rgba(59,130,246,0.2); }
.btn-vid-360-mut { background: linear-gradient(135deg, #1e3a8a, #172554); border: 1px solid #1e40af; color: #93c5fd; }

/* 5. 240p (Бирюзовый / Cyan) */
.btn-vid-240-aud { background: linear-gradient(135deg, #06b6d4, #0891b2); box-shadow: 0 4px 10px rgba(6,182,212,0.2); }
.btn-vid-240-mut { background: linear-gradient(135deg, #164e63, #083344); border: 1px solid #155e75; color: #67e8f9; }

/* 6. 144p и ниже (Серый / Slate) */
.btn-vid-144-aud { background: linear-gradient(135deg, #64748b, #475569); box-shadow: 0 4px 10px rgba(100,116,139,0.2); }
.btn-vid-144-mut { background: linear-gradient(135deg, #334155, #0f172a); border: 1px solid #475569; color: #cbd5e1; }

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