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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Banner */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    background-image: url('https://images.unsplash.com/photo-1541701494587-cb58502866ab?w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.7);
}

.banner-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 20px;
}

.banner h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.banner p {
    font-size: 1.2rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 20px;
    position: relative;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
    padding: 10px 15px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: #667eea;
}

.navbar {
    position: relative;
}

.nav-link {
    display: inline-block;
    padding: 15px 25px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background: #f5f5f5;
    color: #667eea;
}

.nav-link.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 40px;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
}

.welcome-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.welcome-section > p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.card p {
    color: #666;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: #764ba2;
    transform: scale(1.05);
}

/* Content Section */
.content-section {
    line-height: 1.8;
}

.content-section h1 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2.5rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.content-section h2 {
    color: #764ba2;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 2rem;
}

.content-section h3 {
    color: #667eea;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.content-image {
    margin: 30px 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.content-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    box-sizing: border-box;
    display: block;
    object-fit: contain;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Chuyên đề 1 - Kích thước hài hòa */
.content-image.chuyen-de-1-image {
    margin: 30px 0;
}

.content-image.chuyen-de-1-image a {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-image.chuyen-de-1-image a:hover {
    transform: translateY(-5px);
}

.content-image.chuyen-de-1-image img {
    max-width: 700px;
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.content-image.chuyen-de-1-image a:hover img {
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    transform: scale(1.02);
}

.content-image.large-image {
    margin: 40px 0;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    min-height: 0;
    cursor: pointer;
}

.content-image.large-image img {
    width: 100%;
    max-width: 800px;
    height: auto;
    max-height: 500px;
    min-height: 0;
    display: block;
    margin: 0 auto;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    object-fit: contain;
    background: #f9f9f9;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    box-sizing: border-box;
    vertical-align: middle;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-image.large-image:hover img {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0,0,0,0.4);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 30px 0;
}

.color-table, .definition-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.color-table th, .definition-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.color-table td, .definition-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.color-table tr:hover, .definition-table tr:hover {
    background: #f5f5f5;
}

/* Info Boxes */
.info-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid #667eea;
}

.info-box.highlight {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-left-color: #f39c12;
}

.info-box ul {
    margin-left: 20px;
    margin-top: 10px;
}

.info-box li {
    margin: 8px 0;
}

/* Steps Box */
.steps-box {
    margin: 30px 0;
}

.step {
    display: flex;
    margin: 20px 0;
    align-items: flex-start;
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-right: 20px;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.step-content ul {
    margin-left: 20px;
}

/* Tips Box */
.tips-box {
    background: #e8f5e9;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    border-left: 5px solid #4caf50;
}

.tips-box ul {
    margin-left: 20px;
}

.tips-box li {
    margin: 10px 0;
}

/* Summary Box */
.summary-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
}

.summary-box h3 {
    color: white;
    margin-bottom: 15px;
}

.summary-box ul {
    margin-left: 20px;
}

.summary-box li {
    margin: 10px 0;
}

/* Color Groups */
.color-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

/* Color Header Section - 2 cột như trong hình */
.color-header-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: #1a5f3f;
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    color: white;
}

.color-header-left h3,
.color-header-right h3 {
    color: white;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.color-header-left h3:first-child,
.color-header-right h3:first-child {
    margin-top: 0;
}

.color-header-left .color-list,
.color-header-right .color-list {
    list-style: none;
    margin-left: 0;
    margin-bottom: 15px;
}

.color-header-left .color-list li,
.color-header-right .color-list li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.color-header-left .color-list li:last-child,
.color-header-right .color-list li:last-child {
    border-bottom: none;
}

/* Color Chart Title */
.color-chart-title {
    color: #667eea;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-align: center;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
}

.color-category {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.color-category:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.color-category h3 {
    margin-bottom: 15px;
    color: #667eea;
}


.color-list {
    list-style: none;
    margin-left: 0;
}

.color-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.color-list li:last-child {
    border-bottom: none;
}

/* Chatbot Section */
.chatbot-section {
    max-width: 900px;
    margin: 0 auto;
}

.chatbot-intro {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.chatbot-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #f9f9f9;
}

.message {
    margin-bottom: 20px;
    display: flex;
}

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 20px;
    word-wrap: break-word;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message .message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 5px;
}

.message-content ul {
    margin: 10px 0 10px 20px;
}

.message-content li {
    margin: 5px 0;
}

.chat-input-container {
    display: flex;
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chat-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: #667eea;
}

.send-btn {
    margin-left: 10px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.05);
}

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

/* Email Section */
.email-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.email-section h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.email-form {
    margin-top: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    border-color: #667eea;
}

.form-textarea {
    resize: vertical;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
}

.email-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.email-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.email-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
/* Tablet and Small Desktop */
@media (max-width: 1024px) {
    .container {
        padding: 30px 20px;
    }
    
    .banner {
        padding: 60px 20px;
    }
    
    .banner h1 {
        font-size: 2.5rem;
    }
    
    .welcome-section h2 {
        font-size: 2rem;
    }
    
    .feature-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

/* Mobile and Tablet */
@media (max-width: 768px) {
    .banner {
        padding: 50px 15px;
        min-height: 250px;
    }
    
    .banner h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .banner p {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    /* Mobile Navigation */
    .menu-toggle {
        display: block;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-container.active {
        max-height: 500px;
    }
    
    .nav-link {
        width: 100%;
        text-align: left;
        padding: 15px 20px;
        border-bottom: 1px solid #e0e0e0;
        border-left: 4px solid transparent;
    }
    
    .nav-link.active {
        border-left-color: #667eea;
        border-bottom-color: #e0e0e0;
    }
    
    .nav-link:hover {
        background: #f5f5f5;
        border-left-color: #667eea;
    }
    
    .container {
        padding: 20px 15px;
        margin: 20px 10px;
        border-radius: 8px;
    }
    
    .welcome-section h2 {
        font-size: 1.75rem;
        margin-bottom: 15px;
    }
    
    .welcome-section > p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .content-section h1 {
        font-size: 1.75rem;
        margin-bottom: 20px;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
        margin-top: 30px;
        margin-bottom: 15px;
    }
    
    .content-section h3 {
        font-size: 1.25rem;
        margin-top: 25px;
        margin-bottom: 12px;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .card {
        padding: 25px 20px;
    }
    
    .card-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }
    
    .card h3 {
        font-size: 1.3rem;
    }
    
    .card p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
    
    /* Content Images */
    .content-image {
        margin: 20px 0;
    }
    
    .content-image.large-image {
        margin: 20px 0;
    }
    
    .content-image.large-image img {
        max-width: 100%;
        max-height: 300px;
        border-radius: 8px;
    }
    
    .content-image.chuyen-de-1-image img {
        max-width: 100%;
        border-radius: 10px;
    }
    
    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 20px -15px;
        padding: 0 15px;
    }
    
    .color-table, .definition-table {
        font-size: 0.9rem;
        min-width: 600px;
    }
    
    .color-table th, .definition-table th,
    .color-table td, .definition-table td {
        padding: 10px 12px;
    }
    
    /* Info Boxes */
    .info-box {
        padding: 20px;
        margin: 15px 0;
    }
    
    .tips-box {
        padding: 20px;
        margin: 20px 0;
    }
    
    .summary-box {
        padding: 25px 20px;
        margin: 20px 0;
    }
    
    /* Steps */
    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin: 20px 0;
    }
    
    .step-number {
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    .step-content {
        text-align: left;
    }
    
    /* Color Groups */
    .color-group {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }
    
    .color-header-section {
        grid-template-columns: 1fr;
        padding: 20px 15px;
        gap: 25px;
        margin: 20px 0;
    }
    
    .color-header-left h3,
    .color-header-right h3 {
        font-size: 1.2rem;
    }
    
    .color-chart-title {
        font-size: 1.5rem;
        padding: 12px;
        margin-top: 30px;
    }
    
    .color-category {
        padding: 15px;
    }
    
    /* Chatbot */
    .chatbot-container {
        margin-bottom: 30px;
    }
    
    .chat-messages {
        height: 400px;
        padding: 15px;
    }
    
    .message-content {
        max-width: 85%;
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    
    .chat-input-container {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .chat-input {
        width: 100%;
        margin: 0;
    }
    
    .send-btn {
        width: 100%;
        margin-left: 0;
        padding: 12px 20px;
    }
    
    /* Email Section */
    .email-section {
        padding: 20px 15px;
    }
    
    .email-section h2 {
        font-size: 1.5rem;
    }
    
    .form-input, .form-textarea {
        padding: 10px;
        font-size: 0.95rem;
    }
    
    .btn-primary {
        width: 100%;
        padding: 12px 20px;
    }
    
    /* Footer */
    .footer {
        padding: 15px;
        font-size: 0.9rem;
        margin-top: 30px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .banner {
        padding: 40px 10px;
        min-height: 200px;
    }
    
    .banner h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .banner p {
        font-size: 0.9rem;
    }
    
    .container {
        padding: 15px 10px;
        margin: 15px 5px;
    }
    
    .welcome-section h2 {
        font-size: 1.5rem;
    }
    
    .content-section h1 {
        font-size: 1.5rem;
    }
    
    .content-section h2 {
        font-size: 1.3rem;
    }
    
    .content-section h3 {
        font-size: 1.1rem;
    }
    
    .card {
        padding: 20px 15px;
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .card h3 {
        font-size: 1.2rem;
    }
    
    .content-image.large-image img {
        max-height: 250px;
    }
    
    .chat-messages {
        height: 350px;
        padding: 12px;
    }
    
    .message-content {
        max-width: 90%;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .color-table, .definition-table {
        font-size: 0.85rem;
        min-width: 500px;
    }
    
    .color-table th, .definition-table th,
    .color-table td, .definition-table td {
        padding: 8px 10px;
    }
    
    .info-box, .tips-box, .summary-box {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}


