/* ============================================
   Twitter Video Downloader
   Prefix: tvd-
   Dark mode support / Light mode default
   ============================================ */

:root {
    --tvd-primary: #3399cc;
    --tvd-primary-light: rgba(51, 153, 204, 0.10);
    --tvd-primary-dark: #2277aa;
    --tvd-shadow-primary: 0 4px 14px rgba(51, 153, 204, 0.22);
    --tvd-shadow-primary-hover: 0 6px 20px rgba(51, 153, 204, 0.32);

    --tvd-bg: #f4f7fb;
    --tvd-bg-elevated: #ffffff;
    --tvd-bg-secondary: #f1f5f9;
    --tvd-bg-tertiary: #e2e8f0;

    --tvd-text: #1e293b;
    --tvd-text-secondary: #475569;
    --tvd-text-muted: #64748b;

    --tvd-border: #e2e8f0;
    --tvd-input-bg: #ffffff;
    --tvd-input-border: #e2e8f0;

    --tvd-shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
    --tvd-shadow-md: 0 4px 12px rgba(0,0,0,0.09);

    --tvd-radius-sm: 6px;
    --tvd-radius-md: 12px;
    --tvd-radius-lg: 16px;
    --tvd-radius-full: 9999px;

    --tvd-success: #339966;
    --tvd-success-light: rgba(51,153,102,0.1);
    --tvd-danger: #e64e4e;
    --tvd-danger-light: rgba(230,78,78,0.1);
    --tvd-audio-color: #7c3aed;
    --tvd-audio-light: rgba(124,58,237,0.10);

    --tvd-transition: 0.22s ease;
}

[data-theme="dark"] {
    --tvd-primary: #60b5f0;
    --tvd-primary-light: rgba(96, 181, 240, 0.13);
    --tvd-primary-dark: #3399cc;
    --tvd-shadow-primary: 0 4px 14px rgba(96,181,240,0.18);
    --tvd-shadow-primary-hover: 0 6px 20px rgba(96,181,240,0.28);

    --tvd-bg: #0f172a;
    --tvd-bg-elevated: #1e293b;
    --tvd-bg-secondary: #334155;
    --tvd-bg-tertiary: #475569;

    --tvd-text: #f1f5f9;
    --tvd-text-secondary: #cbd5e1;
    --tvd-text-muted: #94a3b8;

    --tvd-border: #334155;
    --tvd-input-bg: #1e293b;
    --tvd-input-border: #475569;

    --tvd-shadow-sm: 0 1px 3px rgba(0,0,0,0.30);
    --tvd-shadow-md: 0 4px 12px rgba(0,0,0,0.38);
    --tvd-danger-light: rgba(248,113,113,0.12);
    --tvd-success-light: rgba(94,201,144,0.12);
    --tvd-audio-light: rgba(167,139,250,0.12);
    --tvd-audio-color: #a78bfa;
}

/* Override tool-main from custom_styles.css */
.tool-main {
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.tool-container {
    max-width: 960px;
    padding: 28px 20px 48px;
}

/* Header */
.tool-header {
    text-align: center;
    margin-bottom: 32px;
}

.tvd-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.tvd-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--tvd-radius-md);
    background: var(--tvd-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tvd-primary);
    flex-shrink: 0;
}

.tvd-icon-wrap i, .tvd-icon-wrap svg { width: 26px; height: 26px; }

.tool-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--tvd-primary);
    margin: 0;
    letter-spacing: -0.4px;
}

.tool-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--tvd-text-secondary);
}

.tool-description a { color: var(--tvd-primary); text-decoration: none; font-weight: 500; }
.tool-description a:hover { text-decoration: underline; }

/* Input card */
.tvd-input-card {
    background: var(--tvd-bg-elevated);
    border: 1px solid var(--tvd-border);
    border-radius: var(--tvd-radius-lg);
    padding: 28px 28px 22px;
    box-shadow: var(--tvd-shadow-md);
    margin: 0 auto 20px;
}

.tvd-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--tvd-text);
    margin-bottom: 14px;
}

.tvd-input-label i, .tvd-input-label svg { color: var(--tvd-primary); width: 17px; height: 17px; }

.tvd-input-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
}

