/* ==========================================================================
   INTERPLEX | Unidade Móvel IBAMA — Veículos Especiais
   Design System com Efeito Glassmorphism (GlassKit / visionOS / Liquid Glass)
   ========================================================================== */

/* ─── 1. DESIGN TOKENS (GlassKit + Identidade Visual IBAMA) ─────────────── */
:root,
[data-theme="dark"] {
    color-scheme: dark;

    /* Tokens Oficiais GlassKit Rebranded para IBAMA */
    --gl-color-primary:        #00E676;
    --gl-color-primary-dark:   #00873E;
    --gl-color-primary-mid:    #00C853;
    --gl-color-bg-dark:        #040d08;
    --gl-color-bg-mid:         #071910;
    --gl-color-bg-light:       #0c2518;
    --gl-color-text:           #ffffff;
    --gl-color-text-muted:     rgba(255, 255, 255, 0.65);
    --gl-color-text-heading:   #ffffff;
    --gl-color-success:        #00E676;
    --gl-color-warning:        #F5B800;
    --gl-color-error:          #ff4d4d;

    /* Superfícies de Vidro GlassKit */
    --gl-surface-1:            rgba(255, 255, 255, 0.05);
    --gl-surface-2:            rgba(255, 255, 255, 0.08);
    --gl-surface-3:            rgba(255, 255, 255, 0.12);
    --gl-surface-milk:         rgba(255, 255, 255, 0.25);
    --gl-surface-overlay:      rgba(4, 13, 8, 0.75);

    /* Bordas & Reflexos Especulares (Liquid Glass) */
    --gl-border-subtle:        rgba(255, 255, 255, 0.14);
    --gl-border-medium:        rgba(255, 255, 255, 0.22);
    --gl-border-strong:        rgba(255, 255, 255, 0.38);
    --gl-border-emerald:       rgba(0, 230, 118, 0.40);
    --gl-border-gold:          rgba(245, 184, 0, 0.45);

    /* Inset Highlights de Luz Especular (Luz superior do vidro) */
    --gl-inset-subtle:         inset 0 1px 1px rgba(255, 255, 255, 0.16);
    --gl-inset-medium:         inset 0 1px 1px rgba(255, 255, 255, 0.26);
    --gl-inset-strong:         inset 0 1px 2px rgba(255, 255, 255, 0.42);

    /* Desfoque de Fundo Glassmorphism */
    --gl-blur:                 24px;
    --gl-blur-heavy:           32px;
    --gl-blur-soft:            14px;

    /* Sombras & Brilho */
    --gl-shadow-card:          0 10px 32px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.22);
    --gl-shadow-hover:         0 14px 44px rgba(0, 230, 118, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.40);
    --gl-shadow-glow:          0 0 24px rgba(0, 230, 118, 0.35);

    /* Variáveis Nativas do Projeto Interplex */
    --color-bg:                #040d08;
    --color-bg-card:           rgba(8, 25, 16, 0.62);
    --color-bg-header:         rgba(6, 20, 13, 0.72);
    
    --color-gold:              #00E676;
    --color-gold-hover:        #69F0AE;
    --color-gold-dark:         #00873E;
    
    --color-ibama-yellow:      #F5B800;
    --color-ibama-yellow-dark: #D97706;
    
    --color-primary:           #00E676;
    --color-primary-hover:     #69F0AE;
    --color-text-primary:      #FFFFFF;
    --color-text-secondary:    #C8E6C9;
    --color-text-muted:        #81C784;
    
    --color-success:           #00E676;
    --color-whatsapp:          #25d366;
    --color-whatsapp-dark:     #128c7e;
    
    --border-radius:           20px;
    --border-radius-sm:        12px;
    --border-light:            1px solid rgba(255, 255, 255, 0.14);
    --border-gold:             1px solid rgba(245, 184, 0, 0.40);
    --shadow-soft:             0 12px 36px rgba(0, 0, 0, 0.5);
    --shadow-glow:             0 0 25px rgba(0, 230, 118, 0.30);
    
    --font-heading:            'Montserrat', sans-serif;
    --font-body:               'Inter', sans-serif;
    --transition-smooth:       all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ─── 2. RESET & BASE ───────────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #040d08;
    background-image: 
        linear-gradient(180deg, rgba(4, 13, 8, 0.45) 0%, rgba(4, 13, 8, 0.65) 50%, rgba(4, 13, 8, 0.78) 100%),
        url('fundopaginaweb.jpg');
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customizada com Efeito de Vidro */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(4, 13, 8, 0.8);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-gold-dark), var(--color-gold));
    border-radius: 10px;
}

