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

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: #f5f6fb;
    color: #1a1b2e;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: center;
    padding: 0.6rem 2rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f6fb;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 999px;
    padding: 6px 12px;
    max-width: 1200px;
    width: 100%;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-logo img {
    height: 34px;
    width: auto;
    border-radius: 8px;
}

.nav-logo .nav-logo-text {
    font-weight: 700;
    font-size: 1rem;
    color: #1a1b2e;
    letter-spacing: -0.3px;
}

.nav-logo .nav-logo-text span {
    color: #6c5ce7;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #5a5c7e;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover {
    background: rgba(108, 92, 231, 0.08);
    color: #6c5ce7;
}

.nav-link.active {
    background: #6c5ce7;
    color: #ffffff;
}

.nav-link.active:hover {
    background: #5a4bd1;
}

.profile-wrapper {
    display: inline-block;
    flex-shrink: 0;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 28px;
    border: none;
    border-radius: 60px;
    background: linear-gradient(135deg, #6c5ce7, #8b7cf7);
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.30);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.40);
}

main {
    flex: 1 0 auto;
    padding: 20px 20px 0 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.banner-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px 48px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
    transition: box-shadow 0.3s ease;
}

.banner-card:hover {
    box-shadow: 0 24px 72px rgba(108, 92, 231, 0.08);
}

.banner-content {
    flex: 1;
}

.banner-image-wrapper {
    flex: 0 0 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image-wrapper img {
    width: 150%;
    height: auto;
    margin-right: 50px;
    object-fit: contain;
    border-radius: 12px;
}

.banner-title {
    font-size: 28px;
    font-weight: 800;
    color: #1a1b2e;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.banner-title span {
    color: #6c5ce7;
}

.banner-description {
    font-size: 15px;
    color: #5a5c7e;
    line-height: 1.6;
    margin-bottom: 22px;
    max-width: 480px;
}

.banner-features {
    display: flex;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.banner-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2d2f4b;
    font-size: 0.85rem;
    font-weight: 500;
}

.banner-feature i {
    color: #6c5ce7;
    font-size: 1rem;
    width: 18px;
}

.cards-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 24px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(108, 92, 231, 0.08);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(108, 92, 231, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 1.4rem;
    color: #6c5ce7;
}

.card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1b2e;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.card p {
    font-size: 0.95rem;
    color: #5a5c7e;
    line-height: 1.5;
    margin-bottom: 18px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #6c5ce7;
    text-decoration: none;
    transition: gap 0.25s ease, color 0.2s ease;
    cursor: pointer;
}

.card-link i {
    font-size: 0.8rem;
    transition: transform 0.25s ease;
}

.card-link:hover {
    gap: 14px;
    color: #5a4bd1;
}

.card-link:hover i {
    transform: translateX(4px);
}

.about-platform-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 48px 56px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 0;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
}

.about-platform-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(108, 92, 231, 0.08);
}

.about-platform-image-left {
    flex: 0 0 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-platform-image-left img {
    width: 150%;
    height: auto;
    border-radius: 12px;
}

.about-platform-content-right {
    flex: 1;
}

.about-platform-title {
    font-size: 28px;
    font-weight: 800;
    color: #1a1b2e;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.about-platform-text {
    font-size: 16px;
    color: #5a5c7e;
    line-height: 1.7;
    margin-bottom: 20px;
}

.about-platform-text strong {
    color: #6c5ce7;
    font-weight: 700;
}

.about-platform-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-platform-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #2d2f4b;
    font-weight: 500;
}

.about-platform-list li i {
    color: #6c5ce7;
    font-size: 18px;
    width: 22px;
}

.about-platform-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border: 2px solid #6c5ce7;
    border-radius: 60px;
    background: transparent;
    color: #6c5ce7;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.about-platform-btn:hover {
    background: #6c5ce7;
    color: #ffffff;
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.30);
    transform: translateY(-2px);
}

.faq-banner {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    border-radius: 24px;
    padding: 48px 56px;
    color: #ffffff;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.faq-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.faq-banner::before {
    content: '?';
    position: absolute;
    bottom: -30px;
    right: 40px;
    font-size: 200px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.04);
    pointer-events: none;
    line-height: 1;
}

