:root {
    --bg-dark: #0f111a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #8a2be2;
    --primary-glow: rgba(138, 43, 226, 0.5);
    --secondary: #4169e1;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image: radial-gradient(circle at top right, rgba(65, 105, 225, 0.15), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(138, 43, 226, 0.15), transparent 40%);
}

.container {
    width: 100%;
    max-width: 600px;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.screen {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    padding: 20px;
}
.screen.view-active { display: flex; }

/* typography */
.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.text-center { text-align: center; }
.subtitle { color: var(--text-secondary); margin-bottom: 2rem; }

/* Glass panels */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 20px;
    backdrop-filter: blur(10px);
    margin: auto;
    width: 100%;
}

.glass-header, .glass-footer {
    background: rgba(15, 17, 26, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 15px 20px;
    z-index: 10;
}
.glass-header { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center;}
.glass-footer { margin-top: 15px; }

/* Chat */
.chat-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 5px;
    scroll-behavior: smooth;
}
.chat-container::-webkit-scrollbar { display: none; }

.bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
    word-wrap: break-word;
}
.bubble.host {
    align-self: flex-start;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 4px;
}
.bubble.guest {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-bottom-right-radius: 4px;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Controls */
.control-group { margin-bottom: 2rem; text-align: left; }
.control-group label { display: block; margin-bottom: 10px; color: var(--text-secondary); font-size: 0.9rem; }
.glass-input {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 12px;
    outline: none;
    font-size: 1rem;
}
.glass-input option { background: var(--bg-dark); }

.primary-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}
.primary-btn:active { transform: scale(0.98); }
.primary-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.glow-effect:hover { box-shadow: 0 0 20px var(--primary-glow); }

.icon-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center;}
.icon-btn:hover { color: white; }

.phase-badge { font-size: 0.8rem; color: var(--primary); text-transform: uppercase; font-weight: 600; margin-bottom: 4px; }
.phase-title { font-size: 1.1rem; font-weight: 500; }

.mic-controls { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mic-btn { width: 70px; height: 70px; border-radius: 35px; display: flex; align-items: center; justify-content: center; padding: 0; transition: all 0.3s ease;}
.mic-icon { width: 28px; height: 28px; }

.status-text { font-size: 0.9rem; color: var(--text-secondary); }

/* Recording Animation */
.is-recording {
    background: #e63946;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(230, 57, 70, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

.is-processing {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    animation: spin 2s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