.tvd-input-field {
    flex: 1;
    padding: 13px 16px;
    border: 2px solid var(--tvd-input-border);
    border-radius: var(--tvd-radius-md);
    font-size: 14.5px;
    font-family: inherit;
    background: var(--tvd-input-bg);
    color: var(--tvd-text);
    outline: none;
    transition: border-color var(--tvd-transition), box-shadow var(--tvd-transition);
    min-width: 0;
}

.tvd-input-field:focus {
    border-color: var(--tvd-primary);
    box-shadow: 0 0 0 3px var(--tvd-primary-light);
}

.tvd-input-field::placeholder { color: var(--tvd-text-muted); opacity: 0.7; font-size: 13px; }

.tvd-icon-btn {
    flex: 0 0 auto;
    width: 46px;
    background: var(--tvd-bg-secondary);
    border: 2px solid var(--tvd-border);
    border-radius: var(--tvd-radius-md);
    color: var(--tvd-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tvd-transition);
}

.tvd-icon-btn:hover { background: var(--tvd-primary-light); border-color: var(--tvd-primary); color: var(--tvd-primary); }
.tvd-icon-btn i, .tvd-icon-btn svg { width: 17px; height: 17px; }

.tvd-fetch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--tvd-radius-md);
    background: var(--tvd-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--tvd-transition);
    box-shadow: var(--tvd-shadow-primary);
    margin-top: 10px;
    font-family: inherit;
}

.tvd-fetch-btn:hover:not(:disabled) { background: var(--tvd-primary-dark); box-shadow: var(--tvd-shadow-primary-hover); transform: translateY(-1px); }
.tvd-fetch-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.tvd-fetch-btn i, .tvd-fetch-btn svg { width: 19px; height: 19px; }

.tvd-hints {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 14px;
}

.tvd-hint { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--tvd-text-muted); }
.tvd-hint i, .tvd-hint svg { color: var(--tvd-success); width: 13px; height: 13px; }

/* Format tags */
.tvd-formats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--tvd-border);
}

.tvd-formats-label { font-size: 12px; color: var(--tvd-text-muted); }

.tvd-format-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--tvd-bg-secondary);
    color: var(--tvd-text-secondary);
    border-radius: var(--tvd-radius-full);
    font-size: 11.5px;
    font-weight: 600;
}

.tvd-format-tag i, .tvd-format-tag svg { width: 12px; height: 12px; }
.tvd-format-tag.tag-mp4 { background: rgba(51,153,204,0.1); color: var(--tvd-primary); }
.tvd-format-tag.tag-gif { background: rgba(51,153,102,0.1); color: var(--tvd-success); }
.tvd-format-tag.tag-mp3 { background: var(--tvd-audio-light); color: var(--tvd-audio-color); }

/* Loading */
.tvd-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.tvd-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid var(--tvd-border);
    border-top-color: var(--tvd-primary);
    border-radius: 50%;
    margin: 0 auto 18px;
    animation: tvd-spin 0.75s linear infinite;
}

@keyframes tvd-spin { to { transform: rotate(360deg); } }
.tvd-loading-text { font-size: 15px; font-weight: 600; color: var(--tvd-text); margin: 0 0 4px; }
.tvd-loading-sub { font-size: 13px; color: var(--tvd-text-muted); margin: 0; }

/* Error */
.tvd-error {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    background: var(--tvd-danger-light);
    border-radius: var(--tvd-radius-md);
    margin-bottom: 16px;
    animation: tvd-fadeup 0.25s ease;
}

.tvd-error-inner { display: flex; align-items: flex-start; gap: 10px; flex: 1; }
.tvd-error-inner > i, .tvd-error-inner > svg { color: var(--tvd-danger); flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.tvd-error-msg { font-size: 13.5px; line-height: 1.5; font-weight: 500; color: var(--tvd-danger); }
.tvd-error-msg a { color: var(--tvd-danger); font-weight: 600; text-decoration: underline; }

.tvd-error-dismiss {
    display: flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    border: none; background: transparent; color: var(--tvd-danger);
    cursor: pointer; border-radius: var(--tvd-radius-sm);
    opacity: 0.6; transition: opacity var(--tvd-transition); flex-shrink: 0;
}
.tvd-error-dismiss:hover { opacity: 1; }
.tvd-error-dismiss i, .tvd-error-dismiss svg { width: 15px; height: 15px; }

/* Results */
@keyframes tvd-fadeup {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tvd-results { animation: tvd-fadeup 0.35s ease; }

.tvd-result-card {
    background: var(--tvd-bg-elevated);
    border: 1px solid var(--tvd-border);
    border-radius: var(--tvd-radius-lg);
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: var(--tvd-shadow-sm);
}

.tvd-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.tvd-result-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--tvd-success);
    margin: 0;
}