.faq-banner-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.faq-banner-title i {
    margin-right: 12px;
    opacity: 0.8;
}

.faq-banner-subtitle {
    font-size: 16px;
    opacity: 0.85;
    max-width: 480px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

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

.faq-item {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.faq-item:hover {
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.08);
    transform: translateY(-2px);
}

.faq-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.faq-item-question {
    font-weight: 600;
    font-size: 15px;
    color: #1a1b2e;
    line-height: 1.4;
}

.faq-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(108, 92, 231, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c5ce7;
    font-size: 14px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.faq-item.active .faq-item-icon {
    transform: rotate(180deg);
    background: #6c5ce7;
    color: #ffffff;
}

.faq-item-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding-top: 0;
}

.faq-item.active .faq-item-answer {
    max-height: 300px;
    opacity: 1;
    padding-top: 16px;
}

.faq-item-answer p {
    font-size: 14px;
    color: #5a5c7e;
    line-height: 1.7;
    margin: 0;
}

.faq-item-answer p:not(:last-child) {
    margin-bottom: 8px;
}

.faq-item-answer ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    color: #5a5c7e;
    font-size: 14px;
    line-height: 1.7;
}

.faq-item-answer ul li {
    margin-bottom: 4px;
}

.faq-item-answer a {
    color: #6c5ce7;
    text-decoration: none;
    font-weight: 500;
}

.faq-item-answer a:hover {
    text-decoration: underline;
}

