@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════
   Tema Frieren — Sousou no Frieren
   ═══════════════════════════════════════════════════════════ */

body.frieren-theme {
    --dark-bg: transparent;
    --dark-secondary: rgba(10, 22, 34, 0.78);
    --dark-accent: rgba(14, 32, 48, 0.88);
    --primary: #72c0c0;
    --primary-light: #a8e0e0;
    --primary-dark: #4a9898;
    --accent-gold: #d4b07a;
    --accent-gold-light: #ecd9a8;
    --accent-moon: #dce8f2;
    --text-primary: #f0f6fa;
    --text-secondary: #8fa8b8;
    --success: #62c492;
    --warning: #d4b07a;
    --border-radius: 20px;
    --border-radius-small: 12px;
    --border-radius-large: 28px;
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 16px 56px rgba(110, 192, 192, 0.22);
    --glass-bg: rgba(10, 24, 38, 0.62);
    --glass-border: rgba(168, 224, 224, 0.14);
    font-family: 'Outfit', 'Poppins', sans-serif;
    background: #060c12;
    min-height: 100vh;
}

body.frieren-theme::before {
    display: none;
}

/* ── Camada de fundo ── */
.frieren-video-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.frieren-video-bg__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.08);
    filter: saturate(0.8) brightness(0.5) contrast(1.08);
    transition: opacity 1.5s ease;
}

.frieren-video-bg--playing .frieren-video-bg__media {
    opacity: 1;
    animation: frierenKenBurns 50s ease-in-out infinite alternate;
}

@keyframes frierenKenBurns {
    from { transform: scale(1.08) translate(0, 0); }
    to   { transform: scale(1.14) translate(-1.2%, -0.6%); }
}

.frieren-video-bg__fallback {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 100% 80% at 50% 110%, rgba(20, 50, 60, 0.6) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 20% 80%, rgba(74, 152, 152, 0.12) 0%, transparent 50%),
        linear-gradient(175deg, #060c12 0%, #0e1e2c 35%, #152838 65%, #0a1620 100%);
}

.frieren-video-bg__aurora {
    position: absolute;
    inset: -20% -10%;
    background:
        radial-gradient(ellipse 50% 30% at 30% 20%, rgba(110, 192, 192, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 40% 25% at 70% 15%, rgba(212, 176, 122, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 60% 35% at 50% 30%, rgba(140, 180, 220, 0.06) 0%, transparent 65%);
    animation: frierenAurora 20s ease-in-out infinite alternate;
    opacity: 0.9;
}

.frieren-video-bg--playing .frieren-video-bg__aurora {
    opacity: 0.35;
}

@keyframes frierenAurora {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.7; }
    50%  { transform: translate(2%, 1%) scale(1.05); opacity: 1; }
    100% { transform: translate(-1%, 2%) scale(1.02); opacity: 0.8; }
}

.frieren-video-bg__moon {
    position: absolute;
    top: 8%;
    right: 12%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f4f8fc 0%, #c8dce8 40%, rgba(200, 220, 232, 0) 70%);
    box-shadow:
        0 0 60px rgba(200, 220, 240, 0.35),
        0 0 120px rgba(168, 224, 224, 0.15),
        inset -8px -8px 20px rgba(100, 140, 160, 0.2);
    opacity: 0.85;
    animation: frierenMoonPulse 6s ease-in-out infinite alternate;
}

.frieren-video-bg--playing .frieren-video-bg__moon {
    opacity: 0.45;
}

@keyframes frierenMoonPulse {
    from { box-shadow: 0 0 50px rgba(200, 220, 240, 0.3), 0 0 100px rgba(168, 224, 224, 0.12); }
    to   { box-shadow: 0 0 70px rgba(200, 220, 240, 0.45), 0 0 140px rgba(168, 224, 224, 0.2); }
}

.frieren-video-bg__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.85;
}

.frieren-video-bg--playing .frieren-video-bg__canvas {
    opacity: 0.4;
}

.frieren-video-bg__overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(
        180deg,
        rgba(6, 12, 18, 0.25) 0%,
        rgba(8, 18, 28, 0.45) 40%,
        rgba(6, 12, 18, 0.78) 100%
    );
}

