/* Bella - AmoCraft AI - Main Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    background: #000;
    color: #fff;
}

/* --- Loading Screen --- */
#loading-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loading-screen img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 50%;
    animation: pulse-load 1.5s ease-in-out infinite;
}

@keyframes pulse-load {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

/* --- Video Background --- */
.video-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}

.bg-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.bg-video.active {
    opacity: 1;
}

/* --- Content Overlay --- */
.content-overlay {
    position: relative;
    z-index: 1;
    width: 100%; height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 40px;
}

/* --- Transcript (speech recognition) --- */
.transcript-container {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 24px 32px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.transcript-container.visible {
    opacity: 1;
    pointer-events: auto;
}

#transcript {
    font-size: 18px;
    line-height: 1.6;
    color: #fff;
}

/* --- Mic Button --- */
.bottom-bar {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.mic-button {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #FF6B9D, #C44569);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 107, 157, 0.6);
}

.mic-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.mic-button.is-listening {
    animation: pulse-mic 1.5s ease-in-out infinite;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
}

@keyframes pulse-mic {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.6); }
    50% { box-shadow: 0 0 0 20px rgba(255, 71, 87, 0); }
}

/* --- Chat Control Panel --- */
.chat-control-panel {
    position: fixed;
    top: 20px; left: 20px;
    display: flex;
    gap: 10px;
    z-index: 100;
    opacity: 0;
    animation: fadeIn 0.5s ease 2s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.control-btn.primary {
    background: linear-gradient(135deg, #FF6B9D, #C44569);
    box-shadow: 0 2px 12px rgba(255, 107, 157, 0.3);
}

.control-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.5);
}


/* --- Speaking indicator --- */
.speaking-indicator {
    position: fixed;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 107, 157, 0.8);
    backdrop-filter: blur(8px);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    animation: pulse-load 1.5s ease-in-out infinite;
}

/* --- Dance Overlay --- */
.dance-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.dance-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.dance-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .mic-button {
        width: 64px; height: 64px;
        font-size: 22px;
    }

    .transcript-container {
        max-width: 90%;
        padding: 16px 20px;
    }

    #transcript {
        font-size: 15px;
    }
}
