/**
 * IPTV Player v5 - CSS
 * Tema: Preto + Verde Neon (estilo WPlay)
 * Replica exata do projeto React
 */

/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --neon-green: #00d4ff;
    --neon-green-dark: #00a8cc;
    --neon-green-glow: rgba(0, 212, 255, 0.4);
    --dark-bg: #0a0a0a;
    --dark-surface: #111111;
    --dark-card: #1a1a1a;
    --dark-card-hover: #242424;
    --dark-border: rgba(0, 212, 255, 0.15);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
}

/* ===== GLOBAL RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mantém o H1 disponível para leitores de tela e mecanismos de busca sem alterar o layout. */
.seo-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #0f0f0f 50%, #0a0a0a 100%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #111111;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00d4ff, #00a8cc);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #33deff, #00d4ff);
}

/* Hide scrollbar for content rows */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== UTILITY CLASSES ===== */
.glass {
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.glass-light {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 212, 255, 0.08);
}

.gradient-text {
    background: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3), 0 0 40px rgba(0, 212, 255, 0.1);
}

.glow-accent {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4), 0 0 40px rgba(0, 212, 255, 0.2);
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%);
    color: #000000;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(107, 114, 128, 0.8);
    color: #ffffff;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(107, 114, 128, 0.9);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

/* ===== INPUT FIELDS ===== */
.input-field {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    color: white;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-field:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
    background: rgba(26, 26, 26, 0.95);
}

/* ===== CARDS ===== */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 212, 255, 0.15);
}

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 212, 255, 0.1);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 16px 48px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    transition: background 0.3s;
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1920px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--neon-green);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1;
}

.header-logo-text {
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--neon-green);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

.header-nav {
    display: flex;
    gap: 24px;
}

.header-nav a,
.header-nav span {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s;
}