.support-banner {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    border-radius: 24px;
    padding: 48px 56px;
    color: #ffffff;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.support-banner::after {
    content: '';
    position: absolute;
    top: -60%;
    right: -5%;
    width: 350px;
    height: 350px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.support-banner::before {
    content: '\f3cd';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    position: absolute;
    bottom: -20px;
    right: 30px;
    font-size: 180px;
    color: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.support-banner-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.support-banner-title i {
    margin-right: 12px;
    opacity: 0.8;
}

.support-banner-subtitle {
    font-size: 16px;
    opacity: 0.85;
    max-width: 480px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.chat-container {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.chat-header {
    padding: 20px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fafbff;
}

.chat-header-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b894, #00cec9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.chat-header-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1b2e;
    margin: 0 0 2px 0;
}

.chat-header-info p {
    font-size: 13px;
    color: #5a5c7e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-header-info p .status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00b894;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.chat-messages {
    flex: 1;
    padding: 24px 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 400px;
    min-height: 300px;
    background: #f8f9fe;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    animation: messageIn 0.3s ease;
}

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

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.message-avatar.support {
    background: linear-gradient(135deg, #00b894, #00cec9);
}

.message-avatar.user {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

.message-bubble {
    padding: 14px 20px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    color: #1a1b2e;
    word-break: break-word;
}

.message.support .message-bubble {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.message.user .message-bubble {
    background: #6c5ce7;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #a0a2c0;
    margin-top: 4px;
    display: block;
}

.message.user .message-time {
    text-align: right;
    color: rgba(255, 255, 255, 0.5);
}

.chat-input-area {
    padding: 16px 28px 24px 28px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    background: #ffffff;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input-wrapper {
    flex: 1;
    display: flex;
    background: #f5f6fb;
    border-radius: 16px;
    padding: 4px 6px 4px 18px;
    align-items: flex-end;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.chat-input-wrapper:focus-within {
    border-color: #6c5ce7;
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1a1b2e;
    outline: none;
    resize: none;
    min-height: 48px;
    max-height: 120px;
    line-height: 1.5;
}

.chat-input::placeholder {
    color: #a0a2c0;
}

.chat-input-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: #6c5ce7;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-btn:hover {
    background: #5a4bd1;
    transform: scale(1.02);
}

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

.footer {
    background: linear-gradient(135deg, #13142a 0%, #1a1b2e 50%, #22234a 100%);
    color: #ffffff;
    padding: 60px 40px 0 40px;
    margin-top: 40px;
    border-top: 3px solid rgba(108, 92, 231, 0.3);
    flex-shrink: 0;
    width: 100%;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-left {
    flex: 0 0 340px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo img {
    height: 40px;
    width: auto;
    border-radius: 8px;
    filter: brightness(0) invert(1);
}

.footer-logo span {
    font-weight: 700;
    font-size: 1.2rem;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.footer-logo span span {
    color: #8b7cf7;
}

.footer-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    margin-bottom: 24px;
}

.footer-right {
    display: flex;
    gap: 60px;
    flex: 1;
    justify-content: flex-end;
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 700;
    color: #8b7cf7;
    margin-bottom: 18px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, #6c5ce7, transparent);
    border-radius: 2px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-col ul li a i {
    font-size: 12px;
    color: rgba(139, 124, 247, 0.4);
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.footer-col ul li a:hover i {
    color: #8b7cf7;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.5px;
}

.footer-bottom p::before {
    content: '✦ ';
    color: rgba(139, 124, 247, 0.3);
}

@media (max-width: 992px) {
    .banner-card {
        flex-direction: column;
        padding: 36px 32px;
        gap: 30px;
    }
    
    .banner-image-wrapper {
        flex: 0 0 auto;
        width: 100%;
        max-width: 350px;
    }
    
    .banner-image-wrapper img {
        max-height: 200px;
    }
    
    .cards-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-platform-card {
        flex-direction: column;
        padding: 36px 28px;
        gap: 32px;
    }
    
    .about-platform-image-left {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
    }
    
    .about-platform-image-left img {
        max-height: 180px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .footer {
        padding: 40px 20px 0 20px;
    }
    
    .footer-inner {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-left {
        flex: 1;
    }
    
    .footer-right {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 0.5rem 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 40px;
        padding: 8px 12px;
        gap: 6px;
    }
    
    .nav-logo .nav-logo-text {
        font-size: 0.85rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 4px;
        order: 3;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .profile-wrapper {
        width: 100%;
    }
    
    .login-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .banner-card {
        padding: 28px 24px;
        border-radius: 20px;
        gap: 24px;
    }
    
    .banner-title {
        font-size: 24px;
    }
    
    .banner-description {
        font-size: 14px;
    }
    
    .banner-features {
        flex-wrap: wrap;
        gap: 12px;
        padding-top: 20px;
    }
    
    .banner-feature {
        white-space: normal;
        font-size: 0.85rem;
    }
    
    .banner-image-wrapper {
        max-width: 260px;
    }
    
    .banner-image-wrapper img {
        max-height: 160px;
    }
    
    .cards-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card {
        padding: 22px 20px;
    }
    
    .card h3 {
        font-size: 1rem;
    }
    
    .card p {
        font-size: 0.9rem;
    }
    
    .about-platform-card {
        padding: 28px 20px;
        border-radius: 20px;
        gap: 24px;
    }
    
    .about-platform-title {
        font-size: 24px;
    }
    
    .about-platform-text {
        font-size: 15px;
    }
    
    .about-platform-list li {
        font-size: 14px;
    }
    
    .about-platform-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.85rem;
    }
    
    .about-platform-image-left {
        max-width: 240px;
    }
    
    .about-platform-image-left img {
        max-height: 150px;
    }
    
    .faq-banner {
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .faq-banner-title {
        font-size: 26px;
    }
    
    .faq-banner-subtitle {
        font-size: 14px;
    }
    
    .faq-item {
        padding: 20px;
        border-radius: 16px;
    }
    
    .faq-item-question {
        font-size: 14px;
    }
    
    .support-banner {
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .support-banner-title {
        font-size: 26px;
    }
    
    .support-banner-subtitle {
        font-size: 14px;
    }
    
    .chat-container {
        border-radius: 20px;
        min-height: 450px;
    }
    
    .chat-header {
        padding: 16px 20px;
    }
    
    .chat-messages {
        padding: 16px 20px;
        max-height: 340px;
        min-height: 240px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-input-area {
        padding: 12px 20px 18px 20px;
    }
    
    .chat-input-wrapper {
        padding: 2px 4px 2px 14px;
    }
    
    .footer {
        padding: 30px 16px 0 16px;
    }
    
    .footer-inner {
        gap: 30px;
        padding-bottom: 30px;
    }
    
    .footer-right {
        flex-direction: column;
        gap: 24px;
    }
    
    .footer-left {
        flex: 1;
    }
    
    .footer-logo span {
        font-size: 1rem;
    }
    
    .footer-description {
        font-size: 13px;
    }
    
    .footer-col h4 {
        font-size: 13px;
    }
    
    .footer-col ul li a {
        font-size: 13px;
    }
    
    .footer-bottom p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 12px 12px 0 12px;
    }
    
    .banner-card {
        padding: 20px 16px;
        border-radius: 16px;
        gap: 18px;
    }
    
    .banner-title {
        font-size: 20px;
    }
    
    .banner-description {
        font-size: 13px;
    }
    
    .banner-feature {
        font-size: 0.8rem;
    }
    
    .banner-feature i {
        font-size: 0.9rem;
        width: 18px;
    }
    
    .banner-image-wrapper {
        max-width: 200px;
    }
    
    .banner-image-wrapper img {
        max-height: 120px;
    }
    
    .login-btn {
        padding: 8px 16px;
        font-size: 0.75rem;
        gap: 6px;
    }
    
    .login-btn i {
        font-size: 0.8rem;
    }
    
    .nav-link {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    .cards-section {
        gap: 12px;
    }
    
    .card {
        padding: 18px 16px;
        border-radius: 20px;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .card h3 {
        font-size: 0.95rem;
    }
    
    .card p {
        font-size: 0.85rem;
    }
    
    .about-platform-card {
        padding: 20px 16px;
        border-radius: 16px;
        gap: 18px;
    }
    
    .about-platform-title {
        font-size: 20px;
    }
    
    .about-platform-text {
        font-size: 14px;
    }
    
    .about-platform-list li {
        font-size: 13px;
        gap: 10px;
    }
    
    .about-platform-list li i {
        font-size: 16px;
        width: 20px;
    }
    
    .about-platform-btn {
        font-size: 0.8rem;
        padding: 10px 16px;
    }
    
    .about-platform-image-left {
        max-width: 180px;
    }
    
    .about-platform-image-left img {
        max-height: 120px;
    }
    
    .faq-banner {
        padding: 24px 18px;
        border-radius: 16px;
    }
    
    .faq-banner-title {
        font-size: 22px;
    }
    
    .faq-banner-subtitle {
        font-size: 13px;
    }
    
    .faq-item {
        padding: 16px;
    }
    
    .faq-item-question {
        font-size: 13px;
    }
    
    .faq-item-answer p,
    .faq-item-answer ul {
        font-size: 13px;
    }
    
    .support-banner {
        padding: 24px 18px;
        border-radius: 16px;
    }
    
    .support-banner-title {
        font-size: 22px;
    }
    
    .support-banner-subtitle {
        font-size: 13px;
    }
    
    .chat-container {
        border-radius: 16px;
        min-height: 400px;
    }
    
    .chat-header {
        padding: 14px 16px;
    }
    
    .chat-header-info h3 {
        font-size: 14px;
    }
    
    .chat-header-info p {
        font-size: 12px;
    }
    
    .chat-header-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .chat-messages {
        padding: 12px 16px;
        max-height: 300px;
        min-height: 200px;
        gap: 12px;
    }
    
    .message {
        max-width: 95%;
    }
    
    .message-bubble {
        font-size: 13px;
        padding: 12px 16px;
    }
    
    .message-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .chat-input-area {
        padding: 10px 16px 14px 16px;
        gap: 8px;
    }
    
    .chat-input-wrapper {
        padding: 2px 4px 2px 12px;
        border-radius: 12px;
    }
    
    .chat-input {
        font-size: 13px;
        padding: 10px 0;
        min-height: 40px;
    }
    
    .chat-input-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .footer {
        padding: 24px 12px 0 12px;
    }
    
    .footer-inner {
        gap: 24px;
        padding-bottom: 24px;
    }
    
    .footer-bottom {
        padding: 16px 0;
    }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #ffffff;
    border-radius: 32px;
    max-width: 540px;
    width: 100%;
    padding: 40px 36px;
    position: relative;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #a0a2c0;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #1a1b2e;
    transform: rotate(90deg);
    background: rgba(0, 0, 0, 0.05);
}

.modal-icon {
    text-align: center;
}

.modal-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a1b2e;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.modal-text {
    font-size: 15px;
    color: #5a5c7e;
    line-height: 1.7;
    margin-bottom: 20px;
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #2d2f4b;
    font-weight: 500;
}

.modal-list li i {
    color: #6c5ce7;
    font-size: 18px;
    width: 22px;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border: none;
    border-radius: 60px;
    background: linear-gradient(135deg, #6c5ce7, #8b7cf7);
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.30);
    width: 100%;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.40);
}

@media (max-width: 768px) {
    .modal {
        padding: 32px 24px;
        border-radius: 24px;
    }

    .modal-title {
        font-size: 22px;
    }

    .modal-text {
        font-size: 14px;
    }

    .modal-list li {
        font-size: 13px;
    }

    .modal-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-text {
        font-size: 13px;
    }

    .modal-list li {
        font-size: 12px;
        gap: 10px;
    }

    .modal-list li i {
        font-size: 16px;
        width: 18px;
    }

    .modal-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .modal-close {
        font-size: 24px;
        width: 36px;
        height: 36px;
        top: 12px;
        right: 14px;
    }
}

.footer-col ul li a[data-modal] {
    cursor: pointer;
}

.footer-col ul li a[data-modal]:hover {
    color: #ffffff;
}

.modal-login {
    max-width: 440px;
    padding: 32px 32px 28px;
}

.modal-login-header {
    text-align: center;
    margin-bottom: 28px;
}

.modal-login-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.35);
}

.modal-login-subtitle {
    font-size: 14px;
    color: #8888aa;
    margin-top: 4px;
}

.modal-login-form .form-group {
    margin-bottom: 18px;
}

.modal-login-form .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #2d2f4b;
    margin-bottom: 6px;
}

.modal-login-form .form-group label i {
    color: #6c5ce7;
    font-size: 14px;
    width: 18px;
}

.modal-login-form .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e9f2;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1a1b2e;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #f8f9fe;
    outline: none;
}

.modal-login-form .form-group input:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
    background: #ffffff;
}

.modal-login-form .form-group input::placeholder {
    color: #b0b2c8;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 48px !important;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #b0b2c8;
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #6c5ce7;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0 22px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5a5c7e;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-label .checkmark {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 2px solid #d0d2e0;
    background: #fff;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-label input:checked + .checkmark {
    background: #6c5ce7;
    border-color: #6c5ce7;
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.forgot-link {
    font-size: 13px;
    color: #6c5ce7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #5a4bd1;
    text-decoration: underline;
}

.modal-login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6c5ce7, #8b7cf7);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.40);
}

.modal-login-btn:active {
    transform: scale(0.98);
}

.modal-login-footer {
    text-align: center;
    font-size: 14px;
    color: #5a5c7e;
    margin-top: 20px;
}

.modal-login-footer a {
    color: #6c5ce7;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.modal-login-footer a:hover {
    color: #5a4bd1;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .modal-login {
        padding: 24px 18px 20px;
        border-radius: 20px;
    }

    .modal-login-icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }

    .modal-login-form .form-group input {
        padding: 10px 14px;
        font-size: 13px;
    }

    .modal-login-btn {
        padding: 12px;
        font-size: 14px;
    }

    .form-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

.modal-login-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e9f2;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1a1b2e;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #f8f9fe;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236c5ce7' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.modal-login-form select:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
    background: #ffffff;
}

.modal-login-form select option {
    padding: 8px;
}

.class-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fe;
    border: 2px solid #e8e9f2;
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.3s ease;
}

.class-selector:focus-within {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.class-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.class-label {
    font-weight: 600;
    font-size: 13px;
    color: #2d2f4b;
    min-width: 70px;
    flex-shrink: 0;
}

.class-letters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.letter-btn {
    position: relative;
    cursor: pointer;
}

.letter-btn input[type="radio"] {
    display: none;
}

.letter-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 2px solid #d0d2e0;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    color: #5a5c7e;
    transition: all 0.3s ease;
    user-select: none;
}

.letter-btn:hover span {
    border-color: #6c5ce7;
    color: #6c5ce7;
    transform: translateY(-2px);
}

.letter-btn input[type="radio"]:checked + span {
    background: #6c5ce7;
    border-color: #6c5ce7;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.30);
    transform: translateY(-2px);
}

.verify-code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 8px 0 4px;
}

.verify-input {
    width: 44px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    border: 2px solid #e8e9f2;
    border-radius: 12px;
    background: #f8f9fe;
    color: #1a1b2e;
    transition: all 0.3s ease;
    outline: none;
}

.verify-input:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
    background: #ffffff;
    transform: translateY(-2px);
}

.verify-input.filled {
    border-color: #6c5ce7;
    background: #f5f0ff;
}

.verify-input.error {
    border-color: #e17055;
    background: #fff5f3;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

@media (max-width: 768px) {
    .class-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .class-label {
        min-width: auto;
        font-size: 12px;
    }
    
    .class-letters {
        gap: 4px;
    }
    
    .letter-btn span {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .modal-login {
        padding: 24px 18px 20px;
        border-radius: 20px;
    }
    
    .class-selector {
        padding: 12px;
    }
    
    .letter-btn span {
        width: 28px;
        height: 28px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .verify-code-inputs {
        gap: 6px;
    }
    
    .verify-input {
        width: 36px;
        height: 48px;
        font-size: 20px;
        border-radius: 10px;
    }
}

#modalRegister .modal-login-icon {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
}

#modalRegister .modal-login-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.30) !important;
}

#modalRegister .modal-login-btn:hover {
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.45) !important;
    transform: translateY(-2px);
}

#modalRegister .form-group input:focus,
#modalRegister select:focus {
    border-color: #6c5ce7 !important;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15) !important;
}

#modalRegister .letter-btn input[type="radio"]:checked + span {
    background: #6c5ce7 !important;
    border-color: #6c5ce7 !important;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.30) !important;
}

#modalRegister .letter-btn:hover span {
    border-color: #6c5ce7 !important;
    color: #6c5ce7 !important;
}

#modalVerify .modal-login-icon {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
}

#modalVerify .modal-login-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.30) !important;
}

