/**
 * YouTube Downloader - Styles
 * نسخه یکپارچه با Social Media Downloader
 * با حفظ کامل ساختار قبلی
 */

/* ============================================
   Font Face - Yekan_Bakh
   ============================================ */
@font-face {
    font-family: 'Yekan_Bakh';
    src: local('Yekan_Bakh'), local('YekanBakh'), local('Yekan Bakh'), local('Yekan');
    font-display: swap;
}

/* ============================================
   متغیرهای رنگی (Variables مشترک)
   ============================================ */
:root {
    /* YouTube Colors */
    --ytd-youtube-red: #FF0000;
    --ytd-youtube-red-dark: #cc0000;
    
    /* رنگ‌های مشترک با Social Media Downloader */
    --ytd-text-color: #2c3e50;
    --ytd-text-secondary: #7f8c8d;
    --ytd-border-color: #e0e6ed;
    --ytd-bg-color: #ffffff;
    --ytd-input-bg: #f8f9fa;
    --ytd-shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --ytd-shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --ytd-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --ytd-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* رنگ‌های قدیمی (حفظ شده برای سازگاری) */
    --ytd-primary: #3498db;
    --ytd-primary-dark: #2980b9;
    --ytd-success: #27ae60;
    --ytd-success-dark: #229954;
    --ytd-warning: #f39c12;
    --ytd-warning-dark: #e67e22;
    --ytd-danger: #e74c3c;
    --ytd-info: #3498db;
    --ytd-telegram: #0088cc;
    --ytd-instant: #3498db;
    --ytd-audio: #9b59b6;
    --ytd-gray: #95a5a6;
    --ytd-dark: #2c3e50;
    --ytd-light: #ecf0f1;
    --ytd-border: #bdc3c7;
    --ytd-shadow: rgba(0, 0, 0, 0.1);
}

/* ============================================
   Container اصلی
   ============================================ */
.ytd-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0;
    font-family: 'Yekan_Bakh', Tahoma, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ytd-header {
    margin-bottom: 20px;
}

.ytd-header h3 {
    color: var(--ytd-dark);
    font-size: 24px;
    margin: 0 0 20px 0;
    font-weight: 600;
}

/* ============================================
   Brand (Logo + Title)
   ============================================ */
.ytd-brand {
    text-align: center;
    margin-bottom: 25px;
}

.ytd-logo {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.ytd-title {
    color: var(--ytd-dark);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

/* ============================================
   Header یکپارچه (جدید - بدون تداخل با قدیمی)
   ============================================ */
.ytd-unified-header {
    text-align: center;
    padding: 40px 20px 32px;
    position: relative;
    margin-bottom: 14px;
    background: transparent;
}

.ytd-header-bg {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    opacity: 0.08;
    pointer-events: none;
}

.ytd-header-bg img {
    width: 450px;
    height: auto;
    display: block;
}

.ytd-header-logo {
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
}

.ytd-header-logo picture {
    display: inline-block;
}

.ytd-header-logo img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.12));
    transition: var(--ytd-transition);
}

.ytd-header-logo img:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.18));
}

.ytd-header-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--ytd-text-color);
    margin: 24px 0 12px;
    padding: 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.ytd-header-desc {
    font-size: 16px;
    color: var(--ytd-text-secondary);
    margin: 12px 0 0;
    padding: 0;
    line-height: 1.5;
}

/* ============================================
   فرم جستجو - کادر 1 (بهبود یافته)
   ============================================ */
.ytd-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.ytd-form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* حذف label قدیمی */
.ytd-label {
    display: none;
}

/* Input مستطیل شکل */
.ytd-input-group {
    display: flex;
    gap: 0;
}

.ytd-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    direction: ltr;
    text-align: left;
    width: 100%;
}

.ytd-input::placeholder {
    direction: ltr;
    text-align: left;
    color: #999;
}

.ytd-input:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

/* ============================================
   Form یکپارچه (بهبودهای جدید)
   ============================================ */