.frieren-video-bg__vignette {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 30%, rgba(4, 8, 12, 0.7) 100%);
}

.frieren-video-bg__stars {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        radial-gradient(1px 1px at 8% 12%, rgba(220, 232, 240, 0.9), transparent),
        radial-gradient(1px 1px at 18% 28%, rgba(168, 224, 224, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 32% 8%, rgba(220, 232, 240, 0.8), transparent),
        radial-gradient(1px 1px at 48% 18%, rgba(200, 220, 232, 0.6), transparent),
        radial-gradient(1px 1px at 62% 6%, rgba(212, 176, 122, 0.45), transparent),
        radial-gradient(1.2px 1.2px at 78% 22%, rgba(220, 232, 240, 0.7), transparent),
        radial-gradient(1px 1px at 88% 10%, rgba(168, 224, 224, 0.55), transparent),
        radial-gradient(1px 1px at 95% 32%, rgba(220, 232, 240, 0.5), transparent),
        radial-gradient(1px 1px at 5% 45%, rgba(110, 192, 192, 0.4), transparent),
        radial-gradient(1px 1px at 25% 55%, rgba(200, 220, 232, 0.35), transparent),
        radial-gradient(1px 1px at 55% 38%, rgba(168, 224, 224, 0.4), transparent),
        radial-gradient(1px 1px at 72% 48%, rgba(212, 176, 122, 0.3), transparent);
    animation: frierenTwinkle 10s ease-in-out infinite alternate;
}

@keyframes frierenTwinkle {
    from { opacity: 0.55; }
    to   { opacity: 1; }
}

/* Conteúdo acima do fundo (não aplicar em overlays fixed) */
body.frieren-theme > header,
body.frieren-theme > .container,
body.frieren-theme > div:not(.frieren-video-bg):not(.modal-api-overlay):not([id^="modal"]) {
    position: relative;
    z-index: 1;
}

body.frieren-theme > .modal-api-overlay,
body.frieren-theme > #modal-api,
body.frieren-theme > #modalLuhnInvalidos {
    position: fixed !important;
    z-index: 200030 !important;
}

/* ── Header ── */
body.frieren-theme header {
    background: rgba(10, 22, 34, 0.75);
    backdrop-filter: blur(28px) saturate(1.3);
    border: 1px solid rgba(168, 224, 224, 0.12);
    border-top: 1px solid rgba(220, 232, 240, 0.08);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(220, 232, 240, 0.06);
}

body.frieren-theme .logo span,
body.frieren-theme nav a.logo {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    letter-spacing: 0.04em;
}

body.frieren-theme .logo-icon {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light)) !important;
    box-shadow: 0 0 20px rgba(114, 192, 192, 0.4);
}

/* ── Nav visitante (home, login, calcular, sobre) ── */
body.frieren-theme nav a:not(.logo):not(.btn-entrar) {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

body.frieren-theme nav a:not(.logo):not(.btn-entrar):hover {
    color: var(--primary-light);
}

body.frieren-theme .btn-entrar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
    color: #fff !important;
    border: 1px solid rgba(168, 224, 224, 0.35) !important;
    box-shadow: 0 4px 16px rgba(114, 192, 192, 0.3) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
}

body.frieren-theme .btn-entrar:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    box-shadow: 0 6px 24px rgba(114, 192, 192, 0.45) !important;
    transform: translateY(-1px);
}

/* ── Hero / páginas públicas ── */
body.frieren-theme .hero h1 span {
    color: var(--primary-light);
}

body.frieren-theme .hero {
    background: transparent;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Cards ── */
body.frieren-theme .container {
    position: relative;
    z-index: 1;
}

body.frieren-theme .card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(24px) saturate(1.2) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow:
        var(--shadow),
        inset 0 1px 0 rgba(220, 232, 240, 0.07) !important;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease !important;
}

body.frieren-theme .card:hover {
    border-color: rgba(168, 224, 224, 0.28) !important;
    box-shadow:
        var(--shadow-hover),
        inset 0 1px 0 rgba(220, 232, 240, 0.1),
        0 0 40px rgba(114, 192, 192, 0.08) !important;
}

