/* --- Biến màu và Cài đặt chung --- */
:root {
    --bg-color: #121212;
    --primary-surface-color: #1E1E1E;
    --text-color: #E0E0E0;
    --text-secondary-color: #A0A0A0;
    --accent-gradient: linear-gradient(90deg, #3A8BFF, #A33AFF);
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Header & Navigation --- */
header {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-secondary-color);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #fff;
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px; /* Thêm padding để không bị header che */
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary-color);
    margin-bottom: 2rem;
    max-width: 500px;
}

.cta-button {
    display: inline-block;
    background: var(--accent-gradient);
    color: #fff;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(58, 139, 255, 0.2);
}

/* --- Chatbot iFrame (Glassmorphism) --- */
.chatbot-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chatbot-container {
    width: 100%;
    max-width: 450px;
    height: 70vh;
    min-height: 550px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 1rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.chatbot-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
}

/* --- Sections chung --- */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 4rem;
}

/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--primary-surface-color);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary-color);
}

/* --- About Section --- */
#about {
    background-color: var(--primary-surface-color);
}

.about-container {
    max-width: 800px;
    text-align: center;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary-color);
}

/* --- Animation Classes --- */
.animate-on-load,
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-load.is-visible,
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content p {
        margin: 1.5rem auto 2rem;
    }

    .chatbot-wrapper {
        margin-top: 4rem;
    }
}

@media (max-width: 768px) {
    header nav {
        display: none; /* Đơn giản hoá: ẩn nav trên mobile */
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }
}