/* ─── 3. LAYOUT & CONTAINER PRINCIPAL (Glass Monolith) ───────────────────── */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 640px;
    margin: 0 auto;
    background: rgba(6, 20, 13, 0.72);
    backdrop-filter: blur(32px) saturate(190%);
    -webkit-backdrop-filter: blur(32px) saturate(190%);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 0 90px rgba(0, 0, 0, 0.9),
        inset 1px 0 0 rgba(255, 255, 255, 0.08),
        inset -1px 0 0 rgba(255, 255, 255, 0.08);
    position: relative;
}

/* ─── 4. HEADER GLASSMORFISMO FIXO (iOS 26 Liquid Glass) ────────────────── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 20, 13, 0.68);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 -1px 1px rgba(0, 230, 118, 0.15);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ibama-badge-pill {
    background: linear-gradient(135deg, rgba(0, 135, 62, 0.85), rgba(0, 200, 83, 0.9));
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        0 0 12px rgba(0, 200, 83, 0.5);
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--color-text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo span {
    color: var(--color-gold);
    text-shadow: 0 0 16px rgba(0, 230, 118, 0.6);
}

.subtitle {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--color-text-secondary);
    margin-top: -2px;
}

/* Badge do Nome do Veículo — Cápsula de Vidro Liquid Glass */
.vehicle-name-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.22) 0%, rgba(0, 200, 83, 0.18) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(245, 184, 0, 0.45);
    color: #ffd152;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 5px 14px;
    border-radius: 9999px;
    text-transform: uppercase;
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.35),
        0 4px 16px rgba(245, 184, 0, 0.25);
    margin-top: 4px;
    transition: var(--transition-smooth);
}

.vehicle-name-badge:hover {
    transform: translateY(-1px);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        0 6px 20px rgba(245, 184, 0, 0.4);
}

/* Indicador de Status de Rede */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-success);
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-success);
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

/* ─── 5. CONTEÚDO PRINCIPAL ──────────────────────────────────────────────── */
.app-main {
    flex-grow: 1;
    padding: 24px 20px;
}

.view {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Banner de Boas-Vindas com Efeito Frosted */
.welcome-banner {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.welcome-banner h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-text-primary);
    margin-bottom: 6px;
    font-weight: 700;
}

.welcome-banner p {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ─── 6. BARRA DE BUSCA EM CÁPSULA DE VIDRO (GlassKit Input) ────────────── */
.search-container {
    margin-bottom: 24px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    font-size: 1.1rem;
    color: var(--color-gold);
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 0 6px rgba(0, 230, 118, 0.4));
}

#search-input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

#search-input:focus {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(0, 230, 118, 0.6);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        0 0 24px rgba(0, 230, 118, 0.35);
}

/* ─── 7. CARDS DE TÓPICOS (Liquid Glass / visionOS Cards) ───────────────── */
.topics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.topic-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(8, 25, 16, 0.65);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.22);
}

/* Faixa lateral esquerda indicadora de cor */
.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    opacity: 0.75;
    transition: var(--transition-smooth);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

/* Reflexo especular de luz superior (Liquid Glass) */
.topic-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
    pointer-events: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.topic-card:hover {
    transform: translateY(-3px) scale(1.01);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.04) 100%), rgba(12, 38, 25, 0.78);
    border-color: rgba(0, 230, 118, 0.5);
    box-shadow: 
        0 14px 44px rgba(0, 230, 118, 0.22),
        inset 0 1px 2px rgba(255, 255, 255, 0.38),
        0 0 20px rgba(0, 230, 118, 0.18);
}

