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

html, body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #0a0a23;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

#avatar-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0a23;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}

#loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

#loader-logo {
    width: 180px;
    height: auto;
    filter: grayscale(100%) brightness(0.5);
    opacity: 0.4;
    transition: filter 0.8s ease, opacity 0.8s ease;
}

#loader .loader-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    margin-top: 28px;
    letter-spacing: 0.5px;
    transition: opacity 0.5s ease;
}

.avatar-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    visibility: hidden;
    z-index: 0;
}

.avatar-video.active {
    visibility: visible;
    z-index: 1;
}

#ptt-button {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    background: rgba(220, 50, 50, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: background 0.2s, transform 0.1s;
}

#ptt-button:active {
    background: rgba(220, 50, 50, 1);
    transform: translateX(-50%) scale(0.95);
}

#ptt-button.recording {
    background: rgba(255, 0, 0, 1);
    animation: pulse 1s infinite;
}

#ptt-button.processing {
    background: rgba(100, 100, 255, 0.8);
    animation: thinking 1.5s ease-in-out infinite;
    pointer-events: none;
}

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

@keyframes thinking {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(0.95); }
    50% { opacity: 1; transform: translateX(-50%) scale(1); }
}

#status-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2ecc71;
    z-index: 100;
}

#status-indicator.disconnected {
    background: #e74c3c;
}

.hidden {
    display: none !important;
}
