:root {
    --primary: #2483c5;
    --primary-glow: rgba(36, 131, 197, 0.3);
    --dark-bg: #0b0f14;
    --card-bg: rgba(15, 22, 30, 0.7);
    --text-main: #ffffff;
    --text-muted: #90a2b3;
    --accent: #92d1fd;
    --bot-bubble: rgba(28, 39, 51, 0.8);
    --user-bubble: linear-gradient(135deg, #2483c5, #125f94);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Ambient Dynamic Background */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(36, 131, 197, 0.15), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(146, 209, 253, 0.08), transparent 40%);
    z-index: -1;
    animation: drift 20s infinite alternate;
}

@keyframes drift {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: var(--primary);
}

.logo .accent {
    color: var(--primary);
}

.btn-admin {
    text-decoration: none;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-admin:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Main Chat Layout */
.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    height: calc(100vh - 80px);
}

.chat-wrapper {
    width: 100%;
    max-width: 500px;
    height: 100%;
    max-height: 800px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.chat-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

.chat-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.chat-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Messages Area */
.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.message {
    max-width: 85%;
    display: flex;
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
}

.msg-bubble {
    padding: 0.8rem 1.2rem;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.bot .msg-bubble {
    background: var(--bot-bubble);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user .msg-bubble {
    background: var(--user-bubble);
    border-bottom-right-radius: 4px;
    color: white;
}

/* Controls Section */
.chat-controls {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.voice-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.mic-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary-glow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.mic-btn:hover {
    transform: scale(1.05);
}

.mic-btn.recording {
    background: #ef4444;
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.2);
    animation: recordingPulse 1.5s infinite;
}

@keyframes recordingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.status-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-height: 1.2em;
}

/* Waveform visualization animation */
.waveform {
    display: flex;
    gap: 4px;
    height: 20px;
    align-items: center;
    margin-bottom: 8px;
    opacity: 0;
    transition: 0.3s;
}

.waveform.active {
    opacity: 1;
}

.waveform span {
    width: 3px;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.05s ease;
    transform-origin: bottom;
    transform: scaleY(0.2);
}

.waveform span:nth-child(1) {
    height: 40%;
}

.waveform span:nth-child(2) {
    height: 80%;
}

.waveform span:nth-child(3) {
    height: 100%;
}

.waveform span:nth-child(4) {
    height: 60%;
}

.waveform span:nth-child(5) {
    height: 30%;
}

.input-group {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.3s;
}

.input-group:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.95rem;
}

.input-group input:focus {
    outline: none;
}

.send-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1.1rem;
    cursor: pointer;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.send-btn:hover {
    color: var(--accent);
    transform: translateX(2px);
}

/* Admin Panel Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    overflow-y: auto;
    height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.order-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.order-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.order-card.Status-Preparing::before {
    background: #3b82f6;
}

.order-card.Status-Delivered::before {
    background: #10b981;
}

.order-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.order-id {
    font-weight: bold;
    color: var(--accent);
}

.order-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.order-items {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

.order-info {
    font-size: 0.85rem;
    margin-top: 10px;
    color: #d1d1d6;
}

.order-info i {
    width: 20px;
    color: var(--primary);
}

.order-footer {
    margin-top: 1.5rem;
    display: flex;
    gap: 10px;
}

.status-btn {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
}

.status-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.status-btn.active-preparing {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.status-btn.active-done {
    background: #065f46;
    border-color: #065f46;
}