.ytd-unified-form {
    background: var(--ytd-bg-color);
    border: 1px solid var(--ytd-border-color);
    border-radius: 12px;
    padding: 10px 4px 8px 4px;
    box-shadow: var(--ytd-shadow-md);
    transition: var(--ytd-transition);
}

.ytd-unified-form:hover {
    box-shadow: var(--ytd-shadow-lg);
}

.ytd-unified-form .ytd-form-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.ytd-unified-form .ytd-input {
    background: var(--ytd-input-bg);
    border: 2px solid var(--ytd-border-color);
    border-radius: 6px !important;
    height: 52px;
    padding: 14px 18px;
    font-size: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
    margin: 0;
    direction: ltr;
    text-align: left !important;
    transition: var(--ytd-transition);
}

.ytd-unified-form .ytd-input:focus {
    border-color: var(--ytd-youtube-red);
    background: var(--ytd-input-bg);
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.08);
    transform: translateY(-1px);
}

.ytd-unified-form .ytd-input:hover:not(:focus) {
    border-color: #c8cdd5;
}

.ytd-unified-form .ytd-btn-download {
    position: relative;
    width: 50%;
    height: 52px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--ytd-youtube-red) 0%, var(--ytd-youtube-red-dark) 100%);
    box-shadow: var(--ytd-shadow-sm);
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: white;
    transition: var(--ytd-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.ytd-unified-form .ytd-btn-download:hover:not(.loading) {
    background: linear-gradient(135deg, var(--ytd-youtube-red-dark) 0%, #990000 100%);
    box-shadow: var(--ytd-shadow-lg);
    transform: translateY(-2px);
}

/* متن و اسپینر کنار هم در مرکز */
.ytd-unified-form .ytd-btn-spinner {
    display: none !important;
    color: white;
    margin-left: 3px;
}

.ytd-unified-form .ytd-btn-text {
    display: inline-block;
    color: white;
    transition: opacity 0.3s ease;
}

.ytd-unified-form .ytd-btn-download.loading {
    cursor: not-allowed;
    background: #95a5a6 !important;
}

.ytd-unified-form .ytd-btn-download.loading .ytd-btn-text {
    color: white;
}

.ytd-unified-form .ytd-btn-download.loading .ytd-btn-spinner {
    display: inline-flex !important;
    color: white;
}

.ytd-unified-text {
    text-align: center;
    font-size: 13px;
    color: var(--ytd-text-secondary);
    margin: 8px 0 0;
    padding: 0;
}

/* ============================================
   دکمه‌ها - استایل پایه
   ============================================ */
.ytd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ytd-transition);
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: var(--ytd-shadow-sm);
}

.ytd-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--ytd-shadow-md);
}

.ytd-btn:active {
    transform: translateY(0);
    box-shadow: var(--ytd-shadow-sm);
}

.ytd-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

/* ============================================
   انواع دکمه‌ها
   ============================================ */

/* دکمه اصلی (جستجو) */
.ytd-btn-primary {
    background: var(--ytd-primary);
}

.ytd-btn-primary:hover {
    background: var(--ytd-primary-dark);
}

