
/* ========================================
   CAFOFOGAMEPLAY
   ESTILO GLOBAL
======================================== */

/* RESET */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: #101116;
    --surface: #191a25;
    --surface-light: #20212d;
    --border: #30313f;
    --text: #f1f1f5;
    --muted: #9999aa;
    --primary: #d85b91;
    --secondary: #865de8;
    --danger: #ff535d;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
}

button,
input {
    font-family: inherit;
}

/* ========================================
   CABEÇALHO
======================================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 145px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 12px 35px;
    background: rgba(21, 21, 29, 0.97);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex-shrink: 0;
}

/* LOGO */

.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
}

.logo img {
    height: 75px;
    width: auto;
    max-width: 340px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.logo img:hover {
    transform: scale(1.03);
}

/* ========================================
   MENU HAMBÚRGUER
======================================== */

.menu-container {
    position: relative;
    z-index: 200;
}

/* BOTÃO */

.menu-toggle {
    width: 43px;
    height: 37px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #20212d;
    border: 1px solid #3b3d50;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.menu-toggle:hover,
.menu-toggle.open {
    background: #292b40;
    border-color: var(--primary);
}

.menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    background: #e8e8f0;
    border-radius: 5px;
    transition: transform 0.2s, opacity 0.2s;
}

.menu-toggle.open span:first-child {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

/* CAIXA DO MENU */

.menu-dropdown {
    position: absolute;
    top: calc(100% + 9px);
    left: 0;
    width: 235px;
    padding: 10px;
    background: #191a25;
    border: 1px solid #363849;
    border-radius: 13px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
    animation: menuAparecer 0.18s ease;
}

.menu-dropdown[hidden] {
    display: none;
}

@keyframes menuAparecer {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* OPÇÕES */

.menu-item {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 3px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #c5c5d1;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s;
}

.menu-item:hover {
    background: #252737;
    color: white;
}

.menu-item.active {
    background: #292b40;
    border-color: #41435b;
    color: white;
}

.menu-icon {
    width: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 16px;
    font-weight: bold;
}

.menu-divider {
    height: 1px;
    background: #363849;
    margin: 10px 2px;
}

.menu-chat {
    margin-bottom: 0;
}

.beta-badge {
    margin-left: auto;
    padding: 3px 7px;
    background: rgba(216, 91, 145, 0.13);
    border: 1px solid rgba(216, 91, 145, 0.45);
    border-radius: 5px;
    color: #f18ab6;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 0.6px;
}

/* ========================================
   BUSCA
======================================== */

#search {
    flex: 1;
    width: 100%;
    max-width: 450px;
    padding: 13px 16px;
    background: var(--surface-light);
    border: 1px solid #343546;
    border-radius: 10px;
    color: white;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search::placeholder {
    color: #858596;
}

#search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(216, 91, 145, 0.12);
}

/* ========================================
   CONTEÚDO
======================================== */

main {
    max-width: 1500px;
    margin: auto;
    padding: 30px;
}

h1,
h2,
h3 {
    color: var(--text);
}

h2 {
    font-size: 21px;
    margin-bottom: 18px;
}

.live-section {
    margin-bottom: 45px;
}

.live-section h2 {
    color: var(--danger);
}

.library-section {
    margin-top: 35px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-top: -10px;
    margin-bottom: 22px;
}

/* ========================================
   CANAIS AO VIVO
======================================== */

.live-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.live-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.live-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(216, 91, 145, 0.10);
}

.live-card img {
    width: 65px;
    height: 65px;
    min-width: 65px;
    border-radius: 50%;
    object-fit: cover;
    background: #292b40;
}

.live-info h3 {
    font-size: 14px;
    margin-bottom: 6px;
}

.live-info p {
    font-size: 12px;
    color: #a8adbd;
    line-height: 1.5;
}

.live-info span {
    display: inline-block;
    margin-top: 8px;
    color: var(--danger);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.8px;
}

/* ========================================
   FILTROS
======================================== */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.filter {
    padding: 9px 16px;
    background: var(--surface);
    color: #c7cbd8;
    border: 1px solid #353749;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}

.filter:hover {
    border-color: var(--primary);
    color: white;
}

.filter.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========================================
   GRID DE VÍDEOS
======================================== */

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.video-card {
    background: var(--surface);
    border: 1px solid #292b38;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.video-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* THUMBNAIL */

.thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #252736;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.video-card:hover .thumbnail img {
    transform: scale(1.04);
}

/* DURAÇÃO */

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 5px 7px;
    border-radius: 5px;
    font-size: 11px;
}

/* INFORMAÇÕES DO VÍDEO */

.video-info {
    padding: 13px;
}

.video-info h3 {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.video-info p {
    font-size: 12px;
    color: #c0c5d2;
    margin-bottom: 6px;
}

.video-info small {
    font-size: 11px;
    color: #858da1;
}

/* ========================================
   HISTÓRICO
======================================== */

.history-section {
    margin-top: 35px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.history-header h2 {
    margin: 0;
}

.clear-history-button {
    padding: 10px 15px;
    border: 1px solid #633440;
    background: #2a1b25;
    color: #ff9aaa;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
}

.clear-history-button:hover {
    background: #43232f;
}

.history-date {
    display: block;
    color: var(--primary) !important;
    font-size: 11px !important;
    margin-top: 9px !important;
}

/* ========================================
   PERFIL DO CANAL
======================================== */

.channel-profile {
    margin-bottom: 40px;
}

.back-button {
    background: #242633;
    color: white;
    border: 1px solid #37394b;
    padding: 10px 16px;
    border-radius: 9px;
    cursor: pointer;
    margin-bottom: 25px;
    transition: 0.2s;
}

.back-button:hover {
    background: #34384d;
    border-color: var(--primary);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 22px;
    border-radius: 15px;
    margin-bottom: 28px;
}

.profile-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-header h1 {
    margin-bottom: 10px;
    font-size: 25px;
}

.profile-header p {
    color: #a8adbd;
    line-height: 1.5;
}

.channel-link {
    color: #d8a4ff;
    cursor: pointer;
}

.channel-link:hover {
    color: white;
    text-decoration: underline;
}

/* ========================================
   PÁGINA DO CANAL
======================================== */

.channel-banner {
    position: relative;
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 15px;
    background: linear-gradient(120deg, #522b69, #a53c78, #e46b62);
    margin-bottom: 25px;
}

.channel-banner::before {
    content: var(--banner-title, "CAFOFOGAMEPLAY");
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(25px, 5vw, 55px);
    font-weight: 900;
    letter-spacing: 4px;
    text-align: center;
    padding: 15px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.channel-avatar {
    border: 3px solid var(--primary);
}

.channel-tag {
    display: inline-block;
    background: rgba(216, 91, 145, 0.15);
    border: 1px solid rgba(216, 91, 145, 0.4);
    color: #f1a8ca;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 11px;
    margin-top: 10px;
}

.channel-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 30px;
}

.channel-stats > div {
    flex: 1;
    min-width: 130px;
    padding: 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.channel-stats strong {
    display: block;
    font-size: 18px;
    margin-bottom: 5px;
}

.channel-stats span {
    font-size: 12px;
    color: var(--muted);
}

/* ========================================
   PÁGINA DO VÍDEO
======================================== */

.video-page {
    max-width: 1200px;
    margin: auto;
    padding: 30px;
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050507;
    border-radius: 13px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.video-player video,
.video-player iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

.video-details {
    margin-top: 22px;
}

.video-details h1 {
    font-size: 24px;
    margin-bottom: 12px;
}

.video-details p {
    color: var(--muted);
    line-height: 1.6;
}

/* ========================================
   MENSAGENS E ESTADOS VAZIOS
======================================== */

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 45px 20px;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed #414151;
    border-radius: 12px;
}

/* ========================================
   RODAPÉ
======================================== */

.site-footer {
    max-width: 1500px;
    margin: 65px auto 0;
    padding: 25px;
    border-top: 1px solid var(--border);
    color: #858596;
    font-size: 12px;
    text-align: center;
    line-height: 1.8;
}

/* ========================================
   RESPONSIVIDADE
======================================== */

@media (max-width: 1000px) {

    .live-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 750px) {

    .topbar {
        min-height: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 18px 16px;
        gap: 14px;
    }

    .header-left {
        width: 100%;
        align-items: flex-start;
    }

    .logo img {
        height: 65px;
        max-width: 280px;
    }

    #search {
        width: 100%;
        max-width: none;
        flex: auto;
    }

    .menu-dropdown {
        width: 235px;
    }

    main {
        padding: 20px;
    }

    .channel-banner {
        min-height: 140px;
    }

    .video-page {
        padding: 20px;
    }

}

@media (max-width: 600px) {

    .live-grid {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .video-info {
        padding: 10px;
    }

    .video-info h3 {
        font-size: 12px;
    }

    .video-info p {
        font-size: 11px;
    }

    .video-info small {
        font-size: 10px;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-header h1 {
        font-size: 21px;
    }

}

@media (max-width: 380px) {

    .video-grid {
        grid-template-columns: 1fr;
    }

    main {
        padding: 15px;
    }

    .logo img {
        max-width: 240px;
        height: 60px;
    }

}
