/* Variáveis e Reset */
:root {
    --bg-color: #050507;
    --bg-secondary: #0a0a0c;
    /* Nova Paleta: Ouro e Azul Real (Zeus/Olympus Theme) */
    --primary: #f59e0b; /* Amber/Gold */
    --primary-glow: rgba(245, 158, 11, 0.4);
    --secondary: #3b82f6; /* Royal Blue */
    
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(20, 20, 25, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Background Glow Effect */
.bg-glow {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.container {
    max-width: 1280px; /* Aumentado de 1200px para acomodar 4 cards melhor */
    margin: 0 auto;
    padding: 0 24px;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Estilizada */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo-icon-box {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #d97706);
    border-radius: 8px; /* Bordas arredondadas */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff; /* Ícone branco para contraste no dourado */
    box-shadow: 0 0 15px var(--primary-glow);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Esconder botão do menu mobile no desktop */
.mobile-nav-btn {
    display: none;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: #000; /* Texto preto fica melhor no fundo dourado/ambar */
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #fbbf24;
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.glow-effect {
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

.mobile-menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 5px;
}

/* Hero Section */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    background: rgba(59, 130, 246, 0.1); /* Azul sutil */
    color: var(--secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
    margin-bottom: 20px;
    display: inline-block;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(90deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
}

.stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.stat-item h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* =========================================
   Chat Interface Style (New Hero Visual)
   ========================================= */

.chat-interface {
    background: rgba(20, 20, 25, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    min-height: 450px;
    max-height: 450px;
}

.chat-interface:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.chat-header {
    background: rgba(45, 45, 53, 0.8);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.ai-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), #d97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
}

.ai-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.ai-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}

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

.dot-online {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 5px #10b981;
}

.window-controls {
    display: flex;
    gap: 6px;
}

.control {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.control.red { background: #ef4444; }
.control.yellow { background: #f59e0b; }

/* Chat Body */
.chat-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(0,0,0,0.2);
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Scrollbar fina para o chat */
.chat-body::-webkit-scrollbar {
    width: 6px;
}
.chat-body::-webkit-scrollbar-track {
    background: transparent;
}
.chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.message {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    max-width: 90%;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.ai {
    align-self: flex-start;
}

.ai-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.user .bubble {
    background: var(--secondary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.ai .bubble {
    background: #1e1e24;
    border: 1px solid var(--border-color);
    color: #e5e7eb;
    border-bottom-left-radius: 4px;
}

.message strong {
    color: var(--primary);
}

/* Code Snippet in Chat */
.code-snippet-chat {
    margin-top: 10px;
    background: #0f0f12;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.snippet-header {
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.code-snippet-chat code {
    display: block;
    padding: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #a5f3fc;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: #1e1e24;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: fit-content;
    margin-left: 38px; /* Alinhar com o avatar */
    display: none; /* Oculto por padrão */
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Input Area */
.chat-input-area {
    padding: 15px 20px;
    background: rgba(30, 30, 36, 0.9);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.chat-input-field::placeholder {
    color: #6b7280;
}

.send-btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

.send-btn-icon:hover {
    background: #fbbf24;
    transform: scale(1.05);
}

.send-btn-icon:active {
    transform: scale(0.95);
}

/* Sections */
.section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
}

/* Grid Cards (UPDATED FOR 4 COLUMNS) */
.grid-cards {
    display: grid;
    /* Com minmax 250px, em telas grandes caberão 4 (1280px / 4 ~ 320px disponível) */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 24px; /* Gap um pouco menor para facilitar o encaixe */
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px 24px; /* Padding lateral reduzido para evitar espremer */
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: rgba(245, 158, 11, 0.05);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Cores específicas dos modelos */
.blue { background: rgba(59, 130, 246, 0.2); color: var(--secondary); }
.purple { background: rgba(245, 158, 11, 0.2); color: var(--primary); }
.gold { background: rgba(255, 255, 255, 0.1); color: #fff; }

.card h3 {
    margin-bottom: 5px;
    font-size: 1.4rem; /* Ligeiramente menor */
}

.model-tech {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 700;
}

.description {
    color: var(--text-muted);
    font-size: 0.9rem; /* Fonte levemente reduzida */
    margin-bottom: 25px;
    line-height: 1.5;
    flex-grow: 1; /* Garante altura uniforme */
}

.features-list {
    margin-bottom: 20px;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #d1d5db;
}

.features-list i {
    color: var(--primary);
    font-size: 0.8rem;
}

/* Pricing Info in Cards */
.pricing-container {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.price-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.p-value {
    color: var(--primary);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.price-extra {
    font-size: 0.8rem;
    color: #ef4444; /* Red for extra cost warning */
    margin-top: 6px;
    text-align: right;
    font-weight: 600;
}


/* Featured Card Style */
.card.featured {
    border: 1px solid var(--primary);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

/* Tech Section */
.bg-darker {
    background: var(--bg-secondary);
}

.feature-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.feature-text > p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 60px;
    max-width: 90%;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.tech-item {
    display: flex;
    gap: 25px;
    margin-bottom: 50px;
}

.tech-item:last-child {
    margin-bottom: 0;
}

.icon-box {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tech-item h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.tech-item p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* =========================================
   Architecture Diagram Advanced Styling
   ========================================= */

.architecture-diagram {
    position: relative;
    padding: 60px 40px;
    background: rgba(20, 20, 25, 0.4);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0,0,0,0.2);
}

.diagram-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    opacity: 0.5;
}

.architecture-diagram::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.flow-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Nodes Base Style */
.node {
    background: #1e1e24;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.node-icon {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-muted);
}

.node-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Client Node */
.node.client {
    width: 140px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981; /* Green */
    border-radius: 50%;
    position: absolute;
    top: 10px;
    right: 10px;
    box-shadow: 0 0 8px #10b981;
}

/* Core Node */
.node.core {
    width: 160px;
    height: 90px;
    border-color: var(--primary);
    background: rgba(245, 158, 11, 0.1);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
}

.node.core .node-icon.main {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 2px solid var(--primary);
    opacity: 0;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* Providers Row */
.providers-row {
    display: flex;
    gap: 20px;
    margin-top: 0;
}

.node.provider {
    width: 100px;
    padding: 15px 10px;
    background: rgba(255,255,255,0.02);
}

.node.provider .node-icon.small {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.provider-name {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.node.provider:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.hermes i { color: var(--secondary); }
.atenas i { color: var(--primary); }
.apollo i { color: #fff; }

/* Connection Lines */
.connection-line.vertical {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.1) 100%);
    position: relative;
    overflow: hidden;
}

.connection-split {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 60px;
    position: relative;
    width: 100%;
    margin-bottom: -5px;
}

.line-v {
    width: 2px;
    height: 30px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.line-h {
    width: 240px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    position: relative;
}

.line-h-connectors {
    width: 240px;
    height: 30px;
    display: flex;
    justify-content: space-between;
}

.connector {
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,0.1);
}

/* Data Packet Animation */
.data-packet {
    position: absolute;
    width: 6px;
    height: 15px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--primary);
    left: -2px;
    top: -20px;
    animation: flow-down 2s infinite ease-in-out;
}

.delay-1 {
    animation-delay: 1s;
}

@keyframes flow-down {
    0% { top: -20px; opacity: 0; }
    20% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Footer */
footer {
    padding: 80px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* Removido uma coluna */
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 { margin-bottom: 20px; color: var(--text-main); }
.footer-col h4 { margin-bottom: 20px; color: var(--text-main); }
.footer-col a { display: block; margin-bottom: 10px; color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary); }
.footer-col p { color: var(--text-muted); font-size: 0.9rem; }

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-msg {
    opacity: 0;
    transform: translateY(10px);
    animation: fade-in-up 0.5s ease-out forwards;
}

.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1.5s; }

@keyframes fade-in-up {
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   Documentation Page Styles
   ========================================= */

.docs-layout {
    display: flex;
    padding-top: 100px; /* Navbar height */
    gap: 40px;
    min-height: 100vh;
}
.docs-sidebar {
    width: 250px;
    position: sticky;
    top: 100px;
    height: calc(100vh - 100px);
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    padding-right: 20px;
}
.docs-sidebar a {
    display: block;
    padding: 10px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-left: 2px solid transparent;
    padding-left: 10px;
}
.docs-sidebar a:hover, .docs-sidebar a.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: rgba(255,255,255,0.02);
}
.docs-sidebar h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 20px;
    margin-bottom: 10px;
    padding-left: 10px;
    opacity: 0.7;
}

.docs-content {
    flex: 1;
    padding-bottom: 80px;
    max-width: 800px;
}
.docs-section {
    margin-bottom: 60px;
    scroll-margin-top: 120px;
}
.docs-content h1 { font-size: 2.5rem; margin-bottom: 20px; color: var(--text-main); }
.docs-content h2 { font-size: 1.8rem; margin-bottom: 15px; color: var(--text-main); border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-top: 40px; }
.docs-content h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--primary); margin-top: 25px; }
.docs-content p { color: var(--text-muted); margin-bottom: 15px; }
.docs-content ul { list-style: disc; padding-left: 20px; margin-bottom: 20px; color: var(--text-muted); }
.docs-content li { margin-bottom: 5px; }

/* Code Blocks in Docs */
.code-block-wrapper {
    background: #1d1f21; /* Match Prism Tomorrow Theme */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
}
.code-header {
    background: rgba(255,255,255,0.05);
    padding: 8px 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}
.code-content {
    padding: 15px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #a5f3fc;
    line-height: 1.5;
    margin: 0;
}
/* Prism override */
code[class*="language-"], pre[class*="language-"] {
    text-shadow: none !important;
    background: transparent !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.9rem !important;
}

.method {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
    margin-right: 10px;
}
.method.post { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.method.get { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    color: var(--text-muted);
}
.param-table th, .param-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}
.param-table th {
    color: var(--primary);
    font-weight: 600;
}
.param-table code {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    color: #a5f3fc;
    font-size: 0.85rem;
}

/* =========================================
   Builder Section Styles (New)
   ========================================= */

.builder-interface {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    margin-top: 30px;
}

.builder-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.builder-select, .builder-input, .builder-textarea {
    width: 100%;
    background: #1e1e24;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    outline: none;
    transition: 0.3s;
}

.builder-select:focus, .builder-input:focus, .builder-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.builder-textarea {
    min-height: 100px;
    resize: vertical;
}

/* History List Styles */
.history-list {
    background: #15151a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.history-item {
    background: rgba(255,255,255,0.03);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 2px solid var(--border-color);
}

.history-item.user { border-left-color: var(--secondary); }
.history-item.model { border-left-color: var(--primary); }

.history-role {
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-right: 10px;
    min-width: 50px;
}
.history-item.user .history-role { color: var(--secondary); }
.history-item.model .history-role { color: var(--primary); }

.history-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
}

.btn-del-history {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.6;
}
.btn-del-history:hover { opacity: 1; }

.empty-state {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.8rem;
    text-align: center;
    padding: 10px;
}

.history-controls {
    display: flex;
    gap: 10px;
}

.btn-small {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-small:hover { border-color: var(--text-main); }
.btn-small.outline { background: transparent; }
.btn-small.text-only { border: none; background: transparent; color: #ef4444; margin-left: auto; }

/* Builder Output (Right Col) */
.builder-output {
    display: flex;
    flex-direction: column;
    min-width: 0; /* IMPEDE O GRID DE QUEBRAR */
}

.code-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { 
    color: var(--primary); 
    border-bottom-color: var(--primary); 
    font-weight: 600;
}

.code-window {
    background: #1d1f21; /* Match Prism theme */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0;
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.code-window .window-controls {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}

/* LIMITADOR DE ALTURA DO BUILDER */
.code-window pre {
    padding: 20px;
    overflow: auto;
    margin: 0;
    flex: 1;
    max-height: 500px; /* Limite de altura */
    overflow-y: auto;  /* Scroll vertical */
    
    /* CORREÇÃO DE QUEBRA DE LINHA */
    white-space: pre-wrap; 
    word-wrap: break-word;
}

/* Scrollbar para o bloco de código */
.code-window pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.code-window pre::-webkit-scrollbar-track {
    background: #1d1f21;
}
.code-window pre::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

.code-window code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #e5e7eb;
    line-height: 1.5;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}
.copy-btn:hover { background: rgba(255,255,255,0.2); }

.language-keyword { color: #f472b6; }
.language-string { color: #a5f3fc; }
.language-comment { color: #6b7280; font-style: italic; }

/* =========================================
   Admin Panel Styles (God Mode)
   ========================================= */

.admin-dashboard {
    padding-top: 120px;
    padding-bottom: 60px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.admin-stat-card h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.admin-stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.admin-table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.admin-table td {
    font-size: 0.9rem;
}

.admin-table tr:hover {
    background: rgba(255,255,255,0.02);
}

.token-cell {
    font-family: 'JetBrains Mono', monospace;
    color: #a5f3fc;
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Modal de Login */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.auth-box {
    background: #15151a;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

.auth-box h2 {
    margin-bottom: 20px;
    color: var(--text-main);
}

/* Responsive */
@media (max-width: 768px) {
    .btn-primary { display: none; }
    .mobile-menu-icon { display: block; }

    /* MENU MOBILE DROPDOWN */
    .nav-links {
        position: absolute;
        top: 76px; /* Altura aprox da navbar */
        left: 0;
        width: 100%;
        background: rgba(5, 5, 7, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        border-bottom: 1px solid var(--border-color);
        display: none; /* Hidden by default */
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out forwards;
    }

    /* Mostrar botão de API Key no Mobile (dentro do menu) */
    .mobile-nav-btn {
        display: block;
        width: 100%;
    }

    .mobile-nav-btn a {
        background: var(--primary);
        color: #000;
        padding: 12px;
        border-radius: 8px;
        font-weight: 700;
        text-align: center;
        width: 100%;
        display: block;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links a:not(.mobile-nav-btn a) {
        display: block;
        font-size: 1.2rem;
        padding: 10px;
    }
    
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-buttons { justify-content: center; width: 100%; }
    
    /* Configuração dos Botões Hero no Mobile */
    .hero-buttons .btn-secondary.desktop-only {
        display: none; /* Esconde "Ler Documentação" */
    }

    .hero-buttons .mobile-full-width {
        width: 100%; /* Botão do Zap ocupa largura total se desejar, ou mantenha normal */
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .stats { justify-content: center; }
    .hero-text p { margin: 0 auto 40px; }
    
    .features-grid { grid-template-columns: 1fr; gap: 40px; }
    .tech-item { margin-bottom: 30px; }
    
    h1 { font-size: 2.5rem; }
    
    .footer-content { grid-template-columns: 1fr; }
    
    .chat-interface { max-height: 400px; min-height: 300px; }

    /* Docs Responsive */
    .docs-layout { flex-direction: column; padding-top: 80px; }
    .docs-sidebar { 
        width: 100%; 
        position: relative; 
        height: auto; 
        border-right: none; 
        border-bottom: 1px solid var(--border-color); 
        margin-bottom: 40px; 
        top: 0;
        padding-bottom: 20px;
    }

    .builder-interface { grid-template-columns: 1fr; }

    /* Mobile Architecture Diagram Fix */
    .architecture-diagram {
        padding: 40px 10px; /* Reduz padding lateral */
        width: 100%;
        display: flex;
        justify-content: center;
        overflow: hidden; /* Corta o que sobrar */
    }
    
    .flow-container {
        transform: scale(0.65); /* Reduz escala para caber */
        transform-origin: top center;
        width: 100%;
        margin-bottom: -100px; /* Remove o espaço vazio extra criado pelo scale */
    }
}