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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #a0a0c0;
    font-size: 1rem;
}

/* Status orb */
.status-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
}

.orb {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #444, #222);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.orb-inner {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #555, #333);
    transition: all 0.3s ease;
}

/* States */
.orb.listening {
    background: radial-gradient(circle at 30% 30%, #2196F3, #1565C0);
    box-shadow: 0 0 40px rgba(33, 150, 243, 0.5);
    animation: pulse 2s infinite;
}

.orb.listening .orb-inner {
    background: radial-gradient(circle at 30% 30%, #42A5F5, #1E88E5);
}

.orb.speaking {
    background: radial-gradient(circle at 30% 30%, #4CAF50, #2E7D32);
    box-shadow: 0 0 40px rgba(76, 175, 80, 0.5);
    animation: pulse-fast 0.5s infinite;
}

.orb.speaking .orb-inner {
    background: radial-gradient(circle at 30% 30%, #66BB6A, #43A047);
}

.orb.connecting {
    background: radial-gradient(circle at 30% 30%, #FF9800, #E65100);
    box-shadow: 0 0 40px rgba(255, 152, 0, 0.5);
    animation: spin 2s linear infinite;
}

.orb.connecting .orb-inner {
    background: radial-gradient(circle at 30% 30%, #FFA726, #FB8C00);
}

.orb.error {
    background: radial-gradient(circle at 30% 30%, #f44336, #c62828);
    box-shadow: 0 0 40px rgba(244, 67, 54, 0.5);
}

.orb.error .orb-inner {
    background: radial-gradient(circle at 30% 30%, #ef5350, #e53935);
}

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

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-text {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #b0b0d0;
    text-align: center;
}

/* Buttons */
.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #2196F3, #1565C0);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #42A5F5, #1E88E5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336, #c62828);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #ef5350, #e53935);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.btn-demo {
    background: linear-gradient(135deg, #7c4dff, #536dfe);
    color: white;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

.btn-demo:hover:not(:disabled) {
    background: linear-gradient(135deg, #9c7cff, #738ffe);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.4);
}

/* Transcript */
.transcript-area {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.transcript-area h3 {
    color: #b0b0d0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.transcript-messages {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.transcript-messages::-webkit-scrollbar {
    width: 6px;
}

.transcript-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.placeholder {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

.message {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    background: rgba(33, 150, 243, 0.15);
    border-left: 3px solid #2196F3;
    margin-left: 1rem;
}

.message.assistant {
    background: rgba(76, 175, 80, 0.15);
    border-left: 3px solid #4CAF50;
    margin-right: 1rem;
}

.message .role {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 0.3rem;
}

/* Save/Delete decision */
.save-decision {
    margin: 1.5rem 0;
    animation: fadeIn 0.5s ease;
}

.save-decision-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.save-decision-card h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.save-decision-card > p {
    color: #a0a0c0;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.save-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-save {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

.btn-save:hover:not(:disabled) {
    background: linear-gradient(135deg, #66BB6A, #43A047);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-delete {
    background: linear-gradient(135deg, #78909C, #546E7A);
    color: white;
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

.btn-delete:hover:not(:disabled) {
    background: linear-gradient(135deg, #90A4AE, #607D8B);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(120, 144, 156, 0.4);
}

.save-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #a0a0c0;
    min-height: 1.2rem;
}

.save-status.success {
    color: #66BB6A;
}

.save-status.deleted {
    color: #90A4AE;
}

.save-status.error {
    color: #ef5350;
}

/* Demo section */
.demo-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-section h3 {
    color: #b0b0d0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.demo-info {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.demo-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #555;
    font-size: 0.8rem;
}
