/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

h1 {
    color: #222;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
    font-weight: 300;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.status {
    text-align: center;
    margin: 20px 0;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 15px;
    border-radius: 10px;
    background: #f1f1f1;
    border: 2px solid #e0e0e0;
    color: #222;
    transition: all 0.3s ease;
}

.conversation {
    margin: 30px 0;
    padding: 20px;
    height: 400px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    overflow-y: auto;
    background: #fafafa;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.03);
    scrollbar-width: thin;
    scrollbar-color: #bdbdbd transparent;
}

.conversation::-webkit-scrollbar {
    width: 6px;
}

.conversation::-webkit-scrollbar-track {
    background: transparent;
}

.conversation::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 3px;
}

.message {
    margin: 15px 0;
    padding: 15px 20px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    animation: slideIn 0.3s ease-out;
}

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

.message.user {
    background: #222;
    color: #fff;
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 5px;
}

.message.assistant {
    background: #e0e0e0;
    color: #222;
    margin-right: auto;
    text-align: left;
    border-bottom-left-radius: 5px;
}

.message.system {
    background: #bdbdbd;
    color: #fff;
    text-align: center;
    font-style: italic;
    margin: 10px auto;
    max-width: 60%;
    font-size: 0.9rem;
    border-radius: 25px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.07), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: #222;
    color: #fff;
    min-width: 160px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.13);
}

.btn-secondary {
    background: #bdbdbd;
    color: #222;
    min-width: 160px;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.btn-modify {
    background: #FF9800;
    color: white;
    margin-top: 15px;
    width: 100%;
    font-size: 0.9rem;
    padding: 12px 20px;
}

.btn-modify:hover:not(:disabled) {
    background: #F57C00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:active {
    transform: scale(0.95);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 20px;
        border-radius: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .conversation {
        height: 300px;
        margin: 20px 0;
    }

    .message {
        max-width: 90%;
        padding: 12px 16px;
    }

    .controls {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-radius: 50%;
    border-top-color: #222;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Status variations */
.status.connected {
    background: #e0f7e9;
    border-color: #b7e4c7;
    color: #222;
}

.status.listening {
    background: #fff3f3;
    border-color: #ffe1e1;
    color: #222;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.status.error {
    background: #fceaea;
    border-color: #f5bebe;
    color: #b71c1c;
}

/* Reservation confirmation styles */
.reservation-confirmation {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    border: none;
}

.reservation-confirmation h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    color: white;
}

.reservation-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
}

.detail-row .value {
    font-weight: 500;
    color: white;
    flex: 1;
    text-align: right;
    word-break: break-word;
}

.status-reserved {
    background: #2E7D32;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-pending {
    background: #F57C00;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-cancelled {
    background: #D32F2F;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

/* Reservation update styles */
.reservation-update {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    border: none;
    animation: slideInUp 0.5s ease-out;
}

.reservation-update h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    color: white;
}

/* Animation for reservation confirmation and update */
.reservation-confirmation,
.reservation-update {
    animation: slideInUp 0.5s ease-out;
}

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

/* Responsive design for reservation details */
@media (max-width: 480px) {
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .detail-row .value {
        text-align: left;
    }
    
    .reservation-confirmation {
        padding: 15px;
        margin: 10px 0;
    }
}