/* Variáveis e Reset */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(20, 20, 25, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    --blur-strength: 20px;
    --border-radius: 24px;
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: #0f0f11;
    color: #ffffff;
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* Evita scroll na página principal */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* --- Fundo Animado (Ambient Light) --- */
.ambient-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #bbfe4f;
    top: -10%;
    left: -10%;
    animation-duration: 12s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #93fbd8;
    bottom: -10%;
    right: -10%;
    animation-duration: 15s;
    animation-delay: -2s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #43e97b;
    top: 40%;
    left: 40%;
    transform: translate(-50%, -50%);
    animation: float-center 20s infinite linear;
    opacity: 0.4;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 50px); }
}

@keyframes float-center {
    0% { transform: translate(-50%, -50%) rotate(0deg) translateX(50px) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateX(50px) rotate(-360deg); }
}

/* --- Container de Vidro (Glassmorphism) --- */
.glass-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.chat-wrapper {
    width: 100%;
    max-width: 900px; /* Largura máxima confortável */
    height: 90vh; /* Ocupa 90% da altura da tela */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.15); /* Highlight no topo */
    border-radius: var(--border-radius);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px var(--glass-highlight);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Header do Chat --- */
.chat-header {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
    animation: pulse 2s infinite;
}

.text {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
    70% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
    100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s;
}

.control:nth-child(1):hover { background-color: #ff5f56; }
.control:nth-child(2):hover { background-color: #ffbd2e; }
.control:nth-child(3):hover { background-color: #27c93f; }

/* --- Iframe Area --- */
.iframe-container {
    flex: 1;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.01); /* Leve contraste */
    position: relative;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* --- Responsividade --- */
@media (max-width: 768px) {
    .chat-wrapper {
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
        border: none;
    }
    
    .chat-header {
        height: 50px;
    }
    
    .orb-1 { width: 200px; height: 200px; }
    .orb-2 { width: 250px; height: 250px; }
}