/* =============================================
   Video Downloader Pro — Frontend Styles
   Brand: GoAndUse.com
   Colors: Primary #ff6a59 | Bg #fff3d6 | Surface #f5f5fa | Text #292931
============================================= */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

.vdp-wrap {
    --vdp-primary:   #ff6a59;
    --vdp-primary-d: #e55040;
    --vdp-bg:        #fff3d6;
    --vdp-surface:   #f5f5fa;
    --vdp-text:      #292931;
    --vdp-muted:     #7a7a88;
    --vdp-border:    #e8e0d0;
    --vdp-radius:    14px;
    --vdp-shadow:    0 4px 24px rgba(0,0,0,.08);

    font-family: 'Nunito', sans-serif;
    max-width: 720px;
    margin: 0 auto 40px;
    background: var(--vdp-bg);
    border-radius: 20px;
    padding: 32px 28px 24px;
    box-shadow: var(--vdp-shadow);
    border: 1px solid var(--vdp-border);
    box-sizing: border-box;
}

/* ── Header ───────────────────────────── */
.vdp-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.vdp-header-icon {
    flex-shrink: 0;
}

.vdp-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--vdp-text);
    margin: 0 0 2px;
    line-height: 1.2;
}

.vdp-subtitle {
    font-size: .78rem;
    color: var(--vdp-muted);
    margin: 0;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* ── Platform Badges ──────────────────── */
.vdp-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 22px;
}

.vdp-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1px solid var(--vdp-border);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: .73rem;
    font-weight: 700;
    color: var(--vdp-text);
    transition: box-shadow .2s, transform .2s;
    cursor: default;
}

.vdp-platform-badge:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    transform: translateY(-1px);
}

/* ── Input Row ────────────────────────── */
.vdp-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.vdp-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.vdp-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.vdp-input {
    width: 100%;
    padding: 13px 38px 13px 42px;
    border: 2px solid var(--vdp-border);
    border-radius: var(--vdp-radius);
    font-size: .92rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    color: var(--vdp-text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    outline: none;
}

.vdp-input:focus {
    border-color: var(--vdp-primary);
    box-shadow: 0 0 0 3px rgba(255,106,89,.15);
}

.vdp-input::placeholder {
    color: #bbb;
    font-weight: 500;
}

.vdp-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--vdp-muted);
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    transition: color .2s, background .2s;
}

.vdp-clear-btn:hover {
    color: var(--vdp-primary);
    background: rgba(255,106,89,.1);
}

.vdp-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 13px 22px;
    background: var(--vdp-primary);
    color: #fff;
    border: none;
    border-radius: var(--vdp-radius);
    font-size: .92rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(255,106,89,.35);
}

.vdp-btn:hover {
    background: var(--vdp-primary-d);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(255,106,89,.4);
}

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

.vdp-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

/* ── Reload / "New" button (secondary style) ── */
.vdp-reload-btn {
    background: #fff;
    color: var(--vdp-primary);
    border: 2px solid var(--vdp-primary);
    box-shadow: none;
    padding: 11px 18px;
}

.vdp-reload-btn:hover {
    background: rgba(255,106,89,.08);
    color: var(--vdp-primary-d);
    border-color: var(--vdp-primary-d);
    box-shadow: none;
    transform: translateY(-1px);
}

/* ── Loader ───────────────────────────── */
.vdp-loader {
    text-align: center;
    padding: 28px 0 16px;
    color: var(--vdp-muted);
    font-size: .88rem;
    font-weight: 600;
}

.vdp-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255,106,89,.2);
    border-top-color: var(--vdp-primary);
    border-radius: 50%;
    animation: vdp-spin .75s linear infinite;
    margin: 0 auto 10px;
}

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

/* ── Error ────────────────────────────── */
.vdp-error {
    background: #fff0ee;
    border: 1.5px solid #ffcbc5;
    border-radius: var(--vdp-radius);
    padding: 14px 18px;
    color: #c0392b;
    font-size: .88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
}

.vdp-error::before {
    content: '⚠️';
    font-size: 1.1rem;
}

/* ── Results ──────────────────────────── */
.vdp-results {
    background: #fff;
    border: 1.5px solid var(--vdp-border);
    border-radius: var(--vdp-radius);
    overflow: hidden;
    margin-bottom: 12px;
    animation: vdp-fadeup .3s ease;
}

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

.vdp-results-header {
    background: var(--vdp-surface);
    padding: 12px 18px;
    font-size: .82rem;
    font-weight: 800;
    color: var(--vdp-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    border-bottom: 1px solid var(--vdp-border);
}

/* Single link row */
.vdp-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--vdp-border);
    gap: 12px;
    transition: background .2s;
}

.vdp-link-row:last-child { border-bottom: none; }
.vdp-link-row:hover { background: #fafafa; }

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

.vdp-link-label {
    font-size: .9rem;
    font-weight: 800;
    color: var(--vdp-text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vdp-link-sub {
    font-size: .75rem;
    color: var(--vdp-muted);
    font-weight: 600;
}

.vdp-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--vdp-primary);
    color: #fff;
    border-radius: 9px;
    font-size: .82rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.vdp-dl-btn:hover {
    background: var(--vdp-primary-d);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* Picker grid (multi-video) */
.vdp-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 16px;
}

.vdp-picker-item {
    border: 1.5px solid var(--vdp-border);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: box-shadow .2s, transform .2s;
}

.vdp-picker-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.vdp-picker-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--vdp-surface);
    display: block;
}

.vdp-picker-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--vdp-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.vdp-picker-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--vdp-text);
    padding: 6px 6px 2px;
}

.vdp-picker-item .vdp-dl-btn {
    margin: 6px auto 10px;
    display: inline-flex;
    font-size: .75rem;
    padding: 6px 12px;
}

/* ── Footer Note ──────────────────────── */
.vdp-note {
    font-size: .73rem;
    color: var(--vdp-muted);
    text-align: center;
    margin: 14px 0 0;
    font-weight: 600;
}

.vdp-note a {
    color: var(--vdp-primary);
    text-decoration: none;
    font-weight: 700;
}

/* ── Responsive ───────────────────────── */
@media (max-width: 540px) {
    .vdp-wrap {
        padding: 22px 16px 18px;
        border-radius: 14px;
    }

    .vdp-input-row {
        flex-direction: column;
    }

    .vdp-btn {
        width: 100%;
        justify-content: center;
    }

    .vdp-title {
        font-size: 1.2rem;
    }

    .vdp-picker-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