.header-nav a:hover,
.header-nav span:hover,
.header-nav a.active,
.header-nav span.active {
    color: #ffffff;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Exibido apenas no cabeçalho compacto do catálogo. */
.mobile-search-toggle { display: none; }
.mobile-plans-link { display: none; }
.mobile-reseller-link { display: none; }

.catalog-support-float {
    position: fixed;
    z-index: 90;
    right: 24px;
    bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 15px;
    color: #f4fffc;
    border: 1px solid rgba(167, 255, 215, .65);
    border-radius: 999px;
    background: linear-gradient(135deg, #12b96b, #087e55);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .34);
    font-size: .86rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.catalog-support-float:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(18, 185, 107, .34); }
.catalog-support-float svg { width: 19px; height: 19px; fill: currentColor; }

/* ===== SEARCH BAR ===== */
.search-bar {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(107, 114, 128, 0.5);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.search-bar:focus-within {
    border-color: var(--neon-green);
}

.search-bar svg {
    margin-left: 12px;
    color: var(--text-muted);
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 12px;
    color: #ffffff;
    font-size: 0.9rem;
    width: 256px;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar .clear-btn {
    padding: 8px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
}

.search-bar .clear-btn:hover {
    color: #ffffff;
}

/* ===== HERO BANNER ===== */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    margin-bottom: 32px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg .gradient-left {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #000000 0%, rgba(0, 0, 0, 0.7) 40%, transparent 100%);
}

.hero-bg .gradient-bottom {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0a0a0a 0%, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
}

.hero-content {
    position: absolute;
    bottom: 80px;
    left: 48px;
    max-width: 640px;
    z-index: 10;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 24px;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-buttons {
    display: flex;
    gap: 12px;
}

/* ===== CONTENT ROW (Carrossel) ===== */
.content-section {
    margin-bottom: 32px;
    position: relative;
}

.content-section .section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    padding: 0 48px;
}

.content-row-wrapper {
    position: relative;
}

.content-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 48px 16px;
    scroll-behavior: smooth;
}

.content-row::-webkit-scrollbar {
    display: none;
}

.scroll-btn {
    position: absolute;
    top: 0;
    bottom: 16px;
    width: 48px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.content-row-wrapper:hover .scroll-btn {
    opacity: 1;
}

.scroll-btn.left {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.scroll-btn.right {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.scroll-btn svg {
    width: 32px;
    height: 32px;
    color: #ffffff;
}

/* ===== CONTENT CARD ===== */
.content-card {
    flex-shrink: 0;
    width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.content-card:hover {
    transform: scale(1.1);
    z-index: 20;
}

.content-card:hover .card-poster {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 212, 255, 0.3);
}

.card-poster {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--dark-card);
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-poster .placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, #000000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-poster .placeholder svg {
    width: 32px;
    height: 32px;
    color: rgba(0, 212, 255, 0.5);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #000000 0%, rgba(0, 0, 0, 0.6) 40%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
}

.content-card:hover .card-overlay {
    opacity: 1;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.card-actions button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.card-actions .play-btn {
    background: var(--neon-green);
}

.card-actions .play-btn:hover {
    background: var(--neon-green-dark);
}

.card-actions .play-btn svg {
    width: 14px;
    height: 14px;
    color: #000000;
    fill: #000000;
}

.card-actions .info-btn {
    background: transparent;
    border: 1px solid rgba(107, 114, 128, 0.8);
}

.card-actions .info-btn:hover {
    border-color: #ffffff;
}

.card-actions .info-btn svg {
    width: 14px;
    height: 14px;
    color: #ffffff;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    position: relative;
    background: #181818;
    border-radius: 12px;
    max-width: 768px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    position: relative;
    height: 320px;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-trailer {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: #050505;
}

.modal-trailer iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.modal-header .gradient {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, #181818 0%, transparent 50%);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #181818;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 4;
}

.modal-close:hover {
    background: #333333;
}

.modal-title-section {
    margin-bottom: 20px;
}

.modal-title {
    font-size: clamp(1.55rem, 5vw, 2.5rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
}

.modal-body {
    padding: 24px;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.modal-meta .rating {
    color: var(--neon-green);
    font-weight: 600;
}

.modal-meta .year,
.modal-meta .duration {
    color: var(--text-secondary);
}

.modal-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.modal-genres span {
    padding: 4px 12px;
    background: rgba(107, 114, 128, 0.5);
    border-radius: 9999px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.modal-overview {
    margin-bottom: 24px;
}

.modal-overview h3 {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-overview p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== PLAYER PAGE ===== */
.player-container {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 100;
}

.player-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.5) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.player-container:hover .player-overlay,
.player-container.show-controls .player-overlay {
    opacity: 1;
}

.player-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.player-back-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.player-back-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.player-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
}

.player-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-bottom: 16px;
    cursor: pointer;
}

.player-progress-fill {
    height: 100%;
    background: var(--neon-green);
    border-radius: 2px;
    transition: width 0.1s;
}

.player-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-buttons-left,
.player-buttons-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.player-btn svg {
    width: 24px;
    height: 24px;
}

.player-time {
    color: #ffffff;
    font-size: 0.9rem;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    z-index: 10;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 16px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--neon-green) 0%, var(--neon-green-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.4);
    animation: float 3s ease-in-out infinite;
}

.login-logo-icon svg {
    width: 48px;
    height: 48px;
    color: #ffffff;
    margin-left: 4px;
}

.login-logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

.login-logo p {
    color: var(--text-muted);
    margin-top: 8px;
}

.login-card {
    padding: 32px;
    border-radius: 24px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.login-field label svg {
    width: 16px;
    height: 16px;
}

.login-hint {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.login-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.login-footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.login-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--neon-green);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: var(--neon-green-dark);
}

/* ===== ALERT BOXES ===== */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.alert-yellow {
    background: linear-gradient(to right, rgba(245, 158, 11, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-orange {
    background: linear-gradient(to right, rgba(249, 115, 22, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.alert-red {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-green {
    background: linear-gradient(to right, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-content {
    display: flex;
    gap: 12px;
}

.alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-icon svg {
    width: 22px;
    height: 22px;
}

.alert-yellow .alert-icon svg {
    color: #fbbf24;
}

.alert-orange .alert-icon svg {
    color: #fb923c;
}

.alert-red .alert-icon svg {
    color: #f87171;
}

.alert-green .alert-icon svg {
    color: #34d399;
}

.alert-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.alert-yellow .alert-title {
    color: #fbbf24;
}

.alert-orange .alert-title {
    color: #fb923c;
}

.alert-green .alert-title {
    color: #34d399;
}

.alert-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.alert-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s;
}

.alert-button:hover {
    transform: scale(1.05);
}

.alert-button.yellow {
    background: linear-gradient(to right, #f59e0b 0%, #f97316 100%);
    color: #000000;
}

.alert-button.orange {
    background: linear-gradient(to right, #f97316 0%, #ef4444 100%);
    color: #ffffff;
}

/* ===== ANIMATIONS ===== */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.5s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ===== BACKGROUND ORBS ===== */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #00d4ff 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 8s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #00a8cc 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: float 10s ease-in-out infinite reverse;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
    }

    .header-nav {
        display: none;
    }

    .hero {
        height: 50vh;
        min-height: 350px;
    }

    .hero-content {
        left: 16px;
        right: 16px;
        bottom: 60px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .content-section .section-title {
        padding: 0 16px;
    }

    .content-row {
        padding: 0 16px 16px;
    }

    .content-card {
        width: 140px;
    }

    .scroll-btn {
        display: none;
    }

    .search-bar input {
        width: 150px;
    }

    /* Mobile bottom navigation */
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(17, 17, 17, 0.98) 0%, rgba(10, 10, 10, 0.99) 100%);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0, 212, 255, 0.1);
        padding: 8px 0;
        z-index: 50;
        display: flex;
        justify-content: space-around;
    }

    .mobile-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 16px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.7rem;
        transition: color 0.2s;
    }

    .mobile-nav a.active {
        color: var(--neon-green);
    }

    .mobile-nav a svg {
        width: 24px;
        height: 24px;
    }

    body {
        padding-bottom: 70px;
    }

    /* Login modal mobile adjustments */
    .modal-overlay {
        padding: 12px;
        align-items: center;
    }

    #loginModal .modal-content {
        max-height: none;
        overflow-y: visible;
    }

    #loginModal .lm-inner {
        padding: 20px 18px !important;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px 20px;
    }

    .login-logo-icon {
        width: 72px;
        height: 72px;
    }

    .login-logo-icon svg {
        width: 36px;
        height: 36px;
    }

    .login-logo h1 {
        font-size: 2rem;
    }

    /* ===== Login Modal - No scroll, fit entirely on screen ===== */
    .modal-overlay {
        padding: 8px;
    }

    #loginModal .modal-content {
        max-height: none;
        overflow: visible;
    }

    #loginModal .lm-inner {
        padding: 16px 14px !important;
    }

    /* Compact header */
    #loginModal .lm-inner>div:first-child {
        margin-bottom: 10px !important;
    }

    #loginModal .lm-inner>div:first-child>div:first-child {
        width: 40px !important;
        height: 40px !important;
        margin-bottom: 6px !important;
        border-radius: 10px !important;
    }

    #loginModal .lm-inner>div:first-child>div:first-child svg {
        width: 20px !important;
        height: 20px !important;
    }

    #loginModal .lm-inner h2 {
        font-size: 1.1rem !important;
    }

    #loginModal .lm-inner #loginStepText {
        font-size: 0.75rem !important;
        margin-top: 2px !important;
    }

    /* Compact step content */
    #loginModal .lm-inner h3 {
        font-size: 0.95rem !important;
    }

    #loginModal .lm-inner p {
        font-size: 0.78rem !important;
    }

    /* Compact buttons */
    #loginModal .lm-inner .btn-primary,
    #loginModal .lm-inner .btn-secondary,
    #loginModal .lm-inner button[type="submit"] {
        padding: 10px !important;
        font-size: 0.9rem !important;
    }

    /* Compact input fields */
    #loginModal .lm-inner .input-field {
        padding: 10px 12px !important;
        font-size: 0.9rem !important;
    }

    /* Compact subscribe step icon */
    #loginModal #lm-step-subscribe>div:nth-child(2) {
        width: 38px !important;
        height: 38px !important;
        margin-bottom: 8px !important;
    }

    #loginModal #lm-step-subscribe>div:nth-child(2) svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* Compact plan/period cards */
    #lm-periodos-list>button,
    #lm-plans-list>button {
        padding: 8px 10px !important;
    }

    /* Reduce divider margins */
    #loginModal .lm-inner div[style*="margin:20px"],
    #loginModal .lm-inner div[style*="margin:12px"] {
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }

    /* Modal close button smaller */
    #loginModal .modal-close {
        top: 8px !important;
        right: 8px !important;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* ===== ALERT BOXES ===== */
