/* ============================================
   style.css — VideoStream shared styles
   ============================================ */

:root {
    --vs-bg:       #0b0d12;
    --vs-surface:  #12151d;
    --vs-border:   #1e2330;
    --vs-accent:   #3d7eff;
    --vs-accent2:  #7c3dff;
    --vs-text:     #e8eaf0;
    --vs-muted:    #6b7280;
}

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

body {
    background: var(--vs-bg);
    color: var(--vs-text);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    min-height: 100vh;
}

/* ── Navbar ─────────────────────────────────── */
.vs-navbar {
    background: rgba(11,13,18,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--vs-border);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vs-logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--vs-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.vs-logo span {
    background: linear-gradient(135deg, var(--vs-accent), var(--vs-accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-upload {
    background: linear-gradient(135deg, var(--vs-accent), var(--vs-accent2));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .5rem 1.1rem;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: .85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: opacity .2s;
}
.btn-upload:hover { opacity: .85; color: #fff; }

.btn-back {
    border: 1px solid var(--vs-border);
    background: transparent;
    color: var(--vs-muted);
    border-radius: 8px;
    padding: .45rem 1rem;
    font-size: .85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: all .18s;
}
.btn-back:hover { border-color: var(--vs-accent); color: var(--vs-accent); }

/* ── Hero header (index) ───────────────────── */
.vs-hero {
    padding: 3rem 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.vs-hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
}
.vs-hero p { color: var(--vs-muted); margin-top: .5rem; }
.badge-count {
    background: var(--vs-border);
    color: var(--vs-accent);
    font-family: 'Syne', sans-serif;
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .65rem;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: .6rem;
}

/* ── Search bar ──────────────────────────────── */
.vs-search {
    display: flex;
    gap: .5rem;
    margin-top: 1.25rem;
    max-width: 480px;
}
.vs-search input {
    flex: 1;
    background: var(--vs-surface);
    border: 1px solid var(--vs-border);
    border-radius: 9px;
    color: var(--vs-text);
    padding: .6rem .9rem;
    font-family: 'Inter', sans-serif;
    font-size: .88rem;
    outline: none;
    transition: border-color .18s;
}
.vs-search input:focus {
    border-color: var(--vs-accent);
    box-shadow: 0 0 0 3px rgba(61,126,255,.12);
}
.vs-search button {
    background: var(--vs-surface);
    border: 1px solid var(--vs-border);
    color: var(--vs-muted);
    border-radius: 9px;
    padding: .6rem .9rem;
    cursor: pointer;
    transition: all .18s;
}
.vs-search button:hover {
    border-color: var(--vs-accent);
    color: var(--vs-accent);
}

/* ── Grid de vídeos ──────────────────────────── */
.vs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 1.5rem;
}

/* ── Card ────────────────────────────────────── */
.vs-card {
    background: var(--vs-surface);
    border: 1px solid var(--vs-border);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .2s, border-color .2s, box-shadow .2s;
    position: relative;
}
.vs-card:hover {
    transform: translateY(-4px);
    border-color: var(--vs-accent);
    box-shadow: 0 12px 40px rgba(61,126,255,.15);
}
.vs-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: #0d1020;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.vs-card-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .6;
    transition: opacity .3s;
}
.vs-card:hover .vs-card-thumb video { opacity: 1; }
.vs-play-icon {
    position: absolute;
    width: 52px;
    height: 52px;
    background: rgba(61,126,255,.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    pointer-events: none;
    transition: transform .2s, opacity .2s;
}
.vs-card:hover .vs-play-icon { transform: scale(1.1); }

.vs-card-body {
    padding: 1rem 1.1rem 1.1rem;
}
.vs-card-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: .3rem;
}
.vs-card-desc {
    font-size: .8rem;
    color: var(--vs-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}
.vs-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .85rem;
    font-size: .75rem;
    color: var(--vs-muted);
}
.vs-card-actions {
    display: flex;
    gap: .5rem;
}
.btn-sm-vs {
    border: 1px solid var(--vs-border);
    background: transparent;
    color: var(--vs-muted);
    border-radius: 7px;
    padding: .3rem .65rem;
    font-size: .78rem;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .3rem;
    transition: all .18s;
}
.btn-sm-vs:hover { border-color: var(--vs-accent); color: var(--vs-accent); }
.btn-sm-vs.danger:hover { border-color: #ef4444; color: #ef4444; }

/* ── Estado vazio ────────────────────────────── */
.vs-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 4rem 1rem;
}
.vs-empty i { font-size: 3.5rem; color: var(--vs-border); }
.vs-empty p { color: var(--vs-muted); margin-top: 1rem; }
.vs-empty a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.2rem;
    background: linear-gradient(135deg, var(--vs-accent), var(--vs-accent2));
    color: #fff;
    padding: .6rem 1.4rem;
    border-radius: 8px;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    text-decoration: none;
}

/* ── Toast ───────────────────────────────────── */
.vs-toast-wrap {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.vs-toast {
    background: var(--vs-surface);
    border: 1px solid var(--vs-border);
    border-left: 4px solid var(--vs-accent);
    border-radius: 10px;
    padding: .75rem 1.1rem;
    font-size: .85rem;
    min-width: 240px;
    animation: slideIn .25s ease;
}
.vs-toast.error { border-left-color: #ef4444; }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ── Pagination ──────────────────────────────── */
.vs-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem 3rem;
}
.vs-pagination a,
.vs-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 .6rem;
    border: 1px solid var(--vs-border);
    border-radius: 8px;
    background: var(--vs-surface);
    color: var(--vs-muted);
    font-size: .85rem;
    text-decoration: none;
    transition: all .18s;
}
.vs-pagination a:hover {
    border-color: var(--vs-accent);
    color: var(--vs-accent);
}
.vs-pagination .active {
    background: linear-gradient(135deg, var(--vs-accent), var(--vs-accent2));
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

/* ── Player page layout ─────────────────────── */
.vs-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 1.5rem 3rem;
}
@media (max-width: 900px) {
    .vs-layout { grid-template-columns: 1fr; }
}

.vs-player-wrap { width: 100%; }
.video-js {
    width: 100% !important;
    aspect-ratio: 16/9;
    height: auto !important;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
}
.vjs-big-play-button { background: var(--vs-accent) !important; border: none !important; border-radius: 50% !important; }
.vjs-play-progress, .vjs-volume-level { background: var(--vs-accent) !important; }
.vjs-control-bar { background: rgba(0,0,0,.7) !important; }

.vs-meta { margin-top: 1.25rem; }
.vs-meta h1 {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
}
.vs-meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: .5rem;
    font-size: .8rem;
    color: var(--vs-muted);
}
.vs-meta-actions {
    display: flex;
    gap: .5rem;
    margin-top: 1rem;
}
.vs-desc {
    margin-top: 1rem;
    font-size: .9rem;
    color: #9ca3af;
    line-height: 1.6;
    background: var(--vs-surface);
    border: 1px solid var(--vs-border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
}

/* ── Sidebar sugestões ───────────────────────── */
.vs-sidebar h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--vs-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.vs-sug-card {
    display: flex;
    gap: .8rem;
    background: var(--vs-surface);
    border: 1px solid var(--vs-border);
    border-radius: 11px;
    padding: .75rem;
    margin-bottom: .75rem;
    text-decoration: none;
    color: var(--vs-text);
    transition: border-color .18s, transform .18s;
}
.vs-sug-card:hover {
    border-color: var(--vs-accent);
    transform: translateX(3px);
    color: var(--vs-text);
}
.vs-sug-thumb {
    width: 96px;
    min-width: 96px;
    aspect-ratio: 16/9;
    background: #0d1020;
    border-radius: 7px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vs-sug-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .7;
}
.vs-sug-info { min-width: 0; }
.vs-sug-title {
    font-family: 'Syne', sans-serif;
    font-size: .88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vs-sug-size { font-size: .75rem; color: var(--vs-muted); margin-top: .25rem; }
.vs-empty-sug {
    color: var(--vs-muted);
    font-size: .85rem;
    text-align: center;
    padding: 1.5rem 0;
}

/* ── Upload / Edit page ──────────────────────── */
.vs-wrap {
    max-width: 680px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}
.vs-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: .4rem;
}
.vs-subtitle { color: var(--vs-muted); font-size: .88rem; margin-bottom: 2rem; }

.vs-form-card {
    background: var(--vs-surface);
    border: 1px solid var(--vs-border);
    border-radius: 16px;
    padding: 2rem;
}

.vs-label {
    font-size: .8rem;
    font-weight: 500;
    color: var(--vs-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .4rem;
    display: block;
}
.vs-input, .vs-textarea {
    width: 100%;
    background: var(--vs-bg);
    border: 1px solid var(--vs-border);
    border-radius: 9px;
    color: var(--vs-text);
    padding: .7rem .9rem;
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    outline: none;
    transition: border-color .18s;
}
.vs-input:focus, .vs-textarea:focus {
    border-color: var(--vs-accent);
    box-shadow: 0 0 0 3px rgba(61,126,255,.12);
}
.vs-textarea { resize: vertical; min-height: 90px; }
.vs-field { margin-bottom: 1.25rem; }

/* ── Dropzone ────────────────────────────────── */
.vs-dropzone {
    border: 2px dashed var(--vs-border);
    border-radius: 12px;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    position: relative;
}
.vs-dropzone:hover, .vs-dropzone.dragover {
    border-color: var(--vs-accent);
    background: rgba(61,126,255,.05);
}
.vs-dropzone i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--vs-accent), var(--vs-accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.vs-dropzone p { color: var(--vs-muted); margin-top: .7rem; font-size: .88rem; }
.vs-dropzone strong { color: var(--vs-text); }
.vs-dropzone input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}

/* ── File preview ────────────────────────────── */
.vs-file-preview {
    display: none;
    align-items: center;
    gap: .75rem;
    background: rgba(61,126,255,.08);
    border: 1px solid rgba(61,126,255,.25);
    border-radius: 10px;
    padding: .75rem 1rem;
    margin-top: .75rem;
}
.vs-file-preview.show { display: flex; }
.vs-file-preview i { color: var(--vs-accent); font-size: 1.4rem; }
.vs-file-info { flex: 1; min-width: 0; }
.vs-file-info strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .88rem;
}
.vs-file-info small { color: var(--vs-muted); font-size: .78rem; }
.btn-clear-file {
    background: none;
    border: none;
    color: var(--vs-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: .2rem;
}
.btn-clear-file:hover { color: #ef4444; }

/* ── Progress bar ────────────────────────────── */
.vs-progress { display: none; margin-top: 1rem; }
.vs-progress.show { display: block; }
.vs-progress-bar {
    background: var(--vs-border);
    border-radius: 99px;
    height: 6px;
    overflow: hidden;
}
.vs-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--vs-accent), var(--vs-accent2));
    border-radius: 99px;
    width: 0%;
    transition: width .2s;
}
.vs-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    color: var(--vs-muted);
    margin-bottom: .4rem;
}

/* ── Submit button ───────────────────────────── */
.btn-enviar {
    width: 100%;
    background: linear-gradient(135deg, var(--vs-accent), var(--vs-accent2));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .85rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: opacity .2s;
    margin-top: 1.5rem;
}
.btn-enviar:hover:not(:disabled) { opacity: .85; }
.btn-enviar:disabled { opacity: .45; cursor: not-allowed; }

/* ── Alert ───────────────────────────────────── */
.vs-alert {
    display: none;
    border-radius: 10px;
    padding: .85rem 1rem;
    margin-top: 1rem;
    font-size: .88rem;
    align-items: center;
    gap: .5rem;
}
.vs-alert.show { display: flex; }
.vs-alert.success { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25); color: #4ade80; }
.vs-alert.error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.25);  color: #f87171; }