/* دکمه دانلود - گرادیانت YouTube */
.ytd-btn-download {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.ytd-btn-download:hover {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.ytd-btn-download:active {
    transform: translateY(0);
}

/* حالت Loading */
.ytd-btn-download.loading {
    background: #95a5a6;
    cursor: not-allowed;
    pointer-events: none;
}

.ytd-btn-download.loading:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

/* Spinner Icon */
.ytd-spinner-icon {
    width: 20px;
    height: 20px;
    color: white !important;
}

.ytd-unified-form .ytd-spinner-icon {
    width: 24px;
    height: 24px;
    color: white !important;
}

.ytd-btn-text {
    flex: 1;
}

.ytd-btn-icon {
    font-size: 18px;
}

/* دکمه دانلود فوری (360p) */
.ytd-btn-instant {
    background: var(--ytd-instant);
    min-width: 140px;
}

.ytd-btn-instant:hover {
    background: var(--ytd-primary-dark);
}

/* دکمه پردازش (480p, 720p) */
.ytd-btn-process {
    background: var(--ytd-warning);
    min-width: 140px;
}

.ytd-btn-process:hover {
    background: var(--ytd-warning-dark);
}

/* دکمه در حال پردازش - Inline Progress Bar */
.ytd-btn-processing {
    background: var(--ytd-warning) !important;
    cursor: not-allowed !important;
    position: relative;
    min-width: 160px;
}

.ytd-btn-processing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: var(--ytd-warning-dark);
    transition: width 0.5s ease;
    z-index: 0;
    border-radius: 8px;
}

.ytd-btn-processing .ytd-btn-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ytd-btn-processing:hover {
    transform: none;
}

/* انیمیشن pulse برای دکمه در حال پردازش */
@keyframes ytd-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.ytd-btn-processing {
    animation: ytd-pulse 2s infinite;
}

/* دکمه موفقیت */
.ytd-btn-success {
    background: var(--ytd-success) !important;
    min-width: 160px;
}

.ytd-btn-success:hover {
    background: var(--ytd-success-dark) !important;
}

/* دکمه تلگرام */
.ytd-btn-telegram {
    background: var(--ytd-telegram);
    min-width: 140px;
}

.ytd-btn-telegram:hover {
    background: #007ab8;
}

/* دکمه صوتی */
.ytd-btn-audio {
    background: var(--ytd-audio);
    min-width: 140px;
}

.ytd-btn-audio:hover {
    background: #8e44ad;
}

/* ============================================
   عناصر دکمه
   ============================================ */
.ytd-btn-emoji {
    font-size: 18px;
    line-height: 1;
}

.ytd-btn-label {
    font-weight: 600;
}

.ytd-btn-size {
    font-size: 12px;
    opacity: 0.9;
}

.ytd-btn-quality {
    font-weight: 600;
}

.ytd-btn-progress {
    font-size: 13px;
    opacity: 0.95;
}

/* ============================================
   Header ویدیو (Thumbnail + Title)
   ============================================ */
.ytd-video-header {
    margin-bottom: 30px;
    text-align: center;
}

.ytd-thumbnail-container {
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--ytd-shadow);
}

.ytd-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    max-width: 640px;
    margin: 0 auto;
}

.ytd-video-title {
    color: var(--ytd-dark);
    font-size: 22px;
    font-weight: 600;
    margin: 20px 20px 25px 20px;
    line-height: 1.4;
}

/* ============================================
   Content Boxes (کادرهای محتوا)
   ============================================ */
.ytd-content-box {
    margin-bottom: 20px;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--ytd-border-color);
    box-shadow: var(--ytd-shadow-md);
    transition: var(--ytd-transition);
}

.ytd-content-box:hover {
    box-shadow: var(--ytd-shadow-lg);
    border-color: rgba(255, 0, 0, 0.1);
}

/* ============================================
   Sections (ویدیو / صوتی / توضیحات)
   ============================================ */
.ytd-section {
    margin-bottom: 25px;
    padding: 0;
    background: transparent;
}

.ytd-section-title {
    color: var(--ytd-dark);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   Grid دکمه‌ها
   ============================================ */
.ytd-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

@media (max-width: 768px) {
    .ytd-buttons-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

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

/* ============================================
   توضیحات ویدیو
   ============================================ */
.ytd-description {
    color: #555;
    line-height: 1.8;
    font-size: 14px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--ytd-border);
}

/* ============================================
   Loading
   ============================================ */
.ytd-loading {
    text-align: center;
    padding: 30px 20px;
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.ytd-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--ytd-light);
    border-top-color: var(--ytd-primary);
    border-radius: 50%;
    animation: ytd-spin 1s linear infinite;
}

@keyframes ytd-spin {
    to { transform: rotate(360deg); }
}

