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

:root {
    --bg:       #0f0f0f;
    --surface:  #1a1a1a;
    --surface2: #242424;
    --accent:   #ff6500;
    --accent-h: #ff8533;
    --text:     #ebebeb;
    --muted:    #888;
    --border:   #2a2a2a;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Header ── */
header {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    padding: 0 5%;
    border-bottom: 2px solid var(--accent);
}

#logo { font-size: 1.7em; font-weight: 900; letter-spacing: -1px; color: #fff; }
#logo a { color: inherit; text-decoration: none; flex-direction: row; }
#logo span { color: var(--accent); }

#icons { display: flex; align-items: center; gap: 22px; }

a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    transition: color .2s;
}
a:hover { color: var(--accent); }
a:hover .icons { filter: brightness(0) saturate(100%) invert(45%) sepia(98%) saturate(600%) hue-rotate(2deg); }

.icons { height: 20px; width: 20px; filter: invert(1); }
.icons[alt="login"],
.icons[alt="register"] { filter: none; }
a p { font-size: 0.58em; margin-top: 3px; color: var(--muted); }

/* ── Main ── */
main { padding: 24px 3%; }

/* ── Search bar ── */
.search-wrap {
    max-width: 680px;
    margin: 0 auto 28px;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 11px 14px;
    color: var(--text);
    font-size: 0.95em;
    outline: none;
    transition: border-color .2s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--accent); }

.search-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 20px;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
.search-btn:hover { background: var(--accent-h); }

.search-hint {
    font-size: 0.75em;
    color: var(--muted);
    margin-top: 7px;
    text-align: center;
}

.search-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.filter-chip {
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: .8em;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.filter-chip:hover { background: var(--surface2); color: var(--text); }
.filter-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.filter-sep { color: var(--border); font-size: .8em; }

/* ── Results meta ── */
.results-meta {
    font-size: 0.82em;
    color: var(--muted);
    margin-bottom: 18px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}
.results-meta strong { color: var(--text); }

/* ── Grid (same as home) ── */
#alb {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.video-item {
    background: var(--surface);
    border-radius: 6px;
    overflow: hidden;
    min-width: 0;
    transition: transform .2s, box-shadow .2s;
}
.video-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.6);
}

.thumb-wrap {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}
.thumb-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.video-item:hover .thumb-wrap img { transform: scale(1.04); }

.duration-badge {
    position: absolute;
    bottom: 6px; right: 6px;
    background: rgba(0,0,0,.82);
    color: #fff;
    font-size: 0.72em;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
}

.count-badge {
    position: absolute;
    top: 6px; right: 6px;
    background: rgba(0,0,0,.75);
    color: #fff;
    font-size: 0.72em;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    pointer-events: none;
}

.card-info {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.video-title {
    font-size: 0.88em;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.video-author { font-size: 0.75em; color: var(--muted); }
.video-author a { color: var(--muted); text-decoration: none; flex-direction: row; }
.video-author a:hover { color: var(--accent); }

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.card-stats    { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.views-badge   { font-size: 0.72em; color: var(--muted); font-weight: 700; white-space: nowrap; }
.like-badge    { font-size: 0.72em; color: #e74c3c;      font-weight: 700; white-space: nowrap; }
.comment-badge { font-size: 0.72em; color: var(--muted); font-weight: 700; white-space: nowrap; }

.empty {
    text-align: center;
    color: var(--muted);
    padding: 48px 0;
    font-size: 0.9em;
    grid-column: 1/-1;
}

/* ── Paginação ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 32px;
    padding-bottom: 24px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 600;
    text-decoration: none;
    flex-direction: row;
    transition: background .2s, border-color .2s;
}
.page-btn:hover        { background: var(--surface2); border-color: #444; color: var(--text); }
.page-btn.active       { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn.active:hover { background: var(--accent); color: #fff; }
.page-btn.disabled     { opacity: .35; pointer-events: none; }
.page-ellipsis         { color: var(--muted); font-size: 0.88em; padding: 0 2px; }

@media (max-width: 600px) {
    header { padding: 0 3%; }
    #logo { font-size: 1.3em; }
    .icons { height: 17px; width: 17px; }
    #alb { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .search-btn { padding: 0 14px; }
}
