:root {
    --bg-dark: #0f1117;
    --bg-card: #181b24;
    --bg-card-hover: #212532;
    --accent-gold: #f59e0b;
    --accent-gold-glow: rgba(245, 158, 11, 0.4);
    --accent-orange: #ef4444;
    --accent-green: #10b981;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #2e3547;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    font-size: 2.2rem;
    background: #2a2015;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--accent-gold);
}

.brand-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--accent-gold);
    font-weight: 400;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
}

/* Main Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    flex: 1;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Voice Hub Section */
.voice-section {
    background-color: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Glowing Orb & Mic */
.orb-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.orb {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    opacity: 0.3;
    pointer-events: none;
    transition: all 0.3s ease;
}

.ring-1 { width: 140px; height: 140px; }
.ring-2 { width: 165px; height: 165px; border-color: #f97316; opacity: 0.15; }
.ring-3 { width: 190px; height: 190px; border-color: #ef4444; opacity: 0.08; }

.orb.listening .orb-ring {
    border-color: #10b981 !important;
    opacity: 0.55 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.mic-button {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 25px var(--accent-gold-glow);
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    z-index: 10;
}

.mic-button:hover {
    transform: scale(1.06);
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.6);
}

.mic-button.listening {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 45px rgba(16, 185, 129, 0.85);
    animation: pulseGreenMic 1.3s infinite;
}

.mic-button.speaking {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.75);
}

@keyframes pulseGreenMic {
    0% { transform: scale(1); box-shadow: 0 0 25px rgba(16, 185, 129, 0.6); }
    50% { transform: scale(1.1); box-shadow: 0 0 50px rgba(16, 185, 129, 0.95); }
    100% { transform: scale(1); box-shadow: 0 0 25px rgba(16, 185, 129, 0.6); }
}

@keyframes pulseMic {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.mic-icon {
    width: 42px;
    height: 42px;
}

.voice-state-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Audio Wave Visualizer */
.audio-wave {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 24px;
}

.audio-wave.hidden {
    display: none;
}

.audio-wave .bar {
    width: 4px;
    height: 100%;
    background: #10b981;
    border-radius: 2px;
    animation: waveBar 1s infinite ease-in-out;
}

.audio-wave .bar:nth-child(2) { animation-delay: 0.15s; }
.audio-wave .bar:nth-child(3) { animation-delay: 0.3s; }
.audio-wave .bar:nth-child(4) { animation-delay: 0.45s; }
.audio-wave .bar:nth-child(5) { animation-delay: 0.6s; }
.audio-wave .bar:nth-child(6) { animation-delay: 0.75s; }

@keyframes waveBar {
    0%, 100% { height: 6px; }
    50% { height: 22px; }
}

/* Chips */
.quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.chip {
    background: #232734;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    background: #2e3547;
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Transcript Box */
.transcript-box {
    width: 100%;
    flex: 1;
    min-height: 220px;
    max-height: 320px;
    overflow-y: auto;
    background: #12141c;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message.user-msg {
    background: #1e2433;
    align-self: flex-end;
    border-left: 3px solid #3b82f6;
    max-width: 85%;
}

.message.ai-msg {
    background: #252018;
    align-self: flex-start;
    border-left: 3px solid var(--accent-gold);
    max-width: 85%;
}

.message.system-msg {
    background: #181d26;
    border-left: 3px solid #64748b;
}

/* Text Input Bar */
.text-input-bar {
    width: 100%;
    display: flex;
    gap: 0.5rem;
}

.text-input-bar input {
    flex: 1;
    background: #12141c;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}

.text-input-bar input:focus {
    border-color: var(--accent-gold);
}

.send-btn {
    background: var(--accent-gold);
    border: none;
    border-radius: 12px;
    width: 48px;
    color: black;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Side Panels (Cart & Menu) */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 1.25rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.clear-btn {
    background: none;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
}

.cart-items {
    min-height: 90px;
    max-height: 160px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.empty-cart-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1.5rem;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    background: #131620;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item-notes {
    color: #10b981;
    font-size: 0.75rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-remove-item {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-item:hover {
    background: #ef4444;
    color: white;
}

.cart-summary {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.total-row {
    font-size: 1.1rem;
    color: var(--accent-gold);
    margin-top: 0.2rem;
}

.checkout-btn {
    margin-top: 0.8rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    padding: 0.75rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.checkout-btn:hover {
    opacity: 0.9;
}

/* Menu Preview List */
.menu-list {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.menu-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #12141c;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    border-left: 2px solid var(--accent-gold);
}

.item-name {
    font-weight: 600;
}

.item-price {
    color: var(--accent-gold);
    font-weight: 700;
}