#modalVerify .modal-login-btn:hover {
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.45) !important;
    transform: translateY(-2px);
}

#modalVerify .verify-input:focus {
    border-color: #6c5ce7 !important;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15) !important;
}

#modalVerify .verify-input.filled {
    border-color: #6c5ce7 !important;
    background: #f5f0ff !important;
}

#modalVerify #resendCodeBtn {
    border-color: #6c5ce7 !important;
    color: #6c5ce7 !important;
}

#modalVerify #resendCodeBtn:hover {
    background: rgba(108, 92, 231, 0.08) !important;
}

#modalResetPassword .modal-login-icon {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
}

#modalResetPassword .modal-login-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.30) !important;
}

#modalResetPassword .modal-login-btn:hover {
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.45) !important;
    transform: translateY(-2px);
}

#modalResetPassword .form-group input:focus {
    border-color: #6c5ce7 !important;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15) !important;
}

#modalRegister .modal,
#modalVerify .modal,
#modalResetPassword .modal {
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#modalResetPassword .modal-login-icon,
#modalResetVerify .modal-login-icon,
#modalResetSuccess .modal-login-icon {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
}

#modalResetPassword .modal-login-btn,
#modalResetVerify .modal-login-btn,
#modalResetSuccess .modal-login-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.30) !important;
}

#modalResetPassword .modal-login-btn:hover,
#modalResetVerify .modal-login-btn:hover,
#modalResetSuccess .modal-login-btn:hover {
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.45) !important;
    transform: translateY(-2px);
}

#modalResetPassword .form-group input:focus,
#modalResetVerify .form-group input:focus {
    border-color: #6c5ce7 !important;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15) !important;
}

#modalResetVerify .reset-verify-input:focus {
    border-color: #6c5ce7 !important;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15) !important;
}

#modalResetVerify .reset-verify-input.filled {
    border-color: #6c5ce7 !important;
    background: #f5f0ff !important;
}

#modalResetVerify #resendResetCodeBtn {
    border-color: #6c5ce7 !important;
    color: #6c5ce7 !important;
}

#modalResetVerify #resendResetCodeBtn:hover {
    background: rgba(108, 92, 231, 0.08) !important;
}

#modalResetSuccess .modal-title {
    color: #6c5ce7 !important;
}

#modalResetPassword .modal,
#modalResetVerify .modal,
#modalResetSuccess .modal {
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}