.tvd-result-title i, .tvd-result-title svg { width: 18px; height: 18px; }

.tvd-new-url-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    background: var(--tvd-bg-secondary);
    border: 1px solid var(--tvd-border);
    border-radius: var(--tvd-radius-full);
    font-size: 12.5px;
    color: var(--tvd-text-muted);
    cursor: pointer;
    transition: all var(--tvd-transition);
    font-family: inherit;
}

.tvd-new-url-btn:hover { border-color: var(--tvd-primary); color: var(--tvd-primary); }
.tvd-new-url-btn i, .tvd-new-url-btn svg { width: 13px; height: 13px; }

/* Author row */
.tvd-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tvd-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--tvd-bg-secondary);
}

.tvd-author-name { font-size: 13.5px; font-weight: 600; color: var(--tvd-text); line-height: 1.2; }
.tvd-author-handle { font-size: 12px; color: var(--tvd-text-muted); line-height: 1.2; }

.tvd-tweet-text {
    font-size: 13px;
    line-height: 1.55;
    color: var(--tvd-text-secondary);
    background: var(--tvd-bg-secondary);
    border-radius: var(--tvd-radius-sm);
    padding: 10px 12px;
    margin-bottom: 16px;
}

/* Preview */
.tvd-preview-wrap {
    position: relative;
    max-width: 440px;
    margin: 0 auto 16px;
    border-radius: var(--tvd-radius-md);
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.tvd-preview-img {
    width: 100%; height: auto;
    display: block;
    max-height: 280px;
    object-fit: contain;
}

.tvd-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.28);
    color: #fff;
    transition: background var(--tvd-transition);
}

.tvd-play-overlay:hover { background: rgba(0,0,0,0.42); }
.tvd-play-overlay i, .tvd-play-overlay svg { width: 52px; height: 52px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }

/* Video info row */
.tvd-video-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tvd-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--tvd-text-muted);
}

.tvd-meta-item i, .tvd-meta-item svg { color: var(--tvd-primary); width: 14px; height: 14px; }

/* Download buttons */
.tvd-dl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 12px;
}

.tvd-dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 16px;
    border: none;
    border-radius: var(--tvd-radius-md);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--tvd-transition);
    font-family: inherit;
    white-space: nowrap;
}

.tvd-dl-btn i, .tvd-dl-btn svg { width: 16px; height: 16px; }
.tvd-dl-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.tvd-dl-mp4 {
    background: var(--tvd-primary);
    color: #fff;
    box-shadow: var(--tvd-shadow-primary);
    grid-column: 1 / -1;
}

.tvd-dl-mp4:hover:not(:disabled) { background: var(--tvd-primary-dark); transform: translateY(-1px); }

.tvd-dl-gif {
    background: var(--tvd-success-light);
    color: var(--tvd-success);
    border: 1px solid rgba(51,153,102,0.25);
}

.tvd-dl-gif:hover:not(:disabled) { background: var(--tvd-success); color: #fff; }

.tvd-dl-mp3 {
    background: var(--tvd-audio-light);
    color: var(--tvd-audio-color);
    border: 1px solid rgba(124,58,237,0.2);
}

.tvd-dl-mp3:hover:not(:disabled) { background: var(--tvd-audio-color); color: #fff; }

/* GIF settings panel */
.tvd-gif-panel {
    background: var(--tvd-bg-secondary);
    border: 1px solid var(--tvd-border);
    border-radius: var(--tvd-radius-md);
    padding: 16px;
    margin-top: 4px;
    margin-bottom: 4px;
    animation: tvd-fadeup 0.2s ease;
}

.tvd-gif-panel-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tvd-text);
    margin-bottom: 12px;
}

.tvd-gif-panel-title i, .tvd-gif-panel-title svg { color: var(--tvd-primary); width: 15px; height: 15px; }

