/* ================================================
   OmniDownloader — Responsive Stylesheet
   © Andre Silva | andretsc.dev
   ================================================ */

/* ---- Reset & Variables ------------------------------------------- */

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

:root {
    --primary:        #1565C0;
    --primary-dark:   #0D47A1;
    --primary-light:  #1976D2;
    --accent:         #64B5F6;
    --success:        #2E7D32;
    --error:          #C62828;
    --error-bg:       #FFEBEE;
    --text-dark:      #263238;
    --text-muted:     #607D8B;
    --input-bg:       #F5F7FA;
    --input-border:   #E0E0E0;
    --card-bg:        #ffffff;
    --card-shadow:    0 24px 64px rgba(0, 0, 0, 0.35);
    --radius:         16px;
    --radius-sm:      10px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
                 Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(150deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ---- Layout ------------------------------------------------------ */

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---- Header ------------------------------------------------------ */

.header {
    padding: 1.25rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: #ffffff;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.logo svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* ---- Main -------------------------------------------------------- */

.main {
    flex: 1;
    padding: 1.5rem 0 4rem;
}

/* ---- Hero -------------------------------------------------------- */

.hero {
    text-align: center;
    margin-bottom: 2.25rem;
}

.hero-title {
    font-size: clamp(1.875rem, 6vw, 3rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.625rem;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
}

/* ---- Stats Counter Widget ---------------------------------------- */

.stats-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.45rem 1.125rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.stats-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1;   transform: scale(1);    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.5); }
    50%       { opacity: 0.7; transform: scale(0.85); box-shadow: 0 0 0 4px rgba(76, 175, 80, 0); }
}

.stats-number {
    font-weight: 800;
    font-size: 1rem;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    min-width: 2ch;
}

.stats-label {
    font-weight: 500;
}

/* ---- Card -------------------------------------------------------- */

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 2.6vw, 2rem);
    box-shadow: var(--card-shadow);
}

/* ---- Input Group ------------------------------------------------- */

.input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: stretch;
}

.input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.input-icon {
    position: absolute;
    left: 0.875rem;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
    top: 50%;
    transform: translateY(-50%);
}

.input-wrapper input[type="text"] {
    width: 100%;
    padding: 0.875rem 2.5rem 0.875rem 2.875rem;
    border: 2px solid var(--input-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--input-bg);
    color: var(--text-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
    font-family: inherit;
    min-width: 0;
}

.input-wrapper input[type="text"]:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
    background: #ffffff;
}

.input-wrapper input[type="text"]::placeholder {
    color: #aab4c0;
}

.btn-clear {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    line-height: 0;
}

.btn-clear:hover {
    color: var(--text-dark);
    background: #f0f0f0;
}

.btn-paste {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 1.125rem;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
    height: auto;
    min-height: 46px;
}

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

.btn-paste:active {
    transform: scale(0.97);
}

/* ---- Video Preview ----------------------------------------------- */

.video-preview {
    display: flex;
    gap: 0.875rem;
    align-items: center;
    padding: 0.875rem;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    border: 1px solid #e8ecf1;
    animation: fadeInDown 0.25s ease;
    overflow: hidden;
}

.video-preview img {
    width: 96px;
    height: 58px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #e0e0e0;
}

.video-meta {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.video-duration {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ---- Format Selection -------------------------------------------- */

.format-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
    border: none;
    padding: 0;
}

.format-option {
    cursor: pointer;
    display: block;
}

.format-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.format-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 2px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.format-option:hover .format-card {
    border-color: var(--primary-light);
    background: #fff;
}

.format-option input[type="radio"]:checked + .format-card {
    border-color: var(--primary);
    background: #E3F2FD;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}

.format-option input[type="radio"]:focus-visible + .format-card {
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.3);
}

.format-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #ffffff;
    color: var(--primary);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: background 0.2s, color 0.2s;
}

.format-option input[type="radio"]:checked + .format-card .format-icon {
    background: var(--primary);
    color: #ffffff;
}

.format-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.format-label {
    font-weight: 700;
    font-size: 0.925rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.format-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* ---- Download Button --------------------------------------------- */

.btn-download {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 18px rgba(13, 71, 161, 0.45);
    font-family: inherit;
    letter-spacing: 0.01em;
}

.btn-download:hover {
    opacity: 0.9;
    box-shadow: 0 6px 24px rgba(13, 71, 161, 0.55);
}

.btn-download:active {
    transform: scale(0.99);
}

.btn-download:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* ---- Loading State ----------------------------------------------- */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    text-align: center;
    gap: 0;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin-bottom: 1.25rem;
}

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