.alert {
    border-radius: 12px;
    padding: 16px;
    position: relative;
}

.alert-content {
    display: flex;
    gap: 12px;
}

.alert-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-icon svg {
    width: 20px;
    height: 20px;
}

.alert-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.alert-text {
    font-size: 0.875rem;
    margin-bottom: 12px;
    color: inherit;
    opacity: 0.9;
}

.alert-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
}

/* Yellow Alert - Not registered */
.alert-yellow {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-yellow .alert-icon {
    background: rgba(245, 158, 11, 0.2);
}

.alert-yellow .alert-icon svg {
    color: #fbbf24;
}

.alert-yellow .alert-title {
    color: #fbbf24;
}

.alert-yellow .alert-text {
    color: #fcd34d;
}

.alert-button.yellow {
    background: #f59e0b;
    color: #000000;
}

.alert-button.yellow:hover {
    background: #fbbf24;
}

/* Orange Alert - Subscription expired/pending */
.alert-orange {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.alert-orange .alert-icon {
    background: rgba(249, 115, 22, 0.2);
}

.alert-orange .alert-icon svg {
    color: #fb923c;
}

.alert-orange .alert-title {
    color: #fb923c;
}

.alert-orange .alert-text {
    color: #fdba74;
}

.alert-button.orange {
    background: #f97316;
    color: #ffffff;
}

.alert-button.orange:hover {
    background: #fb923c;
}

/* Red Alert - Error */
.alert-red {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 12px;
}

/* Green Alert - Success */
.alert-green {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-green .alert-icon {
    background: rgba(16, 185, 129, 0.2);
}

.alert-green .alert-icon svg {
    color: #34d399;
}

.alert-green .alert-title {
    color: #34d399;
}

/* Mobile Nav Hidden on Desktop */
@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

/* Canais e futebol usam a mesma vitrine, com logos em vez de capas verticais. */
.channel-card .card-poster,
.football-card .card-poster {
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(103, 232, 249, .2);
}

.channel-card .card-poster img,
.football-card .card-poster img {
    object-fit: contain;
    padding: 12px;
    background: radial-gradient(circle at 50% 22%, rgba(20, 120, 181, .28), transparent 58%), #07101f;
}

.channel-card .card-overlay,
.football-card .card-overlay { opacity: 1; padding: 9px; }

.football-intro {
    padding: 108px 48px 20px;
    text-align: center;
}

.football-intro span {
    color: var(--neon-green);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.football-intro h2 { margin: 6px 0; font-size: 2rem; color: #fff; }
.football-intro p { margin: 0; color: var(--text-muted); }
.football-card-name { display: block; min-height: 36px; padding: 8px 3px 0; color: #fff; font-size: .84rem; font-weight: 700; line-height: 1.2; }

@media (max-width: 768px) {
    .channel-card .card-poster,
    .football-card .card-poster { aspect-ratio: 1 / 1; }
    .football-intro { padding: 104px 20px 16px; }
    .football-intro h2 { font-size: 1.45rem; }
    .football-card-name { font-size: .73rem; min-height: 32px; }
}

/* ===== CATÁLOGO MOBILE-FIRST =====
   A vitrine pública é usada como um app no celular. Estas regras não
   alteram o layout desktop e concentram a leitura e as ações no polegar. */
@media (max-width: 768px) {
    .catalog-app {
        background:
            radial-gradient(75% 35% at 100% 0%, rgba(0, 212, 255, 0.16), transparent 68%),
            #060911;
        padding-bottom: calc(96px + env(safe-area-inset-bottom));
    }

    .catalog-app .header {
        position: absolute;
        padding: max(12px, env(safe-area-inset-top)) 16px 10px;
        background: linear-gradient(180deg, rgba(4, 8, 16, 0.94), rgba(4, 8, 16, 0));
    }

    .catalog-app .header.scrolled {
        position: fixed;
        background: rgba(6, 9, 17, 0.9);
        border-bottom: 1px solid rgba(148, 163, 184, 0.15);
        backdrop-filter: blur(18px);
    }

    .catalog-app .header-content,
    .catalog-app .header-left,
    .catalog-app .header-right {
        min-width: 0;
    }

    .catalog-app .header-left { flex: 1; }

    .catalog-app .header-logo img {
        height: auto !important;
        width: 54px !important;
        max-width: 54px !important;
    }

    .catalog-app .header-right { gap: 8px; }

    .catalog-app .mobile-plans-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0 12px;
        border: 1px solid rgba(103, 232, 249, 0.36);
        border-radius: 14px;
        color: #d9faff;
        background: rgba(7, 17, 31, 0.72);
        font-size: 0.82rem;
        font-weight: 750;
        text-decoration: none;
        white-space: nowrap;
    }

    .catalog-app .mobile-reseller-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0 10px;
        border: 1px solid rgba(61, 226, 145, .55);
        border-radius: 14px;
        color: #a7ffcf;
        background: rgba(7, 36, 34, .7);
        font-size: 0.78rem;
        font-weight: 800;
        text-decoration: none;
        white-space: nowrap;
    }

    .catalog-app .header-right > .btn-primary {
        min-height: 44px;
        padding: 0 15px !important;
        border-radius: 14px;
        font-size: 0.88rem !important;
        box-shadow: 0 10px 24px rgba(0, 212, 255, 0.22);
    }

    .catalog-app .header-right > .btn-primary svg { width: 18px; height: 18px; }

    .mobile-search-toggle {
        display: grid;
        place-items: center;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        color: #e5f4ff;
        border: 1px solid rgba(148, 163, 184, 0.28);
        border-radius: 14px;
        background: rgba(7, 17, 31, 0.72);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-search-toggle svg { width: 21px; height: 21px; }

    .catalog-support-float {
        right: 14px;
        bottom: calc(84px + env(safe-area-inset-bottom));
        min-height: 44px;
        padding: 0 13px;
        font-size: .8rem;
    }

    .catalog-app .search-bar {
        position: fixed;
        z-index: 60;
        top: calc(68px + env(safe-area-inset-top));
        left: 16px;
        right: 16px;
        display: flex;
        height: 52px;
        border-radius: 16px;
        background: rgba(9, 19, 34, 0.98);
        border-color: rgba(103, 232, 249, 0.42);
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
        pointer-events: none;
        transition: opacity .18s ease, transform .18s ease;
    }

    .catalog-app .search-bar.is-open,
    .catalog-app .search-bar:focus-within {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .catalog-app .search-bar input {
        width: 100%;
        min-width: 0;
        font-size: 16px;
        padding: 13px 14px;
    }

    .catalog-app .hero {
        height: clamp(450px, 68svh, 590px);
        min-height: 450px;
        margin: 0 10px 30px;
        border-radius: 0 0 26px 26px;
        box-shadow: 0 24px 42px rgba(0, 0, 0, 0.35);
    }

    .catalog-app .hero-bg img { object-position: center top; }

    .catalog-app .hero-bg .gradient-left {
        background: linear-gradient(90deg, rgba(3, 7, 15, 0.98) 0%, rgba(3, 7, 15, 0.69) 58%, rgba(3, 7, 15, 0.16) 100%);
    }

    .catalog-app .hero-bg .gradient-bottom {
        background: linear-gradient(0deg, #060911 0%, rgba(6, 9, 17, 0.92) 22%, rgba(6, 9, 17, 0.14) 68%, rgba(6, 9, 17, 0.32) 100%);
    }

    .catalog-app .hero-content {
        bottom: 24px;
        left: 18px;
        right: 18px;
        max-width: none;
    }

    .catalog-app .hero-title {
        max-width: 90%;
        margin-bottom: 8px;
        font-size: clamp(2rem, 9vw, 2.65rem);
        line-height: 1.02;
        letter-spacing: -0.045em;
    }

    .catalog-app .hero-description {
        max-width: 300px;
        margin-bottom: 18px;
        color: #c9d9eb;
        font-size: 0.98rem;
        line-height: 1.45;
    }

    .catalog-app .hero-buttons {
        display: grid;
        grid-template-columns: 1fr 1.18fr;
        gap: 10px;
    }

    .catalog-app .hero-buttons .btn-primary,
    .catalog-app .hero-buttons .btn-secondary {
        min-height: 54px;
        padding: 10px 12px;
        border-radius: 15px;
        justify-content: center;
        font-size: 0.94rem;
        line-height: 1.15;
    }

    .catalog-app .hero-buttons .btn-secondary {
        background: rgba(226, 232, 240, 0.17);
        border: 1px solid rgba(226, 232, 240, 0.34);
        backdrop-filter: blur(9px);
    }

    .catalog-app .content-section { margin-bottom: 30px; }

    .catalog-app .section-header {
        align-items: center;
        gap: 10px;
        padding: 0 18px;
        margin-bottom: 11px;
    }

    .catalog-app .content-section .section-title {
        padding: 0;
        margin: 0;
        font-size: 1.12rem;
        line-height: 1.2;
        letter-spacing: -0.025em;
    }

    .catalog-app .view-all-btn {
        min-height: 38px;
        padding: 7px 11px;
        border-radius: 12px;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .catalog-app .content-row-wrapper { overflow: visible; }

    .catalog-app .content-row {
        gap: 12px;
        padding: 0 18px 4px;
        padding-left: calc(18px + env(safe-area-inset-left, 0px));
        padding-right: calc(18px + env(safe-area-inset-right, 0px));
        justify-content: flex-start !important;
        overscroll-behavior-inline: contain;
        scroll-padding-inline: 18px;
        scroll-snap-type: inline proximity;
    }

    .catalog-app .content-row::after {
        content: '';
        flex: 0 0 2px;
    }

    .catalog-app .content-card {
        width: min(39vw, 148px);
        scroll-snap-align: start;
        transform: none !important;
    }

    .catalog-app .card-poster {
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.09);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
    }

    .catalog-app .card-overlay {
        opacity: 1;
        padding: 28px 9px 9px;
        background: linear-gradient(0deg, rgba(3, 7, 15, 0.94), rgba(3, 7, 15, 0.04) 60%);
    }

    .catalog-app .card-title {
        display: -webkit-box;
        overflow: hidden;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 0.78rem;
        line-height: 1.18;
        text-shadow: 0 1px 6px #000;
    }

    .catalog-app .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        padding: 0 18px 110px;
    }

    .catalog-app .category-grid .content-card { width: 100%; }

    .catalog-app .back-btn {
        min-height: 46px;
        margin: 84px 18px 20px;
        padding: 10px 16px;
        border-radius: 14px;
    }

    .catalog-app #categoryTitle {
        padding: 0 18px 20px !important;
        font-size: 1.35rem !important;
    }

    .catalog-app .mobile-nav {
        left: 10px;
        right: 10px;
        bottom: max(9px, env(safe-area-inset-bottom));
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 22px;
        padding: 7px 5px;
        background: rgba(7, 16, 30, 0.94);
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
        backdrop-filter: blur(18px);
        justify-content: space-between;
    }

    .catalog-app .mobile-nav a {
        min-width: 0;
        min-height: 58px;
        flex: 1 1 0;
        gap: 4px;
        padding: 6px 3px;
        border-radius: 15px;
        font-size: clamp(0.61rem, 2.5vw, 0.71rem);
        font-weight: 600;
    }

    .catalog-app .mobile-nav a svg { width: 22px; height: 22px; }

    /* Ícones com cores próprias para facilitar a identificação rápida das áreas. */
    .catalog-app .mobile-nav a:not(.active):nth-child(1) svg { color: #38bdf8; filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.45)); }
    .catalog-app .mobile-nav a:not(.active):nth-child(2) svg { color: #fbbf24; filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.42)); }
    .catalog-app .mobile-nav a:not(.active):nth-child(3) svg { color: #a78bfa; filter: drop-shadow(0 0 5px rgba(167, 139, 250, 0.45)); }
    .catalog-app .mobile-nav a:not(.active):nth-child(4) svg { color: #f472b6; filter: drop-shadow(0 0 5px rgba(244, 114, 182, 0.42)); }
    .catalog-app .mobile-nav a:not(.active):nth-child(5) svg { color: #22c55e; filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.45)); }

    .catalog-app .mobile-nav a.active {
        color: #07111d;
        background: linear-gradient(135deg, #67e8f9, #38bdf8);
        box-shadow: 0 7px 15px rgba(14, 165, 233, 0.22);
    }

    .catalog-app .modal-overlay { padding: 0; align-items: flex-end; }
    .catalog-app .modal-content {
        width: 100%;
        max-height: 88svh;
        border-radius: 24px 24px 0 0;
        overflow-y: auto;
    }
}

@media (max-width: 380px) {
    .catalog-app .header-right { gap: 5px; }
    .catalog-app .mobile-plans-link { padding: 0 8px; font-size: 0.72rem; }
    .catalog-app .mobile-reseller-link { padding: 0 8px; font-size: 0.72rem; }
    .catalog-app .header-right > .btn-primary { padding: 0 9px !important; }
    .catalog-app .header-right > .btn-primary svg { display: none; }
    .catalog-app .hero { height: 440px; min-height: 440px; }
    .catalog-app .content-card { width: 136px; }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-app *, .catalog-app *::before, .catalog-app *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