.ytd-loading p {
    color: var(--ytd-gray);
    font-size: 16px;
}

.ytd-progress {
    width: 100%;
    height: 4px;
    background: var(--ytd-light);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 15px;
}

.ytd-progress-bar {
    height: 100%;
    background: var(--ytd-primary);
    animation: ytd-progress 1.5s ease-in-out infinite;
}

@keyframes ytd-progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ============================================
   پیام‌ها
   ============================================ */
.ytd-error,
.ytd-success,
.ytd-info {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: ytd-slideIn 0.3s ease;
}

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

.ytd-error {
    background: #ffe5e5;
    color: var(--ytd-danger);
    border: 1px solid var(--ytd-danger);
}

.ytd-success {
    background: #e8f8f5;
    color: var(--ytd-success);
    border: 1px solid var(--ytd-success);
}

.ytd-info {
    background: #e3f2fd;
    color: var(--ytd-info);
    border: 1px solid var(--ytd-info);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .ytd-header {
        padding: 24px 15px 16px;
        margin-bottom: 18px;
    }
    
    .ytd-title h2 {
        font-size: 24px;
    }
    
    .ytd-description p {
        font-size: 14px;
    }
    
    .ytd-form {
        padding: 22px 18px;
    }
    
    .ytd-url-input {
        height: 50px;
        font-size: 14px;
        padding: 13px 16px;
    }
    
    .ytd-button {
        height: 50px;
        font-size: 16px;
        padding: 13px 18px;
    }
    
    .ytd-container {
        padding: 15px;
        margin: 10px;
        border-radius: 8px;
    }
    
    .ytd-section {
        padding: 15px;
    }
    
    .ytd-section-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .ytd-wrapper {
        margin: 10px auto;
    }
    
    .ytd-container {
        padding: 0 12px;
        margin: 5px;
    }
    
    .ytd-header {
        padding: 20px 12px 12px;
        margin-bottom: 16px;
    }
    
    .ytd-image img {
        width: 80px;
        height: 80px;
    }
    
    .ytd-title {
        margin: 16px 0 8px;
    }
    
    .ytd-title h2 {
        font-size: 22px;
    }
    
    .ytd-description {
        margin: 8px 0;
    }
    
    .ytd-form {
        padding: 18px 16px;
        border-radius: 8px;
    }
    
    .ytd-url-input {
        height: 48px;
        font-size: 14px;
        padding: 12px 14px;
        border-radius: 6px !important;
    }
    
    .ytd-button {
        width: 80%;
        height: 48px;
        font-size: 15px;
        padding: 12px 16px;
        border-radius: 6px !important;
    }
    
    .ytd-text {
        font-size: 12px;
    }
    
    .ytd-btn-size {
        font-size: 11px;
    }
}

/* ============================================
   Accessibility
   ============================================ */
.ytd-btn:focus,
.ytd-input:focus {
    outline: 2px solid var(--ytd-primary);
    outline-offset: 2px;
}

/* برای screen readers */
.ytd-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .ytd-btn,
    .ytd-form-container {
        display: none;
    }
    
    .ytd-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   RTL Support
   ============================================ */
[dir="rtl"] .ytd-input {
    direction: ltr;
    text-align: right;
}

/* ============================================
   Video Preview با Play Button
   ============================================ */

.ytd-video-preview-wrapper {
    margin: 20px 3px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--ytd-shadow);
}

/* Preview Badge - همیشه بالای ویدیو */
.ytd-preview-badge {
    background: rgb(211, 201, 255);
    color: #4a3f91;
    padding: 12px 20px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    border-bottom: 2px solid rgb(201, 191, 245);
}

.ytd-thumbnail-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ytd-thumbnail-container:hover {
    transform: scale(1.02);
}

/* Play Overlay */
.ytd-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.ytd-thumbnail-container:hover .ytd-play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Play Button Image */
.ytd-play-button {
    width: 80px;
    height: 80px;
    opacity: 0.9;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    cursor: pointer;
}

