* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #103146;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

/* ===== Welcome Modal Overlay ===== */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #103146;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.welcome-overlay.hidden {
    display: none;
}

.welcome-modal {
    background: #1a2a3a;
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.4s ease;
    overflow: hidden;
}

.welcome-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, #103146 0%, #1a3a50 100%);
}

.welcome-icon {
    font-size: 3.5em;
    margin-bottom: 15px;
    animation: bounce 1s ease infinite;
}

.welcome-title {
    font-size: 2em;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

.welcome-subtitle {
    font-size: 1.1em;
    color: #a0b0c0;
    margin: 0;
}

.welcome-content {
    padding: 40px 30px;
    text-align: center;
}

.welcome-instruction {
    font-size: 1em;
    color: #c0d0e0;
    margin-bottom: 25px;
}

.welcome-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1em;
    border: 2px solid #2a3a4a;
    border-radius: 8px;
    background: #0d1f2d;
    color: white;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.welcome-input:focus {
    outline: none;
    border-color: #e21d00;
    background: #152535;
}

.welcome-input::placeholder {
    color: #5a6a7a;
}

.welcome-button {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    background: #e21d00;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 1px;
}

.welcome-button:hover {
    background: #ff2200;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 29, 0, 0.4);
}

.welcome-button:active {
    transform: translateY(0);
}

.welcome-button:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.chat-container {
    width: 100%;
    max-width: 600px;
    height: 90vh;
    max-height: 800px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: #e21d00;
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.chat-header-icon {
    font-size: 1.2em;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: white;
    min-height: 0;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 0.95em;
    clear: both;
}

    .message.user {
        align-self: flex-end;
        background: #103146;
        color: white;
        margin-left: auto;
    }

.message.bot {
    align-self: flex-start;
    background: #f1f3f5;
    color: #333;
    margin-right: auto;
}

.message strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85em;
    opacity: 0.9;
}

.message a {
    color: #e21d00;
    text-decoration: none;
    word-break: break-all;
}

.message a:hover {
    text-decoration: underline;
    color: #c01800;
}

/* Payment Button */
.message a.payment-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #e21d00;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 25px;
    text-decoration: none;
    text-align: center;
    word-break: normal;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(226, 29, 0, 0.4);
}

.message a.payment-btn:hover {
    background: #c01800;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 29, 0, 0.5);
}

.message a.payment-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(226, 29, 0, 0.3);
}

.chat-input-container {
    padding: 16px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

#msg {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    color: #333;
}

#msg:focus {
    border-color: #e21d00;
}

#msg::placeholder {
    color: #adb5bd;
}

#msg:disabled {
    background: #e9ecef;
    color: #868e96;
    cursor: not-allowed;
}

button {
    padding: 12px 24px;
    background: #e21d00;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
}

button:hover {
    background: #c01800;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(226, 29, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading {
    align-self: flex-start;
    padding: 12px 16px;
    background: #f1f3f5;
    border-radius: 12px;
    color: #e21d00;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%, 100% {
        content: '...';
    }
}

/* ===== Suggested Action Buttons ===== */
.suggested-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    align-self: flex-start;
    max-width: 100%;
    margin-right: auto;
}

.suggested-action-btn {
    padding: 10px 16px;
    background: white;
    color: #e21d00;
    border: 2px solid #e21d00;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    white-space: nowrap;
}

.suggested-action-btn:hover {
    background: #e21d00;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(226, 29, 0, 0.4);
}

.suggested-action-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ===== Card-based Menu Grid ===== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 12px 0;
    align-self: flex-start;
    width: 100%;
}

.menu-card {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 140px;
}

.menu-card:hover {
    background: #333333;
    border-color: #e21d00;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(226, 29, 0, 0.4);
}

.menu-card-icon {
    font-size: 3em;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.menu-card-title {
    color: #ffffff;
    font-size: 0.95em;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.menu-intro {
    text-align: center;
    color: #999;
    font-size: 1em;
    margin: 8px 0 16px 0;
    line-height: 1.5;
}

/* Mobile responsiveness for cards */
@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .menu-card {
        padding: 20px;
        min-height: 120px;
    }

    .menu-card-icon {
        font-size: 2.5em;
    }

    .menu-card-title {
        font-size: 0.9em;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .chat-container {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        box-shadow: none;
    }

    .chat-header {
        font-size: 1.1em;
        padding: 14px 12px;
        gap: 8px;
    }

    .chat-header-icon {
        font-size: 1em;
    }

    .chat-messages {
        padding: 12px;
        gap: 10px;
    }

    .message {
        max-width: 90%;
        font-size: 0.9em;
        padding: 10px 14px;
    }

    .chat-input-container {
        padding: 10px 12px;
        gap: 8px;
    }

    #msg {
        padding: 10px 14px;
        font-size: 0.95em;
    }

    button {
        padding: 10px 18px;
        font-size: 0.95em;
    }

    .suggested-actions {
        gap: 6px;
    }

    .suggested-action-btn {
        font-size: 0.82em;
        padding: 8px 12px;
        white-space: normal;
        text-align: center;
    }

    .welcome-modal {
        width: 95%;
        max-width: 100%;
        border-radius: 12px;
    }

    .welcome-header {
        padding: 30px 20px 25px;
    }

    .welcome-icon {
        font-size: 2.8em;
    }

    .welcome-title {
        font-size: 1.5em;
    }

    .welcome-subtitle {
        font-size: 1em;
    }

    .welcome-content {
        padding: 25px 20px;
    }

    .welcome-input {
        padding: 12px 16px;
        font-size: 0.95em;
    }

    .welcome-button {
        padding: 13px;
        font-size: 1em;
    }
}

/* Small mobile devices */
@media (max-width: 380px) {
    .chat-header {
        font-size: 1em;
        padding: 12px 10px;
    }

    .chat-messages {
        padding: 10px;
    }

    .message {
        max-width: 92%;
        font-size: 0.85em;
        padding: 8px 12px;
    }

    .chat-input-container {
        padding: 8px 10px;
        gap: 6px;
    }

    #msg {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    button {
        padding: 8px 14px;
        font-size: 0.9em;
    }

    .suggested-action-btn {
        font-size: 0.78em;
        padding: 6px 10px;
    }

    .welcome-title {
        font-size: 1.3em;
    }

    .welcome-icon {
        font-size: 2.4em;
    }
}

/* ===== Speech Controls ===== */
.mic-button,
.speaker-button {
    padding: 12px 16px;
    background: #103146;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-button:hover,
.speaker-button:hover {
    background: #1a3a50;
    transform: scale(1.05);
}

.mic-button.recording {
    background: #dc3545;
    animation: pulse 1.5s infinite;
}

.speaker-button.active {
    background: #28a745;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}