/* ============================================================
   PaneSérie — CSS Principal
   Design: Industrial Alert (baseado no projeto Manus)
   ============================================================ */

/* --- Variáveis de cor (convertidas de oklch para hex/hsl) --- */
:root {
    --bg:           #1e1c1b;   /* oklch(0.15 0.005 80) */
    --bg-card:      #272422;   /* oklch(0.20 0.005 80) */
    --bg-muted:     #2a2725;   /* oklch(0.22 0.005 80) */
    --border:       #3d3935;   /* oklch(0.30 0.005 80) */
    --primary:      #e8720c;   /* oklch(0.70 0.22 45)  — laranja alerta */
    --primary-dim:  rgba(232,114,12,0.15);
    --text:         #f2f0ee;   /* oklch(0.95 0 0) */
    --text-muted:   #9c9690;   /* oklch(0.65 0.01 80) */
    --radius:       0.5rem;
    --font-display: 'Oswald', sans-serif;
    --font-body:    'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 1rem;
}
@media (min-width: 640px)  { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

/* --- Hazard stripe --- */
.hazard-stripe {
    background: repeating-linear-gradient(
        -45deg,
        var(--primary)      0px,
        var(--primary)      10px,
        #2a2725             10px,
        #2a2725             20px
    );
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(30, 28, 27, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text);
    transition: opacity 0.2s;
}
.logo:hover { opacity: 0.85; }
.logo img { border-radius: 4px; }

.text-primary { color: var(--primary); }

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.main-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.15s;
}
.main-nav a:hover,
.main-nav a.active { color: var(--text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 64px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(30,28,27,0.55) 0%,
        transparent 40%,
        var(--bg) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 1rem;
}

.hero-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%   { opacity: 1; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    margin-bottom: 1rem;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #c5bfba;
    max-width: 560px;
    margin: 0 auto 1.5rem;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.hero-divider {
    height: 4px;
    width: 200px;
    margin: 0 auto;
    border-radius: 999px;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator-inner {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
}

.scroll-dot {
    width: 6px;
    height: 10px;
    background: var(--primary);
    border-radius: 999px;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   BUSCA
   ============================================================ */
.search-section {
    padding: 2rem 0 0;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 520px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.65rem 1rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--primary); }

.btn-search {
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    padding: 0.65rem 1.25rem;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-search:hover { opacity: 0.88; }

.search-result-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* ============================================================
   SEÇÃO DE EPISÓDIOS
   ============================================================ */
.episodes-section {
    position: relative;
    padding: 4rem 0 5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.section-header svg {
    color: var(--primary);
    flex-shrink: 0;
}

.section-header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(232,114,12,0.5), transparent);
    margin-left: 1rem;
}

/* Grid de episódios */
.episodes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px)  { .episodes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .episodes-grid { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   CARD DE EPISÓDIO
   ============================================================ */
.episode-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.episode-card:hover {
    border-color: rgba(232,114,12,0.6);
    box-shadow: 0 0 20px rgba(232,114,12,0.12);
}

.card-stripe { height: 4px; }

.card-body { padding: 1.5rem; }

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.ep-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(232,114,12,0.25);
    line-height: 1;
}

.ep-duration {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Thumbnail opcional */
.card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: calc(var(--radius) - 2px);
    margin-bottom: 1rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
    transition: color 0.2s;
}
.episode-card:hover .card-title { color: var(--primary); }

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--primary-dim);
    color: var(--primary);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.card-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-cta {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.episode-card:hover .card-cta { opacity: 1; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 5rem 0;
    color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 1rem; opacity: 0.3; }

/* ============================================================
   PÁGINA DO EPISÓDIO
   ============================================================ */
.episode-page {
    padding-top: 66px;
}

.ep-top-stripe { height: 4px; }

.ep-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 1rem 5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    transition: color 0.15s;
}
.back-link:hover { color: var(--primary); }

.ep-number-big {
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 900;
    color: rgba(232,114,12,0.18);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.ep-title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.ep-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.ep-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ep-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.ep-meta-item svg { color: var(--primary); }

.ep-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

/* Player de vídeo */
.video-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    margin-bottom: 3rem;
    background: var(--bg-card);
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

.play-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-icon svg { color: var(--primary); }

/* Sinopse */
.ep-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.ep-section-title svg { color: var(--primary); }
.ep-section-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.ep-section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(232,114,12,0.4), transparent);
    margin-left: 0.5rem;
}

.ep-synopsis {
    font-size: 1.05rem;
    color: #c8c2bc;
    line-height: 1.8;
    margin-bottom: 3rem;
}

/* Fontes */
.fontes-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 3rem;
}

.fontes-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.9rem;
    transition: opacity 0.15s;
}
.fontes-list li a:hover { opacity: 0.75; text-decoration: underline; }

/* Redes sociais do episódio */
.redes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.btn-rede {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    transition: border-color 0.2s, color 0.2s;
}
.btn-rede:hover { border-color: var(--primary); color: var(--primary); }

/* Outros episódios */
.outros-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px) { .outros-grid { grid-template-columns: repeat(2, 1fr); } }

.outro-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}
.outro-card:hover { border-color: rgba(232,114,12,0.4); }

.outro-num {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 900;
    color: rgba(232,114,12,0.25);
    flex-shrink: 0;
}

.outro-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    transition: color 0.2s;
}
.outro-card:hover .outro-info h4 { color: var(--primary); }
.outro-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.footer-brand a { color: var(--primary); }
.footer-brand a:hover { text-decoration: underline; }

.footer-links {
    display: flex;
    gap: 1.25rem;
}
.footer-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }

/* ============================================================
   ADMIN — painel simples
   ============================================================ */
.admin-wrap {
    max-width: 820px;
    margin: 5rem auto 3rem;
    padding: 0 1rem;
}

.admin-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-title span { color: var(--primary); }

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.form-control {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 0.9rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    width: 100%;
    transition: border-color 0.2s;
}
.form-control:focus { border-color: var(--primary); }
textarea.form-control { min-height: 120px; resize: vertical; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.btn-primary {
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    padding: 0.7rem 1.5rem;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: opacity 0.2s;
    align-self: flex-start;
}
.btn-primary:hover { opacity: 0.88; }

.btn-danger {
    background: #b91c1c;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.75rem;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-danger:hover { opacity: 0.8; }

.btn-secondary {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.3rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }

/* Tabela admin */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-top: 1.5rem;
}
.admin-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.admin-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(61,57,53,0.5);
    color: var(--text);
    vertical-align: middle;
}
.admin-table tr:hover td { background: var(--bg-card); }

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.status-publicado { background: rgba(34,197,94,0.15); color: #86efac; }
.status-rascunho  { background: rgba(234,179,8,0.15);  color: #fde047; }
.status-suspenso  { background: rgba(239,68,68,0.15);  color: #fca5a5; }

/* Login */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
}
.login-box h1 {
    font-size: 1.5rem;
    margin-bottom: 1.75rem;
    text-align: center;
}
