
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #e6e6e6;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    color: rgb(51, 51, 51);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Estado inicial */
.container{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    transition: all .4s ease;
}

/* estado después de la primera pregunta */
.container.bottom{
    top:auto;
    bottom:40px;
    transform:translateX(-50%);
}

/* Marco fino tipo IA */
body.listening::before {
    content: "";
    position: fixed;
    inset: 0;
    border: 5px solid #2a6cff;
    border-radius: 25px;
    pointer-events: none;
    animation: pulseBorder 1.5s infinite ease-in-out;
}

@keyframes pulseBorder {
    0% { opacity: .3; }
    50% { opacity: 1; }
    100% { opacity: .3; }
}

/* Botón principal */

.voice-btn.small{
    width:90px;
    height:90px;
}

.voice-btn {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: radial-gradient(circle at 30% 30%, #ff4b4b, #a00000);
    box-shadow:
        0 0 40px rgba(255, 0, 0, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    animation: rotateIdle 8s linear infinite;
    position:relative;
    transition: all .3s ease;
}

.voice-btn::after{
    content:"";
    position:absolute;
    inset:-25px;
    border-radius:50%;
    border:4px solid rgba(0,0,0,.15);
    opacity:0;
}

.voice-btn.listening::after{
    animation:wave 1.4s infinite;
}

@keyframes wave{
    0%{
        transform:scale(.9);
        opacity:.8;
    }
    100%{
        transform:scale(1.4);
        opacity:0;
    }
}

/* Idle rotation */
@keyframes rotateIdle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Listening state */
.voice-btn.listening {
    background: radial-gradient(circle at 30% 30%, #4b7bff, #0026ff);
    box-shadow:
        0 0 60px rgba(0, 80, 255, 0.7),
        inset 0 0 40px rgba(255, 255, 255, 0.2);
    animation: pulse 1s infinite ease-in-out;
}

/* Listening pulse */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* Texto de respuesta */
.responsePanel{
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 140px;
    overflow-y: auto;
    pointer-events: none;
    padding: 40px;
}

.question{
    font-size:18px;
    opacity:.6;
    margin-bottom:20px;
}

.response{
    font-size:42px;
    line-height:1.5;
}


/* ========================================
   YOUTUBE RESULTS
======================================== */

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    width: 100%;
    margin-top: 20px;
}

.youtube-card {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
}

.youtube-card:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.15);
}

.youtube-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.youtube-info {
    background-color: #e6e6e6;
    padding: 12px;
}

.youtube-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.youtube-channel {
    font-size: 12px;
    opacity: .6;
}