*, *::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;
}

/* ── Welcome bar ── */
#welcome {
    background: #000;
    font-size: 0.78em;
    padding: 3px 16px;
}
#welcome p { color: var(--muted); }

/* ── 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;
    text-transform: none;
}
#logo a {
    color: #fff; text-decoration: none; display: block;
    font-size: inherit; font-weight: inherit; letter-spacing: inherit;
    flex-direction: unset; align-items: unset;
}
#logo a:hover { color: #fff; }
#logo span, #logo a 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);
}

/* ── Grid ── */
main { padding: 20px 3%; }

#alb {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

/* ── Feed tabs ── */
.feed-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 18px;
    border-bottom: 2px solid var(--border);
}

.feed-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-direction: row;
    padding: 8px 18px;
    font-size: 0.88em;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    border-radius: 6px 6px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
    transition: color .2s;
}
.feed-tab:hover { color: var(--text); }
.feed-tab.active {
    color: var(--accent);
    background: var(--surface);
    border-color: var(--border);
    border-bottom: 2px solid var(--bg);
}
.tab-heart {
    width: 12px;
    height: 12px;
    color: #e74c3c;
    flex-shrink: 0;
}

.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);
}

/* Thumbnail with duration badge */
.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, opacity .12s;
}
.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 */
.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; }

/* ── 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) {
    #alb { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    header { padding: 0 3%; }
    #logo { font-size: 1.3em; }
    .icons { height: 17px; width: 17px; }
}
