/* Biến CSS (Tùy chọn) */
:root {
    --primary-color: #e74c3c; /* Đỏ - Màu áo Bồ Đào Nha/Man Utd/Al Nassr */
    --secondary-color: #3498db; /* Xanh dương - Màu áo Real Madrid */
    --background-color: #f4f7f6; /* Nền sáng */
    --text-color: #333;
    --dark-color: #2c3e50; /* Header, Footer */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset và Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-color);
}

h2, h3, h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header & Navigation */
.header {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo image */
.logo img {
    height: 48px;
    width: auto;
    display: block;
}

/* nếu logo là text fallback (nếu cần) */
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.navbar a {
    color: white;
    margin-left: 1.5rem;
    padding: 0.5rem 0.5rem;
    font-weight: 500;
    transition: color 0.3s, background-color 0.3s, border-radius 0.3s;
    display: inline-flex;
    align-items: center;
}

.navbar a i {
    margin-right: 0.5rem;
}

.navbar a:hover, .navbar a.active {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.menu-toggle {
    display: none; /* Ẩn trên desktop */
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content & Page structure */
.main-content {
    min-height: calc(100vh - 120px); /* Đảm bảo nội dung không quá ngắn */
}

.page {
    padding: 60px 0;
    display: none; /* Mặc định ẩn tất cả các trang */
    animation: fadeIn 0.5s ease-in-out;
}

.page.active {
    display: block; /* Chỉ hiển thị trang đang active */
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

/* Trang chủ (Home) - Hero Section */
#home {
    padding: 0;
    background-color: white;
}

.hero {
    display: flex;
    align-items: center;
    min-height: 80vh;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    padding: 4rem;
}

.hero-content .pre-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero-content h2 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content h2 strong {
    color: var(--primary-color);
}

.hero-image {
    flex: 1;
    background-color: var(--dark-color);
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.hero-image img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    /* Hiệu ứng nổi */
    filter: drop-shadow(5px 5px 15px rgba(0, 0, 0, 0.5));
}

.stats-summary {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px dashed #ccc;
    border-bottom: 1px dashed #ccc;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: #777;
    text-transform: uppercase;
    font-weight: 500;
}

.cta-buttons {
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 1rem;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--dark-color);
    border: 2px solid var(--dark-color);
}

.btn-secondary:hover {
    background-color: var(--dark-color);
    color: white;
    transform: translateY(-2px);
}

/* Trang Tiểu sử (Bio) - Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 30px;
    position: relative;
    width: 50%;
    padding: 10px 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    top: 15px;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -7.5px;
}

.timeline-item:nth-child(even)::after {
    left: -7.5px;
}

.timeline-year {
    display: block;
    font-weight: 700;
    color: var(--secondary-color);
}

.timeline-title {
    margin-top: 5px;
    color: var(--dark-color);
}

/* Trang Thống kê (Stats) - Table */
.table-container {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.stats-table th, .stats-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.stats-table th {
    background-color: var(--dark-color);
    color: white;
    text-transform: uppercase;
    font-weight: 600;
}

.stats-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.stats-table tbody tr:hover {
    background-color: #f1f1f1;
    transition: background-color 0.3s;
}

.total-row {
    font-weight: 700;
    background-color: var(--primary-color) !important;
    color: white;
}

.total-row td {
    border-bottom: none;
}

/* Trang Bộ sưu tập (Gallery) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Modal cho Gallery */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    animation: zoom 0.6s;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover, .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

/* Trang Tin tức (News) */
.news-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.news-item {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: box-shadow 0.3s;
}

.news-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-item img {
    width: 120px;
    height: 90px;
    object-fit: cover;
}

.news-info {
    padding: 10px 15px;
}

.news-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.news-date {
    font-size: 0.8rem;
    color: #999;
}

.news-detail-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-button {
    background: var(--dark-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: #555;
}

.news-article h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.news-article p {
    margin-bottom: 15px;
}

/* Trang Fan Zone */
.fan-form {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-family);
}

.messages-list-container {
    max-width: 600px;
    margin: 0 auto;
}

.messages-list {
    list-style: none;
    padding: 0;
}

.message-item {
    background: #ecf0f1;
    border-left: 5px solid var(--primary-color);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.message-author {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.message-text {
    font-style: italic;
    color: #555;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: #ddd;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

.footer p {
    margin: 0;
}

.note {
    font-size: 0.8rem;
    color: #777;
    margin-top: 1rem;
    font-style: italic;
}

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design (Mobile) */
@media (max-width: 992px) {
    .header .container {
        flex-wrap: wrap;
    }

    .navbar {
        width: 100%;
        display: none; /* Ẩn menu trên mobile */
        flex-direction: column;
        background-color: var(--dark-color);
        padding-bottom: 1rem;
        transition: all 0.3s;
    }

    .navbar.active {
        display: flex; /* Hiện menu khi active */
    }

    .navbar a {
        margin: 0.5rem 0;
        padding: 10px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .menu-toggle {
        display: block; /* Hiện icon menu */
    }

    /* Trang chủ */
    .hero {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }

    .hero-content {
        padding: 2rem 1rem;
        order: 2; /* Đặt nội dung dưới ảnh trên mobile */
    }

    .hero-image {
        order: 1;
        width: 100%;
        height: 50vh;
        align-items: center;
        padding-top: 20px;
    }

    .hero-image img {
        max-height: 90%;
    }

    .stats-summary {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-item {
        width: 100%;
        margin-bottom: 1rem;
    }

    .cta-buttons a {
        display: block;
        margin: 1rem 0;
        text-align: center;
    }

    /* Timeline */
    .timeline::before {
        left: 20px; /* Di chuyển thanh dọc sang trái */
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 60px;
        padding-right: 15px;
        text-align: left !important;
    }

    .timeline-item::after {
        left: 12.5px !important;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
/* ---------- SUPPORT CHAT UI (MODERN STYLE) ---------- */

.support-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 3000;
  font-family: var(--font-family);
}

/* Toggle Button */
.support-toggle {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 999px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}

/* Chat Window */
.support-window {
  width: 340px;
  max-width: calc(100vw - 40px);
  max-height: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.25);
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: fadeInUp 0.25s ease-out;
  border: 1px solid #e1e1e1;
}

/* Header */
.support-header {
  background: var(--dark-color);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 16px;
}

.support-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

/* Message area */
.support-messages {
  list-style: none;
  padding: 16px;
  margin: 0;
  height: 290px;
  overflow-y: auto;
  background: #f7f9fc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-messages .msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
}

/* User bubble */
.support-messages .msg.user {
  align-self: flex-end;
  background: var(--primary-color);
  color: #fff;
  border-bottom-right-radius: 3px;
}

/* Bot bubble */
.support-messages .msg.bot {
  align-self: flex-start;
  background: #e9eef5;
  color: #2c3e50;
  border-bottom-left-radius: 3px;
}

/* Chat form */
.support-form {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-top: 1px solid #ddd;
  gap: 10px;
  background: #fff;
}

.support-form input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-family: var(--font-family);
  background: #fafafa;
}

.support-form button.btn {
  padding: 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

/* Delete History Button */
.support-delete {
  width: 100%;
  background: #d63031;
  color: white;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  border: none;
  margin-top: 4px;
  border-radius: 6px;
}

/* Window Visible */
.support-window.open {
  display: flex;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile UI improvement */
@media (max-width: 480px) {
  .support-window {
    width: 92vw;
    max-height: 70vh;
  }
  .support-messages {
    height: 48vh;
  }
}