.loading-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.loading-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---- Error State ------------------------------------------------- */

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1.25rem;
    background: var(--error-bg);
    border-radius: var(--radius-sm);
    text-align: center;
    gap: 0.625rem;
    border: 1px solid #FFCDD2;
}

.error-state svg {
    color: var(--error);
    flex-shrink: 0;
}

.error-state p {
    font-size: 0.875rem;
    color: #B71C1C;
    font-weight: 500;
    max-width: 420px;
    white-space: pre-wrap;
    word-break: break-word;
}

.btn-try-again {
    padding: 0.5rem 1.5rem;
    background: var(--error);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
    margin-top: 0.25rem;
}

.btn-try-again:hover {
    background: #B71C1C;
}

/* ---- Platforms --------------------------------------------------- */

.platforms {
    margin-top: 2rem;
    text-align: center;
}

.platforms-label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.platform-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.platform-badge {
    padding: 0.28rem 0.875rem;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    font-size: 0.79rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.platform-badge:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---- Search Section ---------------------------------------------- */

.search-section {
    margin-top: 1.25rem;
    border-top: 1px solid #f0f2f5;
    padding-top: 1.125rem;
}

.search-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

.search-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

.search-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
}

.search-label strong {
    color: var(--text-dark);
}

.search-empty {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem 0;
}

/* ---- Results Grid ------------------------------------------------ */

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.625rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
    outline: none;
}

.result-item:hover,
.result-item:focus-visible {
    background: #f0f5ff;
    border-color: #dce8ff;
}

.result-thumb-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    background: #e8ecf0;
}

.result-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.result-duration {
    position: absolute;
    bottom: 3px;
    right: 4px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    margin-bottom: 0.2rem;
}

.result-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-select {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.875rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

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

/* ---- Pagination -------------------------------------------------- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.125rem;
    padding-top: 0.875rem;
    border-top: 1px solid #f0f2f5;
}

.btn-page {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.875rem;
    background: var(--input-bg);
    color: var(--text-dark);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    font-family: inherit;
}

.btn-page:hover:not(:disabled) {
    background: #fff;
    border-color: var(--primary-light);
    color: var(--primary);
}

.btn-page:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* ---- Responsive (search) ----------------------------------------- */

@media (max-width: 480px) {
    .result-thumb-wrapper {
        width: 90px;
        height: 54px;
    }

    .btn-select span { display: none; }
}

/* ---- Footer ------------------------------------------------------ */

.footer {
    padding: 1.75rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-nav {
    display: none; /* hidden visually, present for crawlers */
}

.footer-copy {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-disclaimer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.28);
    margin-top: 0.25rem;
}

.cookie-notice {
    margin-top: 0.65rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 170, 0, 0.14);
    border: 1px solid rgba(255, 170, 0, 0.38);
    border-radius: 8px;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ---- FAQ --------------------------------------------------------- */

.faq {
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
}

.faq-title {
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.faq-item {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    margin-bottom: 0.625rem;
    overflow: hidden;
    transition: background 0.2s;
}

.faq-item[open] {
    background: rgba(255, 255, 255, 0.11);
}

.faq-question {
    padding: 0.875rem 1.125rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    user-select: none;
    -webkit-user-select: none;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--accent);
    flex-shrink: 0;
    transition: transform 0.2s;
    line-height: 1;
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-question:hover {
    color: #ffffff;
}

.faq-answer {
    padding: 0 1.125rem 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.65;
}

.faq-answer strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* ---- Utilities --------------------------------------------------- */

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ---- Animations -------------------------------------------------- */

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive -------------------------------------------------- */

@media (max-width: 580px) {
    .card {
        padding: 1.5rem 1.125rem;
    }

    .input-group {
        flex-direction: column;
    }

    .btn-paste {
        justify-content: center;
        padding: 0.75rem 1.25rem;
        min-height: auto;
    }

    .format-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .format-card {
        padding: 0.75rem 0.875rem;
    }

    .video-preview img {
        width: 80px;
        height: 48px;
    }

    .hero-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 380px) {
    .card {
        padding: 1.25rem 1rem;
    }

    .btn-download {
        font-size: 0.95rem;
    }
}

/* ---- Search Platform Bar ----------------------------------------- */

.search-platform-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.btn-platform {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.875rem;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
    font-family: inherit;
}

.btn-platform:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.btn-platform.active {
    border-color: var(--primary);
    background: #E3F2FD;
    color: var(--primary-dark);
}

.platform-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Result Actions (preview + download buttons) ----------------- */

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-shrink: 0;
}

.btn-audio-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #E3F2FD;
    border: 1.5px solid var(--primary-light);
    border-radius: 50%;
    color: var(--primary);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.12s;
    font-family: inherit;
    flex-shrink: 0;
}