.ytd-thumbnail-container:hover .ytd-play-button {
    opacity: 1;
    transform: scale(1.1);
}

/* Preview Info */
.ytd-preview-info {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* Video Player */
.ytd-video-player-container {
    overflow: hidden;
}

.ytd-video-player {
    width: 100%;
    display: block;
    background: #000;
    max-height: 500px;
}

/* Loading Animation برای Video */
.ytd-video-player:not([src]) {
    position: relative;
}

.ytd-video-player:not([src])::before {
    content: '⏳ در حال بارگذاری...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 8px;
}

/* Responsive برای Video Preview */
@media (max-width: 768px) {
    .ytd-video-preview-wrapper {
        margin: 15px 3px;
    }
    
    .ytd-play-button {
        width: 60px;
        height: 60px;
    }
    
    .ytd-preview-badge {
        font-size: 12px;
        padding: 10px 16px;
    }
    
    .ytd-video-title {
        font-size: 18px;
        margin: 15px 15px 20px 15px;
    }
}

@media (max-width: 480px) {
    .ytd-video-preview-wrapper {
        margin: 10px 2px;
    }
    
    .ytd-play-button {
        width: 50px;
        height: 50px;
    }
    
    .ytd-preview-badge {
        font-size: 11px;
        padding: 8px 12px;
    }
    
    .ytd-video-title {
        font-size: 16px;
        margin: 10px 10px 15px 10px;
    }
}

/* ============================================
   Responsive برای Header و Form یکپارچه
   ============================================ */
@media (max-width: 768px) {
    .ytd-unified-header {
        padding: 32px 16px 24px;
        margin-bottom: 10px;
    }
    
    .ytd-header-bg img {
        width: 350px;
    }
    
    .ytd-header-logo img {
        width: 95px;
        height: 95px;
    }
    
    .ytd-header-title {
        font-size: 28px;
        margin: 20px 0 10px;
    }
    
    .ytd-header-desc {
        font-size: 15px;
    }
    
    .ytd-unified-form {
        padding: 8px 2px 6px 2px;
    }
    
    .ytd-unified-form .ytd-input {
        height: 50px;
        font-size: 14px;
        padding: 13px 16px;
    }
    
    .ytd-unified-form .ytd-btn-download {
        width: 60%;
        height: 50px;
        font-size: 15px;
        padding: 13px 18px;
    }
    
    .ytd-content-box {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .ytd-unified-header {
        padding: 24px 12px 20px;
        margin-bottom: 8px;
    }
    
    .ytd-header-bg img {
        width: 280px;
    }
    
    .ytd-header-logo img {
        width: 85px;
        height: 85px;
    }
    
    .ytd-header-title {
        font-size: 24px;
        margin: 18px 0 8px;
    }
    
    .ytd-header-desc {
        font-size: 14px;
        margin: 10px 0 0;
    }
    
    .ytd-unified-form {
        padding: 6px 2px 6px 2px;
    }
    
    .ytd-unified-form .ytd-input {
        height: 48px;
        font-size: 14px;
        padding: 12px 14px;
    }
    
    .ytd-unified-form .ytd-btn-download {
        width: 70%;
        height: 48px;
        font-size: 15px;
        padding: 12px 16px;
    }
    
    .ytd-unified-text {
        font-size: 12px;
    }
    
    .ytd-content-box {
        padding: 18px;
    }
}

/* ============================================
   Dark Mode Support (اختیاری)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .ytd-container {
        background: #1e1e1e;
        color: #e0e0e0;
    }
    
    .ytd-form-container,
    .ytd-section {
        background: #2a2a2a;
    }
    
    .ytd-input {
        background: #2a2a2a;
        color: #e0e0e0;
        border-color: #444;
    }
    
    .ytd-video-title,
    .ytd-section-title,
    .ytd-header h3 {
        color: #e0e0e0;
    }
    
    .ytd-description {
        background: #2a2a2a;
        color: #b0b0b0;
        border-color: #444;
    }
}