.topic-card:hover::before {
    opacity: 1;
    width: 6px;
    box-shadow: 0 0 16px var(--color-gold);
}

.topic-card:active {
    transform: translateY(-1px) scale(0.99);
}

.topic-info-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topic-icon {
    font-size: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.topic-icon svg {
    width: 28px;
    height: 28px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.topic-details h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.topic-details p {
    font-size: 0.76rem;
    color: var(--color-text-secondary);
    margin-top: 3px;
    line-height: 1.4;
}

.arrow-icon {
    font-size: 1.1rem;
    color: var(--color-gold);
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 6px rgba(0, 230, 118, 0.4));
}

.topic-card:hover .arrow-icon {
    transform: translateX(4px);
}

/* ─── 8. CARD DE SUPORTE HUMANO (Glass Accent Glow) ─────────────────────── */
.human-support-card {
    background: linear-gradient(135deg, rgba(20, 35, 28, 0.82) 0%, rgba(9, 18, 13, 0.88) 100%);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(0, 230, 118, 0.35);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
    margin-top: 32px;
    box-shadow: 
        0 14px 44px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        0 0 30px rgba(0, 230, 118, 0.12);
}

.support-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--color-gold);
    margin-bottom: 6px;
    text-shadow: 0 0 14px rgba(0, 230, 118, 0.35);
}

.support-info p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 18px;
}

.support-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

/* ─── 9. BOTÕES COM EFEITO LIQUID GLASS ─────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #00E676 0%, #00873E 100%);
    color: #04140a;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        0 6px 22px rgba(0, 230, 118, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #69F0AE 0%, #00C853 100%);
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.6),
        0 10px 28px rgba(0, 230, 118, 0.5);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.25);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.35);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.35),
        0 6px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #34e77a 0%, #17a090 100%);
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        0 10px 28px rgba(37, 211, 102, 0.45);
}

.btn-whatsapp:active {
    transform: scale(0.98);
}

.btn-secondary-wpp {
    background: rgba(30, 41, 59, 0.75) !important;
    color: #38BDF8 !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    backdrop-filter: blur(16px) !important;
}

.btn-secondary-wpp:hover {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: #38BDF8 !important;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3) !important;
}

/* ─── 10. TELA DE VISUALIZAÇÃO DO TÓPICO (Help View) ───────────────────── */
#help-view #btn-back-menu {
    margin-bottom: 24px;
    padding: 10px 18px;
    font-size: 0.85rem;
    width: auto;
    display: inline-flex;
    border-radius: 9999px;
}

#help-view #btn-back-menu .arrow {
    font-size: 1.1rem;
    margin-right: 4px;
}

.topic-header {
    margin-bottom: 20px;
}

.topic-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-gold);
    background: rgba(0, 230, 118, 0.14);
    border: 1px solid rgba(0, 230, 118, 0.35);
    padding: 5px 14px;
    border-radius: 9999px;
    margin-bottom: 10px;
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

#topic-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--color-text-primary);
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.topic-model-box {
    margin-top: 12px;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.16) 0%, rgba(0, 135, 62, 0.2) 100%);
    border: 1px solid rgba(245, 184, 0, 0.45);
    border-radius: var(--border-radius-sm);
    padding: 10px 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        0 4px 16px rgba(0, 0, 0, 0.3);
}

.topic-model-box .model-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
}