.btn-audio-preview:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.08);
}

.btn-audio-preview.active {
    background: var(--primary);
    color: #fff;
}

/* ---- Audio Preview Box ------------------------------------------- */

.audio-preview-box {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    margin: 0.25rem 0 0.5rem;
    animation: fadeInDown 0.2s ease;
}

.btn-close-preview {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.68);
    color: #ffffff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.btn-close-preview:hover {
    background: rgba(0, 0, 0, 0.82);
}

.audio-preview-box iframe {
    width: 100%;
    height: 200px;
    display: block;
    border: none;
}

@media (max-width: 480px) {
    .audio-preview-box iframe { height: 170px; }
    .result-actions { flex-direction: row; align-items: center; }
}

@media (max-width: 768px) {
    .container { padding: 0 0.9rem; }

    .result-item {
        align-items: flex-start;
        gap: 0.65rem;
    }

    .result-thumb-wrapper {
        width: 106px;
        height: 62px;
    }

    .result-actions {
        flex-direction: row;
        align-items: center;
        gap: 0.35rem;
    }

    .btn-select {
        padding: 0.4rem 0.68rem;
        font-size: 0.76rem;
    }
}

/* ---- Platform Badge ---------------------------------------------- */

.result-platform {
    display: inline-block;
    font-size: 0.67rem;
    font-weight: 700;
    padding: 0.1rem 0.55rem;
    border-radius: 99px;
    background: var(--primary);
    color: #ffffff;
    margin-top: 0.3rem;
    letter-spacing: 0.02em;
}

.result-platform[data-platform="YouTube"]    { background: #FF0000; }
.result-platform[data-platform="TikTok"]     { background: #010101; }
.result-platform[data-platform="Instagram"]  { background: linear-gradient(90deg,#f09433,#dc2743,#bc1888); }
.result-platform[data-platform="Twitter / X"]{ background: #000000; }
.result-platform[data-platform="Facebook"]   { background: #1877F2; }
.result-platform[data-platform="Twitch"]     { background: #9146FF; }
.result-platform[data-platform="SoundCloud"] { background: #FF5500; }
.result-platform[data-platform="Vimeo"]      { background: #1AB7EA; }
.result-platform[data-platform="Dailymotion"]{ background: #0066DC; }
.result-platform[data-platform="Reddit"]     { background: #FF4500; }



.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ---- Language Switcher ------------------------------------------- */

.lang-switcher {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-shrink: 0;
}

.btn-lang {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.65);
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    line-height: 1.6;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.btn-lang:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-lang.active {
    background: var(--accent);
    color: var(--primary-dark);
    border-color: var(--accent);
    font-weight: 700;
}

/* ---- Progress Bar (replaces spinner in loading state) ------------ */

.progress-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    color: #ffffff;
    animation: pulse-icon 2s ease-in-out infinite;
    flex-shrink: 0;
}

.progress-icon svg {
    animation: bounce-dl 1.6s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { box-shadow: 0 0 0 0 rgba(21, 101, 192, 0.35); }
    50%       { box-shadow: 0 0 0 14px rgba(21, 101, 192, 0); }
}

@keyframes bounce-dl {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(5px); }
}

.loading-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 0.875rem;
}

.progress-track {
    flex: 1;
    height: 9px;
    background: #e3e8ef;
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 99px;
    transition: none;
}

.progress-pct {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 2.8rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.loading-stage {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.loading-wait {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .btn-lang { font-size: 0.68rem; padding: 0.18rem 0.45rem; }
    .lang-switcher { gap: 0.25rem; }
    .cookie-notice { font-size: 0.74rem; padding: 0.5rem 0.65rem; }
}