.tvd-gif-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.tvd-select-wrap label {
    display: block;
    font-size: 11.5px;
    color: var(--tvd-text-muted);
    margin-bottom: 5px;
    font-weight: 500;
}

.tvd-select-wrap select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--tvd-border);
    border-radius: var(--tvd-radius-sm);
    background: var(--tvd-bg-elevated);
    color: var(--tvd-text);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color var(--tvd-transition);
}

.tvd-select-wrap select:focus { border-color: var(--tvd-primary); }

.tvd-gif-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.tvd-btn-cancel {
    padding: 8px 14px;
    border: 1px solid var(--tvd-border);
    border-radius: var(--tvd-radius-sm);
    background: var(--tvd-bg-elevated);
    color: var(--tvd-text-muted);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--tvd-transition);
}

.tvd-btn-cancel:hover { background: var(--tvd-bg-tertiary); }

.tvd-btn-convert {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--tvd-radius-sm);
    background: var(--tvd-success);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--tvd-transition);
}

.tvd-btn-convert:hover:not(:disabled) { filter: brightness(1.1); }
.tvd-btn-convert:disabled { opacity: 0.6; cursor: not-allowed; }
.tvd-btn-convert i, .tvd-btn-convert svg { width: 14px; height: 14px; }

/* Format note */
.tvd-format-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 13px;
    background: var(--tvd-bg-secondary);
    border-radius: var(--tvd-radius-sm);
    font-size: 12.5px;
    color: var(--tvd-text-muted);
    line-height: 1.55;
    margin-top: 4px;
}

.tvd-format-note i, .tvd-format-note svg { color: var(--tvd-primary); flex-shrink: 0; width: 14px; height: 14px; margin-top: 1px; }
.tvd-format-note a { color: var(--tvd-primary); text-decoration: none; font-weight: 500; }
.tvd-format-note a:hover { text-decoration: underline; }

/* Actions row */
.tvd-result-actions { display: flex; justify-content: center; margin-bottom: 24px; }

.tvd-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border: 1px solid var(--tvd-border);
    border-radius: var(--tvd-radius-md);
    background: var(--tvd-bg-secondary);
    color: var(--tvd-text);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--tvd-transition);
}

.tvd-btn-secondary:hover { background: var(--tvd-bg-tertiary); }
.tvd-btn-secondary i, .tvd-btn-secondary svg { width: 16px; height: 16px; }

/* Spinner animation for buttons */
@keyframes tvd-rotate { to { transform: rotate(360deg); } }
.tvd-spin { animation: tvd-rotate 0.8s linear infinite; }

/* Related tools */
.tvd-related {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: var(--tvd-bg-elevated);
    border: 1px solid var(--tvd-border);
    border-radius: var(--tvd-radius-md);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tvd-related-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tvd-text-muted);
    white-space: nowrap;
}

.tvd-related-label i, .tvd-related-label svg { width: 14px; height: 14px; }
.tvd-related-links { display: flex; flex-wrap: wrap; gap: 7px; }

.tvd-related-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: var(--tvd-radius-full);
    background: var(--tvd-bg-secondary);
    color: var(--tvd-text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--tvd-transition);
}

.tvd-related-link:hover { background: var(--tvd-primary-light); color: var(--tvd-primary); }
.tvd-related-link i, .tvd-related-link svg { width: 13px; height: 13px; }

/* Info sections */
.tvd-info-sections { display: flex; flex-direction: column; gap: 22px; }

.tvd-info-card {
    background: var(--tvd-bg-elevated);
    border: 1px solid var(--tvd-border);
    border-radius: var(--tvd-radius-lg);
    padding: 24px;
    box-shadow: none;
}

.tvd-info-card h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--tvd-text);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tvd-info-card h2 i, .tvd-info-card h2 svg { color: var(--tvd-primary); flex-shrink: 0; width: 22px; height: 22px; }
.tvd-info-card p, .tvd-info-card li { font-size: 14.5px; line-height: 1.7; color: var(--tvd-text-secondary); }
.tvd-info-card p { margin: 0 0 10px; }
.tvd-info-card p:last-child { margin-bottom: 0; }
.tvd-info-card a { color: var(--tvd-primary); text-decoration: none; font-weight: 500; }
.tvd-info-card a:hover { text-decoration: underline; }