.topic-model-box .model-sub {
    font-size: 0.86rem;
    font-weight: 800;
    color: #F5B800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Card do Vídeo (VisionOS Viewport) */
.video-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(8, 25, 16, 0.68);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 
        0 14px 44px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.video-container {
    position: relative;
    width: 100%;
    min-height: 280px;
    background-color: #000;
    border-radius: calc(var(--border-radius) - 6px);
    overflow: hidden;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.video-container video {
    width: 100%;
    height: auto;
    max-height: 520px;
    min-height: 280px;
    border: none;
    object-fit: contain;
    display: block;
    background-color: #000;
}

.video-placeholder {
    width: 100%;
    min-height: 280px;
    background: linear-gradient(135deg, rgba(19, 30, 47, 0.85) 0%, rgba(10, 16, 26, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px dashed rgba(245, 184, 0, 0.45);
    border-radius: calc(var(--border-radius) - 6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.placeholder-content {
    max-width: 90%;
}

.placeholder-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 12px rgba(245, 184, 0, 0.5));
}

#placeholder-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-ibama-yellow);
    margin-bottom: 6px;
}

#placeholder-text {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.45;
}

.playlist-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.playlist-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    padding: 8px 18px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.playlist-btn:hover:not(:disabled) {
    background: rgba(0, 230, 118, 0.2);
    color: var(--color-gold);
    border-color: rgba(0, 230, 118, 0.5);
    box-shadow: 0 0 16px rgba(0, 230, 118, 0.25);
    transform: translateY(-1px);
}

.playlist-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.playlist-counter {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-gold);
    min-width: 54px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.video-play-icon {
    font-size: 1.2rem;
    color: var(--color-gold);
}

/* Card de Instruções Passo a Passo */
.instructions-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(8, 25, 16, 0.68);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--border-radius);
    padding: 22px;
    margin-bottom: 32px;
    box-shadow: 
        0 14px 44px rgba(0, 0, 0, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.22);
}

.instructions-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--color-gold);
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    text-shadow: 0 0 12px rgba(0, 230, 118, 0.3);
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}

.step-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 230, 118, 0.3);
    transform: translateX(3px);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.25) 0%, rgba(0, 135, 62, 0.3) 100%);
    border: 1px solid rgba(0, 230, 118, 0.5);
    color: var(--color-gold);
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 1px;
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        0 0 10px rgba(0, 230, 118, 0.3);
}

.step-content {
    font-size: 0.92rem;
    color: var(--color-text-primary);
    line-height: 1.5;
}

.step-content strong {
    color: #69F0AE;
}

/* Alerta de Cuidado */
.alert-box {
    margin-top: 22px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(185, 28, 28, 0.16) 100%);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--border-radius-sm);
    padding: 16px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    backdrop-filter: blur(16px);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 4px 20px rgba(239, 68, 68, 0.15);
}

.alert-icon {
    font-size: 1.3rem;
}

.alert-text {
    font-size: 0.86rem;
    color: #fca5a5;
    line-height: 1.45;
}

.alert-text strong {
    color: #ffffff;
}

/* Footer de Ação da Ajuda */
.action-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.action-footer .btn-secondary {
    order: 2;
}

.action-footer .btn-primary {
    order: 1;
}

/* Footer Geral */
.app-footer {
    text-align: center;
    padding: 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    background: rgba(6, 20, 13, 0.5);
}

.app-footer p {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

/* ─── 11. BOTÃO INSTALAR APP (Glass Pill Button) ────────────────────────── */
.header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.btn-install-app {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.25) 0%, rgba(0, 230, 118, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.35),
        0 4px 16px rgba(0, 230, 118, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.btn-install-app:hover {
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.4) 0%, rgba(0, 230, 118, 0.45) 100%);
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        0 6px 22px rgba(0, 230, 118, 0.45);
    border-color: #00E676;
}

.btn-install-app:active {
    transform: scale(0.98);
}

.btn-install-app.hidden {
    display: none !important;
}

.install-icon {
    font-size: 0.95rem;
}

/* Banner Offline */
.offline-banner {
    background: linear-gradient(90deg, #b45309 0%, #d97706 100%);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.offline-banner.hidden {
    display: none !important;
}

.offline-icon {
    font-size: 1rem;
    animation: pulse 2s infinite;
}

/* ─── 12. CARD DE SINCRONIZAÇÃO OFFLINE (Glass Progress) ───────────────── */
.video-sync-card {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.1) 0%, rgba(10, 26, 18, 0.75) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: var(--transition-smooth);
}

