/* Oráculo Robótico Styles */

:root {
    --oracle-bg-color: #f0f4f8; /* Use transparent if you want it to blend */
    --robot-main: #a2d2ff;
    --robot-dark: #7fb3d5;
    --robot-accent: #ffafcc;
    --eye-color: #2d3436;
    --bubble-bg: #ffffff;
    --text-color: #2d3436;
}

.oracle-section {
    font-family: 'VT323', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    width: 100%;
}

.oracle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 600px;
}

/* Balão de Fala */
.oracle-speech-bubble {
    position: relative;
    background: var(--bubble-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    width: 85%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.6rem;
    color: var(--text-color);
    border: 3px solid var(--robot-main);
    box-sizing: border-box;
    line-height: 1.4;
}

#oracle-typewriter-text {
    display: inline-block;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    word-spacing: 0.1em;
}

.oracle-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 20px 20px 0;
    border-style: solid;
    border-color: var(--robot-main) transparent transparent;
}

.oracle-speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 18px 18px 0;
    border-style: solid;
    border-color: var(--bubble-bg) transparent transparent;
    z-index: 1;
}

/* Robô */
.oracle-robot-wrapper {
    cursor: pointer;
    transition: transform 0.3s ease;
    animation: oracle-float 4s ease-in-out infinite;
}

.oracle-robot-wrapper:hover {
    transform: scale(1.05);
}

#oracle-robot-svg {
    width: 200px;
    height: auto;
}

/* Animações SVG */
@keyframes oracle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.oracle-eye {
    transform-origin: center;
    animation: oracle-blink 4s infinite;
}

@keyframes oracle-blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

.oracle-antenna-light {
    animation: oracle-pulse 2s infinite;
}

@keyframes oracle-pulse {
    0%, 100% { fill: var(--robot-accent); filter: brightness(1); }
    50% { fill: #fff; filter: brightness(1.5); }
}

.oracle-antenna {
    transform-origin: bottom center;
    animation: oracle-wobble 3s ease-in-out infinite;
}

@keyframes oracle-wobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Reação ao Hover via CSS em sub-elementos */
.oracle-robot-wrapper:hover .oracle-eye {
    fill: var(--robot-accent);
}

.oracle-robot-wrapper:hover .oracle-cheek {
    opacity: 1;
}

.oracle-cheek {
    fill: var(--robot-accent);
    opacity: 0.6;
    transition: opacity 0.3s;
}

/* Botões de Controle */
.oracle-controls {
    margin-top: 40px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.oracle-controls button {
    background: var(--robot-main);
    border: none;
    padding: 10px 20px;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    color: black;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 var(--robot-dark);
}

.oracle-controls button:hover {
    background: var(--robot-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--robot-dark);
}

.oracle-controls button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--robot-dark);
}

.oracle-controls button.active {
    background: var(--robot-accent);
    box-shadow: 0 4px 0 #e089a5;
}

/* Responsividade */
@media (max-width: 480px) {
    .oracle-speech-bubble {
        font-size: 1.2rem;
        width: 90%;
    }
    #oracle-robot-svg {
        width: 150px;
    }
}