body.frieren-theme h2,
body.frieren-theme h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

body.frieren-theme .frieren-welcome {
    margin-bottom: 1.75rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(168, 224, 224, 0.1);
    position: relative;
}

body.frieren-theme .frieren-welcome::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-light), transparent);
}

body.frieren-theme .frieren-welcome h2 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    background: linear-gradient(120deg, var(--accent-moon) 0%, var(--primary-light) 45%, var(--accent-gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.frieren-theme .frieren-welcome p {
    color: var(--text-secondary);
    font-weight: 300;
    font-style: italic;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

/* ── Tabs dashboard ── */
body.frieren-theme .tab-btn {
    background: rgba(10, 24, 38, 0.6) !important;
    border: 1px solid rgba(168, 224, 224, 0.1) !important;
    color: var(--text-secondary) !important;
    transition: all 0.3s ease !important;
}

body.frieren-theme .tab-btn:hover {
    border-color: rgba(168, 224, 224, 0.25) !important;
    color: var(--primary-light) !important;
}

body.frieren-theme .tab-btn.active {
    background: rgba(114, 192, 192, 0.15) !important;
    border-color: var(--primary) !important;
    color: var(--primary-light) !important;
    box-shadow: 0 0 20px rgba(114, 192, 192, 0.15) !important;
}

/* ── Botões ── */
body.frieren-theme .btn-primary,
body.frieren-theme .btn.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
    border-color: rgba(168, 224, 224, 0.35) !important;
    box-shadow: 0 4px 20px rgba(114, 192, 192, 0.3) !important;
}

body.frieren-theme .btn-primary:hover {
    box-shadow: 0 8px 32px rgba(114, 192, 192, 0.45) !important;
    transform: translateY(-2px);
}

/* Checker — Iniciar Check (teal + dourado, sem vermelho) */
body.frieren-theme .btn-checker-start {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
    border: 1px solid rgba(168, 224, 224, 0.4) !important;
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(114, 192, 192, 0.35) !important;
}

body.frieren-theme .btn-checker-start i {
    color: var(--accent-gold) !important;
}

body.frieren-theme .btn-checker-start:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    box-shadow: 0 8px 28px rgba(114, 192, 192, 0.5) !important;
}

body.frieren-theme .btn-checker-start:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

body.frieren-theme .btn-checker-stop {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
    color: #fca5a5 !important;
}

body.frieren-theme .btn-checker-stop:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #fff !important;
}

/* ── Inputs ── */
body.frieren-theme input,
body.frieren-theme select,
body.frieren-theme textarea {
    background: rgba(8, 20, 32, 0.85) !important;
    border-color: rgba(168, 224, 224, 0.12) !important;
}

body.frieren-theme input:focus,
body.frieren-theme select:focus,
body.frieren-theme textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(114, 192, 192, 0.12) !important;
}

/* ── Scrollbar ── */
body.frieren-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-dark), var(--primary));
}

/* ── Créditos header ── */
body.frieren-theme [style*="rgba(139, 92, 246"] {
    background: rgba(114, 192, 192, 0.12) !important;
    border-color: rgba(114, 192, 192, 0.28) !important;
}

body.frieren-theme [style*="stroke=\"#8b5cf6\""] {
    stroke: var(--primary) !important;
}

body.frieren-theme #taxaAprovacaoBar {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-light), var(--accent-gold)) !important;
}

/* ── Checker icons teal ── */
body.frieren-theme .fa-credit-card[style*="#ef4444"] {
    color: var(--primary-light) !important;
}

@media (max-width: 768px) {
    .frieren-video-bg__moon {
        width: 60px;
        height: 60px;
        top: 5%;
        right: 8%;
    }

    body.frieren-theme header {
        width: calc(100% - 1.5rem);
    }

    body.frieren-theme .frieren-welcome h2 {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .frieren-video-bg__media,
    .frieren-video-bg__aurora,
    .frieren-video-bg__moon,
    .frieren-video-bg__stars {
        animation: none !important;
    }

    .frieren-video-bg__canvas {
        display: none;
    }
}
