:root {
    --bg-dark: #0a1628;
    --bg-gradient-1: rgba(6, 182, 212, 0.05);
    --bg-gradient-2: rgba(16, 185, 129, 0.05);
    --cyan-neon: #06b6d4;
    --green-neon: #10b981;
    --text-light: #f0f9ff;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    background-image:
        radial-gradient(at 20% 30%, var(--bg-gradient-1) 0px, transparent 50%),
        radial-gradient(at 80% 70%, var(--bg-gradient-2) 0px, transparent 50%);
    color: var(--text-light);
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Logo - Esquina Superior Izquierda */
.logo-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    animation: fadeInLogo 0.8s ease-out;
}

.logo {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
}

@keyframes fadeInLogo {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Indicador de Estado - Esquina Superior Derecha */
.system-status {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 1000;
    animation: fadeInStatus 0.8s ease-out;
}

.status-led {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow:
        0 0 10px #ef4444,
        0 0 20px #ef4444,
        0 0 30px #ef4444;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Animaciones de pulso con diferentes velocidades */
.status-led.pulse-slow {
    animation: pulse-led 3s ease-in-out infinite;
}

.status-led.pulse-normal {
    animation: pulse-led 2s ease-in-out infinite;
}

.status-led.pulse-fast {
    animation: pulse-led 1s ease-in-out infinite;
}

@keyframes pulse-led {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

/* Transición suave del texto del estado */
#status-label {
    transition: color 0.3s ease;
}

@keyframes fadeInStatus {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Contenedor Principal */
.container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Ocultar elementos antiguos */
.title,
.status-indicator {
    display: none;
}

/* Contenedor del Núcleo de IA con Three.js */
.pybot-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeIn 0.8s ease-out;
}

.pybot-container:hover {
    transform: scale(1.02);
}

/* Canvas de Three.js */
.pybot-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 10;
}

/* Ocultar elementos CSS antiguos (reemplazados por Three.js) */
.pybot-avatar,
.ai-core,
.sound-waves {
    display: none !important;
}

/* Texto de Estado */
.subtitle {
    margin-top: 60px;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    transition: color 0.6s ease;
    z-index: 20;
}

.pybot-container.speaking~.subtitle {
    color: var(--cyan-neon);
}

.pybot-container.listening~.subtitle {
    color: var(--green-neon);
}

.status-text {
    margin-top: 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 300;
    z-index: 20;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 0.5px;
    z-index: 1000;
    animation: fadeInFooter 1s ease-out 0.5s both;
}

@keyframes fadeInFooter {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Animación de entrada inicial */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}