@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #1a2a3a 0%, #223F59 25%, #2F4C73 50%, #223F59 75%, #1a2a3a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(160, 177, 221, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(217, 179, 67, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(47, 76, 115, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2F4C73 0%, #3d5f8a 50%, #2F4C73 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 20px 20px 0 0;
    box-shadow:
        0 8px 32px rgba(47, 76, 115, 0.6),
        0 0 60px rgba(160, 177, 221, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid rgba(160, 177, 221, 0.4);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(160, 177, 221, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(217, 179, 67, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
}

.logo-container {
    position: relative;
}

.ai-logo {
    width: 85px;
    height: 85px;
    filter: drop-shadow(0 0 15px rgba(160, 177, 221, 0.6))
            drop-shadow(0 0 25px rgba(217, 179, 67, 0.3));
    animation: logoFloat 3s ease-in-out infinite;
    object-fit: contain;
    opacity: 0.98;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    padding: 5px;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes logoPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes neuralPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.header-text {
    flex: 1;
    text-align: left;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 6px;
    font-weight: 700;
    position: relative;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #A0B1DD 50%, #D9B343 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.header .ai-badge {
    display: inline-block;
    font-size: 13px;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(160, 177, 221, 0.25), rgba(217, 179, 67, 0.25));
    border: 1px solid rgba(160, 177, 221, 0.5);
    border-radius: 20px;
    margin-left: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #A0B1DD;
    text-shadow: 0 0 10px rgba(160, 177, 221, 0.5);
    animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(160, 177, 221, 0.3); }
    50% { box-shadow: 0 0 20px rgba(160, 177, 221, 0.6); }
}

.header p {
    font-size: 14px;
    opacity: 0.9;
    position: relative;
    font-weight: 400;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.85);
}

/* Tab Navigation */
.tab-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 20px 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(160, 177, 221, 0.25);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    background: rgba(47, 76, 115, 0.3);
    border-bottom: 2px solid rgba(160, 177, 221, 0.5);
    overflow-x: auto;
    backdrop-filter: blur(10px);
}

.tab-button {
    flex: 1;
    padding: 20px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    position: relative;
}

.tab-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #A0B1DD, #D9B343);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-button:last-child {
    border-right: none;
}

.tab-button:hover {
    background: rgba(160, 177, 221, 0.2);
    color: #A0B1DD;
}

.tab-button.active {
    background: linear-gradient(135deg, rgba(47, 76, 115, 0.4), rgba(34, 63, 89, 0.5));
    color: white;
    box-shadow: inset 0 -3px 0 #A0B1DD;
}

.tab-button.active::before {
    transform: scaleX(1);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 40px;
    min-height: 600px;
    animation: fadeIn 0.5s ease;
    color: #f0f0f0;
}

.tab-content.active {
    display: block;
}

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

.tab-content h2 {
    color: white;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 700;
    padding-bottom: 15px;
    position: relative;
}

.tab-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #A0B1DD, #D9B343);
    border-radius: 3px;
}

/* Chat Widget Container */
.chat-widget {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 0;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.chat-widget iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 15px;
    background: transparent;
}

/* Custom Chat Interface */
.custom-chat {
    width: 100%;
    height: 550px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

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

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(160, 177, 221, 0.4);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(160, 177, 221, 0.6);
}