.video-sync-card.ready {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.18) 0%, rgba(8, 22, 14, 0.85) 100%);
    border-color: rgba(0, 230, 118, 0.55);
    box-shadow: 
        0 10px 36px rgba(0, 230, 118, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.sync-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.sync-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.sync-text-group h4 {
    font-size: 0.92rem;
    color: #ffffff;
    font-weight: 700;
}

.sync-text-group p {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.sync-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.sync-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00873E 0%, #00E676 100%);
    border-radius: 9999px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
}

/* ─── 13. MODAL DE INSTRUÇÕES IOS (GlassKit Modal) ──────────────────────── */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(4, 13, 8, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-backdrop.hidden {
    display: none !important;
}

.modal-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%), rgba(12, 34, 22, 0.9);
    backdrop-filter: blur(36px) saturate(200%);
    -webkit-backdrop-filter: blur(36px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    max-width: 440px;
    width: 100%;
    padding: 26px;
    position: relative;
    box-shadow: 
        0 24px 80px rgba(0, 0, 0, 0.8),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.modal-header .modal-icon {
    font-size: 2rem;
}

.modal-header h3 {
    font-family: var(--font-heading);
    color: var(--color-gold);
    font-size: 1.25rem;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ios-intro {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
}

.ios-instructions {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ios-instructions li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.86rem;
    backdrop-filter: blur(8px);
}

.ios-instructions .step-num {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    color: #04140a;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.ios-icon-highlight {
    background: rgba(0, 230, 118, 0.2);
    color: var(--color-gold);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.ios-badge {
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.35);
    padding: 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    color: #69F0AE;
    backdrop-filter: blur(8px);
}

.modal-footer {
    margin-top: 20px;
}

.modal-footer .btn-primary {
    width: 100%;
}

/* ─── 14. RESPONSIVIDADE ────────────────────────────────────────────────── */
@media (min-width: 480px) {
    .action-footer {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .action-footer .btn-primary {
        flex-grow: 1.5;
        order: 2;
    }
    
    .action-footer .btn-secondary {
        flex-grow: 1;
        width: auto;
        order: 1;
    }
}

/* ─── 15. CLASSES UTILITÁRIAS ────────────────────────────────────────────── */
.hidden {
    display: none !important;
}

#video-container-box {
    display: flex;
    flex-direction: column;
}

#help-video {
    width: 100%;
    height: auto;
    max-height: 520px;
    min-height: 200px;
    display: block;
    background: #000;
    object-fit: contain;
}

#video-placeholder {
    width: 100%;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(19, 30, 47, 0.85) 0%, rgba(10, 16, 26, 0.95) 100%);
    border: 1px dashed rgba(245, 184, 0, 0.45);
    border-radius: calc(var(--border-radius) - 6px);
    padding: 20px;
    text-align: center;
}

#video-placeholder.hidden {
    display: none !important;
}

/* ─── 16. ABERTURA CINEMÁTICA / VÍDEO INTRO DO APP ──────────────────────── */
.cinematic-intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #040d08;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.7s ease;
    overflow: hidden;
}

.cinematic-intro-overlay.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.intro-video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #040d08;
}

.intro-controls-top {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 20px);
    right: calc(env(safe-area-inset-right, 0px) + 20px);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-skip-intro {
    background: rgba(6, 20, 13, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 9px 20px;
    border-radius: 9999px;
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.btn-skip-intro:hover {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.3) 0%, rgba(0, 135, 62, 0.4) 100%);
    border-color: #00E676;
    color: #00E676;
    transform: scale(1.04);
    box-shadow: 
        0 6px 24px rgba(0, 230, 118, 0.35),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.btn-skip-intro:active {
    transform: scale(0.97);
}

.btn-sound-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(6, 20, 13, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
    font-size: 1.1rem;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.btn-sound-toggle:hover {
    background: rgba(0, 230, 118, 0.2);
    border-color: #00E676;
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(0, 230, 118, 0.3);
}

.btn-sound-toggle:active {
    transform: scale(0.95);
}

.intro-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #00873E 0%, #00E676 70%, #F5B800 100%);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.8);
    z-index: 10;
}