/* Steps */
.tvd-steps { margin: 0 0 12px; padding: 0 0 0 22px; }
.tvd-steps li { font-size: 14.5px; line-height: 1.7; color: var(--tvd-text-secondary); margin-bottom: 7px; padding-left: 4px; }

/* Format cards */
.tvd-format-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 12px 0 16px;
}

.tvd-format-card {
    background: var(--tvd-bg-secondary);
    border: 1px solid var(--tvd-border);
    border-radius: var(--tvd-radius-md);
    padding: 16px;
}

.tvd-format-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--tvd-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.tvd-format-card-icon i, .tvd-format-card-icon svg { width: 18px; height: 18px; }
.icon-mp4 { background: rgba(51,153,204,0.1); color: var(--tvd-primary); }
.icon-gif { background: rgba(51,153,102,0.1); color: var(--tvd-success); }
.icon-mp3 { background: var(--tvd-audio-light); color: var(--tvd-audio-color); }

.tvd-format-card h4 { font-size: 13.5px; font-weight: 700; color: var(--tvd-text); margin: 0 0 5px; }
.tvd-format-card p { font-size: 12.5px; color: var(--tvd-text-muted); margin: 0; line-height: 1.5; }

/* Features grid */
.tvd-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.tvd-feature-item {
    background: var(--tvd-bg-secondary);
    border-radius: var(--tvd-radius-md);
    padding: 14px;
}

.tvd-feature-item i, .tvd-feature-item svg { color: var(--tvd-primary); width: 20px; height: 20px; margin-bottom: 8px; display: block; }
.tvd-feature-item h4 { font-size: 13px; font-weight: 700; color: var(--tvd-text); margin: 0 0 4px; }
.tvd-feature-item p { font-size: 12.5px; color: var(--tvd-text-muted); margin: 0; line-height: 1.5; }

/* FAQ */
.tvd-faq-list { display: flex; flex-direction: column; gap: 4px; }

.tvd-faq-item {
    border: 1px solid var(--tvd-border);
    border-radius: var(--tvd-radius-md);
    overflow: hidden;
    transition: border-color var(--tvd-transition);
}

.tvd-faq-item.open { border-color: var(--tvd-primary); }

.tvd-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 18px;
    background: var(--tvd-bg-elevated);
    border: none;
    cursor: pointer;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--tvd-text);
    text-align: left;
    transition: background var(--tvd-transition);
    font-family: inherit;
}

.tvd-faq-question:hover { background: var(--tvd-bg-secondary); }
.tvd-faq-question i, .tvd-faq-question svg { color: var(--tvd-text-muted); transition: transform var(--tvd-transition); flex-shrink: 0; margin-left: 12px; width: 18px; height: 18px; }
.tvd-faq-item.open .tvd-faq-question i, .tvd-faq-item.open .tvd-faq-question svg { transform: rotate(180deg); color: var(--tvd-primary); }

.tvd-faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.tvd-faq-item.open .tvd-faq-answer { max-height: 400px; }
.tvd-faq-answer p { padding: 0 18px 15px; font-size: 13.5px; line-height: 1.65; color: var(--tvd-text-secondary); margin: 0; }
.tvd-faq-answer a { color: var(--tvd-primary); font-weight: 500; }

/* Responsive */
@media (max-width: 768px) {
    .tvd-input-card { padding: 20px 16px 16px; }
    .tool-title { font-size: 22px; }
    .tvd-dl-grid { grid-template-columns: 1fr; }
    .tvd-dl-mp4 { grid-column: auto; }
    .tvd-gif-selects { grid-template-columns: 1fr; }
    .tvd-format-grid { grid-template-columns: 1fr; }
    .tvd-features-grid { grid-template-columns: 1fr 1fr; }
    .tvd-related { flex-direction: column; }
}

@media (max-width: 480px) {
    .tool-title { font-size: 19px; }
    .tvd-icon-wrap { width: 40px; height: 40px; }
    .tvd-features-grid { grid-template-columns: 1fr; }
    .tvd-faq-question { font-size: 13.5px; padding: 13px 15px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .tvd-spinner { animation: tvd-spin 2s linear infinite; }
}