.chat-message {
    display: flex;
    gap: 12px;
    animation: messageSlideIn 0.3s ease;
}

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

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.chat-message.ai .chat-avatar {
    background: linear-gradient(135deg, #2F4C73, #5a7aa8);
    border: 2px solid #A0B1DD;
    box-shadow: 0 0 15px rgba(160, 177, 221, 0.4);
}

.chat-message.user .chat-avatar {
    background: linear-gradient(135deg, #5a7aa8, #7a9bc9);
    border: 2px solid #D9B343;
    box-shadow: 0 0 15px rgba(217, 179, 67, 0.3);
}

.chat-bubble {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 15px;
    line-height: 1.6;
    word-wrap: break-word;
}

.chat-message.ai .chat-bubble {
    background: rgba(47, 76, 115, 0.4);
    border: 1px solid rgba(160, 177, 221, 0.3);
    color: #ffffff;
    border-radius: 15px 15px 15px 5px;
}

.chat-message.user .chat-bubble {
    background: rgba(90, 122, 168, 0.3);
    border: 1px solid rgba(217, 179, 67, 0.3);
    color: #ffffff;
    border-radius: 15px 15px 5px 15px;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}

.chat-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(160, 177, 221, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-input:focus {
    outline: none;
    border-color: #A0B1DD;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(160, 177, 221, 0.2);
}

.chat-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2F4C73, #5a7aa8);
    border: 2px solid #A0B1DD;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: linear-gradient(135deg, #3d5f8a, #6b8bb0);
    box-shadow: 0 0 20px rgba(160, 177, 221, 0.6);
    transform: scale(1.05);
}

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

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-typing {
    display: none;
    padding: 12px 18px;
    background: rgba(47, 76, 115, 0.4);
    border: 1px solid rgba(160, 177, 221, 0.3);
    border-radius: 15px;
    width: fit-content;
}

.chat-typing.show {
    display: block;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #A0B1DD;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.chat-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.chat-placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #A0B1DD, #D9B343);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chat-placeholder p {
    font-size: 16px;
    line-height: 1.8;
}

/* Info Box */
.info-box {
    background: rgba(255, 215, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.1);
}

.info-box h3 {
    color: #FFD700;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.info-box ul {
    margin-left: 20px;
    color: rgba(255, 255, 255, 0.85);
}

.info-box li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 30px 20px;
    margin-top: 40px;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.footer p {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .header-text {
        text-align: center;
    }

    .ai-logo {
        width: 85px;
        height: 85px;
    }

    .header h1 {
        font-size: 22px;
    }

    .header .ai-badge {
        display: block;
        margin: 8px auto 0;
        width: fit-content;
    }

    .tab-button {
        font-size: 14px;
        padding: 15px 10px;
    }

    .tab-content {
        padding: 20px;
        min-height: 500px;
    }

    .tab-content h2 {
        font-size: 20px;
    }

    .chat-widget {
        padding: 15px;
        min-height: 400px;
    }

    .chat-widget iframe {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 25px 15px;
    }

    .ai-logo {
        width: 95px;
        height: 95px;
    }

    .header h1 {
        font-size: 18px;
    }

    .header p {
        font-size: 13px;
        letter-spacing: 0.3px;
    }

    .header .ai-badge {
        font-size: 11px;
        padding: 3px 10px;
        margin-top: 6px;
    }

    .tab-button {
        font-size: 12px;
        padding: 12px 8px;
    }

    .tab-content {
        padding: 15px;
    }
}

/* ========== Form Styles (Tab 2) ========== */
.form-section {
    display: none;
    margin-bottom: 30px;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.section-title {
    font-size: 22px;
    color: white;
    margin-bottom: 25px;
    padding-bottom: 12px;
    font-weight: 600;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #A0B1DD, #D9B343);
    border-radius: 3px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.form-group label .required {
    color: #D9B343;
    margin-left: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input::placeholder,
.form-group select::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23FFD700' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    appearance: none;
}

.form-group select option {
    background: #1a1a1a;
    color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #A0B1DD;
    box-shadow: 0 0 0 3px rgba(160, 177, 221, 0.25), 0 0 20px rgba(160, 177, 221, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: rgba(220, 53, 69, 0.6);
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: rgba(40, 167, 69, 0.6);
}

.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-group input:invalid:not(:placeholder-shown) + .error-message {
    display: block;
}

/* Progress Indicator */
.progress-container {
    margin-bottom: 35px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 10px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
    border-radius: 3px;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #2F4C73, #A0B1DD, #D9B343);
    z-index: 1;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
    box-shadow: 0 0 15px rgba(160, 177, 221, 0.5);
}

.progress-bar[data-step="1"]::after { width: 0%; }
.progress-bar[data-step="2"]::after { width: 50%; }
.progress-bar[data-step="3"]::after { width: 100%; }

.progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
}

.progress-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

.progress-step.active .progress-circle {
    border-color: #A0B1DD;
    background: linear-gradient(135deg, #A0B1DD, #7a9bc9);
    color: white;
    box-shadow: 0 0 25px rgba(160, 177, 221, 0.8), 0 0 40px rgba(160, 177, 221, 0.5);
    transform: scale(1.1);
}

.progress-step.completed .progress-circle {
    border-color: #2F4C73;
    background: linear-gradient(135deg, #2F4C73, #446489);
    color: white;
    box-shadow: 0 0 20px rgba(47, 76, 115, 0.6);
}

.progress-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.progress-step.active .progress-label {
    color: #A0B1DD;
    font-weight: 600;
}

.progress-step.completed .progress-label {
    color: rgba(160, 177, 221, 0.7);
}

/* Form Buttons */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-prev {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.btn-prev:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #2F4C73 0%, #223F59 100%);
    color: white;
    flex: 1;
    border: 1px solid rgba(160, 177, 221, 0.4);
    position: relative;
    overflow: hidden;
}

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

.btn-next:hover::before,
.btn-submit:hover::before {
    left: 100%;
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(47, 76, 115, 0.6),
        0 0 30px rgba(160, 177, 221, 0.5);
    border-color: rgba(160, 177, 221, 0.7);
}

.btn-next:disabled,
.btn-submit:disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
}

/* Alert Messages */
.alert {
    padding: 18px 24px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: none;
    backdrop-filter: blur(10px);
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.alert.show {
    display: block;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    color: #90ee90;
    border: 1px solid rgba(40, 167, 69, 0.4);
}

.alert-error {
    background: rgba(220, 53, 69, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(220, 53, 69, 0.4);
}

.alert-info {
    background: rgba(160, 177, 221, 0.15);
    color: #A0B1DD;
    border: 1px solid rgba(160, 177, 221, 0.4);
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #A0B1DD;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
    display: none;
    box-shadow: 0 0 20px rgba(160, 177, 221, 0.6);
}

.spinner.show {
    display: block;
}

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

/* Responsive Form */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 15px 12px;
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
    }

    .header-text {
        text-align: center;
    }

    .ai-logo {
        width: 50px;
        height: 50px;
    }

    .header h1 {
        font-size: 18px;
        line-height: 1.3;
    }

    .header p {
        font-size: 10px;
        line-height: 1.4;
    }

    .header .ai-badge {
        display: block;
        margin: 8px auto 0;
        font-size: 11px;
        padding: 3px 10px;
    }

    .tab-button {
        font-size: 14px;
        padding: 16px 10px;
        line-height: 1.3;
    }

    .tab-content {
        padding: 20px 15px;
        min-height: auto;
    }

    .tab-content h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .info-box {
        padding: 15px;
        margin-bottom: 15px;
        font-size: 14px;
    }

    .info-box h3 {
        font-size: 16px;
    }

    .info-box ul {
        margin-left: 15px;
    }

    .info-box li {
        margin-bottom: 6px;
        font-size: 13px;
    }

    .chat-widget {
        min-height: 450px;
        padding: 0;
    }

    .custom-chat {
        height: 450px;
    }

    .chat-messages {
        padding: 15px 10px;
        gap: 12px;
    }

    .chat-bubble {
        max-width: 85%;
        padding: 10px 14px;
        font-size: 14px;
        line-height: 1.5;
    }

    .chat-avatar {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .chat-input-area {
        padding: 12px 10px;
    }

    .chat-input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .chat-send-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 14px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .progress-container {
        padding: 15px;
        margin-bottom: 20px;
    }

    .progress-circle {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .progress-label {
        font-size: 11px;
    }

    .button-group {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }

    .btn, .btn-prev, .btn-next, .btn-submit {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }

    .footer {
        padding: 20px 15px;
        margin-top: 20px;
        font-size: 12px;
    }
}

/* Extra small devices (phones in portrait, less than 400px) */
@media (max-width: 400px) {
    .header {
        padding: 12px 8px;
    }

    .ai-logo {
        width: 45px;
        height: 45px;
    }

    .header h1 {
        font-size: 16px;
        line-height: 1.2;
    }

    .header p {
        font-size: 9px;
        line-height: 1.3;
    }

    .header .ai-badge {
        font-size: 10px;
        padding: 2px 8px;
        margin-top: 6px;
    }

    .tab-button {
        font-size: 12px;
        padding: 14px 6px;
        line-height: 1.2;
    }

    .tab-content {
        padding: 15px 10px;
    }

    .chat-messages {
        padding: 10px;
    }

    .chat-bubble {
        font-size: 13px;
        padding: 9px 12px;
    }

    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Login Screen Styles */
.login-container {
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #2F4C73 0%, #3d5f8a 50%, #2F4C73 100%);
    border-radius: 0 0 20px 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(160, 177, 221, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(217, 179, 67, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(160, 177, 221, 0.3);
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 500px;
    width: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.login-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
    animation: lockBounce 2s ease-in-out infinite;
}

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

.login-box h2 {
    color: white;
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
}
