
:root {
    --bg: #080b14;
    --panel: #111625;
    --panel-light: #171e30;
    --text: #f3f5ff;
    --muted: #9ba6bd;
    --accent: #8b7cff;
    --cyan: #5de4ff;
    --border: rgba(255, 255, 255, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 36px 18px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(ellipse at 50% 0%, #20204a 0%, transparent 48%),
        var(--bg);
}

.container {
    max-width: 850px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.eyebrow {
    color: var(--cyan);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
}

h1 {
    margin: 16px 0 10px;
    font-size: clamp(28px, 5vw, 43px);
    letter-spacing: -1.5px;
}

.subtitle {
    max-width: 550px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.7;
}

.assistant-panel,
.conversation-section {
    background: rgba(17, 22, 37, 0.92);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
}

.assistant-panel {
    text-align: center;
}

.assistant-visual {
    display: flex;
    justify-content: center;
    padding: 14px 0 8px;
}

.voice-orb {
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, #28245b 0%, #13172e 62%, #0b1020 100%);
    border: 1px solid rgba(139, 124, 255, 0.5);
    box-shadow:
        0 0 35px rgba(139, 124, 255, 0.2),
        inset 0 0 30px rgba(93, 228, 255, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.orb-inner {
    width: 85px;
    height: 85px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #a79bff, #6153d9 60%, #31cce9);
    box-shadow: 0 0 30px rgba(139, 124, 255, 0.45);
}

.orb-icon {
    color: white;
    font-size: 36px;
}

.voice-orb.listening {
    animation: orb-pulse 2.4s ease-in-out infinite;
    box-shadow: 0 0 45px rgba(93, 228, 255, 0.35);
}

.voice-orb.recording {
    animation: orb-pulse 0.9s ease-in-out infinite;
    box-shadow: 0 0 55px rgba(93, 228, 255, 0.55);
}

.voice-orb.processing {
    animation: orb-think 1.3s ease-in-out infinite alternate;
}

.voice-orb.speaking {
    animation: orb-speak 0.75s ease-in-out infinite alternate;
    box-shadow: 0 0 55px rgba(139, 124, 255, 0.55);
}

.voice-orb.muted {
    opacity: 0.55;
    animation: none;
    box-shadow: none;
}

@keyframes orb-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.045);
    }
}

@keyframes orb-think {
    from {
        transform: rotate(-5deg) scale(0.98);
    }
    to {
        transform: rotate(5deg) scale(1.04);
    }
}

@keyframes orb-speak {
    from {
        transform: scale(0.97);
    }
    to {
        transform: scale(1.07);
    }
}

.assistant-name {
    margin: 18px 0 6px;
    font-size: 20px;
    font-weight: 700;
}

.status {
    min-height: 24px;
    margin: 10px 0 22px;
    color: var(--cyan);
    font-size: 14px;
}

.controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

button {
    padding: 12px 19px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: var(--panel-light);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #252d45;
}

#startButton {
    background: linear-gradient(110deg, #7869ed, #5144c8);
    border-color: transparent;
}

#startButton:hover:not(:disabled) {
    background: linear-gradient(110deg, #8c7eff, #6456df);
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.privacy-note {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.conversation-section {
    margin-top: 22px;
}

.conversation-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

h2 {
    margin: 0;
    font-size: 18px;
}

.live-indicator {
    padding: 6px 10px;
    border-radius: 30px;
    background: #242b3c;
    color: var(--muted);
    font-size: 11px;
}

.live-indicator.is-live {
    color: var(--cyan);
    background: rgba(93, 228, 255, 0.1);
}

.conversation {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px 2px 14px;
}

.welcome-message {
    padding: 20px;
    border: 1px dashed var(--border);
    border-radius: 16px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.welcome-title {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.message {
    max-width: 88%;
    padding: 14px 16px;
    border-radius: 16px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.user-message {
    align-self: flex-end;
    background: #302a60;
    border: 1px solid rgba(139, 124, 255, 0.2);
}

.assistant-message {
    align-self: flex-start;
    background: var(--panel-light);
    border: 1px solid var(--border);
}

.message-speaker {
    margin: 0 0 6px;
    color: var(--cyan);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.message-content {
    margin: 0;
    white-space: pre-wrap;
    font-size: 14px;
}

.current-turn {
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(5, 8, 17, 0.5);
    border: 1px solid var(--border);
}

.turn-label {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

#question,
#answer {
    margin: 0 0 18px;
    color: var(--text);
    line-height: 1.7;
    font-size: 14px;
    overflow-wrap: anywhere;
}

#answer {
    margin-bottom: 0;
}

.footer {
    padding: 24px 12px 8px;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 600px) {
    body {
        padding: 22px 12px;
    }

    .assistant-panel,
    .conversation-section {
        padding: 20px 16px;
        border-radius: 19px;
    }

    .voice-orb {
        width: 125px;
        height: 125px;
    }

    .orb-inner {
        width: 72px;
        height: 72px;
    }

    .controls {
        flex-direction: column;
    }

    .controls button {
        width: 100%;
    }

    .message {
        max-width: 96%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
