/* --- Global Styles & Variables --- */
:root {
    --font-main: 'Noto Sans', sans-serif;
    --primary-color: #4a90e2; /* Blue */
    --secondary-color: #7f8c8d; /* Gray */
    --success-color: #2ecc71; /* Green */
    --danger-color: #e74c3c; /* Red */
    --warning-color: #f39c12; /* Yellow/Orange */
    --light-bg: #f8f9fa;
    --white-color: #ffffff;
    --text-dark: #34495e;
    --text-light: #5e6d7a;
    --border-color: #e1e8ed;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
    --gradient-bg: linear-gradient(135deg, #f4f7f9 0%, #e6eaee 100%);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--gradient-bg);
    color: var(--text-dark);
    margin: 0;
    padding: 30px 15px; /* Add padding top/bottom */
    line-height: 1.6;
    min-height: 100vh;
}

.main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto; /* Center container */
    background-color: var(--white-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-medium);
    padding: 30px 40px;
}

/* --- Header --- */
.app-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.app-header h1 {
    font-size: 2em;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 5px 0;
}
.app-header h1 i {
    margin-right: 10px;
    color: var(--primary-color);
}
.app-header p {
    color: var(--text-light);
    font-size: 1.05em;
    margin: 0;
}

/* --- Section Structure --- */
.section-card {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
}
.section-header h2 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.instruction {
    color: var(--text-light);
    font-size: 0.95em;
    margin-bottom: 20px;
    background-color: var(--light-bg);
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--primary-color);
}

/* --- Prompt Area & Timer --- */
.prompt-area {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    line-height: 1.8;
    font-size: 1.05em;
}

.word {
    cursor: pointer;
    display: inline-block; /* Allows padding/margin */
    padding: 1px 2px;
    margin: 0 1px;
    border-radius: var(--border-radius-sm);
    transition: background-color 0.2s ease, color 0.2s ease;
}
.word:hover {
    background-color: #d6eaff; /* Light blue hover */
}
.word.underlined {
    background-color: #fff3cd; /* Light yellow background */
    border-bottom: 2px solid var(--warning-color);
    font-weight: 500;
    color: var(--text-dark); /* Ensure text is readable */
    text-decoration: none; /* Override default */
}
.word[draggable="true"] {
    cursor: grab;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.word[draggable="true"]:active {
    cursor: grabbing;
    opacity: 0.8;
}

.timer-display {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--danger-color);
    background-color: var(--light-bg);
    padding: 5px 12px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

/* --- Analysis Section --- */
.analysis-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.phan-tich-box { /* Also serves as base style for genre box */
    border: 1px solid var(--border-color);
    background-color: var(--white-color);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    min-height: 150px; /* Ensure minimum height */
    display: flex;
    flex-direction: column;
}

.phan-tich-box h4 {
    font-size: 1.05em;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.phan-tich-box h4 i {
    margin-right: 8px;
    color: var(--secondary-color);
}

/* Drop Target Specific Styles */
.drop-target {
    border: 2px dashed var(--secondary-color);
    background-color: var(--light-bg);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative; /* For placeholder absolute positioning */
    padding-bottom: 35px; /* Space for placeholder */
}
.drop-target:hover,
.drop-target.drag-over { /* Add drag-over class via JS if needed */
    background-color: #e9f7ff; /* Lighter blue */
    border-color: var(--primary-color);
}

.drop-target .placeholder {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: #aaa;
    font-size: 0.9em;
    font-style: italic;
    pointer-events: none;
    text-align: center;
    width: 90%;
}

/* Style for <p> elements added by JS inside drop-target */
.drop-target p:not(.placeholder) {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 5px 12px;
    border-radius: 15px; /* Pill shape */
    font-size: 0.9em;
    margin: 4px; /* Spacing between items */
    display: inline-block; /* Allow items to flow */
    cursor: pointer; /* Indicate clickable for delete */
    transition: background-color 0.2s ease;
    border: 1px solid rgba(0,0,0,0.1);
}
.drop-target p:not(.placeholder):hover {
    background-color: var(--danger-color);
    text-decoration: line-through; /* Visual cue for deletion */
}

/* Genre Selection Box */
.genre-selection form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.genre-selection label {
    display: flex; /* Align radio and text */
    align-items: center;
    cursor: pointer;
    font-size: 0.95em;
    transition: color 0.2s ease;
}
.genre-selection label:hover {
    color: var(--primary-color);
}
.genre-selection input[type="radio"] {
    margin-right: 8px;
    accent-color: var(--primary-color);
    cursor: pointer;
    transform: scale(1.1);
}

/* --- Outline Section --- */
.section-outline {
    background-color: #fdfae5; /* Light yellow background */
    border-color: #fbdc8e;
    border-left: 4px solid var(--warning-color);
}
.outline-content {
    font-size: 0.95em;
    color: #555;
}
.outline-content ul {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}
.outline-content li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}
.outline-content li::before {
    content: '\f0da'; /* Font Awesome angle-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--warning-color);
}
.outline-content ul ul {
    margin-top: 5px;
    padding-left: 15px;
}
.outline-content ul ul li::before {
    content: '\f111'; /* Font Awesome circle */
    font-size: 0.6em;
    top: 7px;
    color: var(--secondary-color);
}
.outline-content strong {
    font-weight: 500;
    color: var(--text-dark);
}

/* --- Writing Area --- */
.writing-section {
    margin-bottom: 20px;
    /* display: none; Initially hidden, script shows it */
}
.writing-section h3 {
    font-size: 1.15em;
    margin: 0 0 15px 0;
    font-weight: 500;
    color: var(--text-dark);
}
.writing-section textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-main);
    font-size: 1em;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.writing-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}
#than-bai { min-height: 250px; } /* Taller body textarea */

.word-counter {
    display: block;
    text-align: right;
    font-size: 0.85em;
    color: var(--text-light);
    margin-top: 5px;
}
.word-counter.over-limit { /* JS should add this class if needed */
    color: var(--danger-color);
    font-weight: 500;
}

/* Hints */
.hint {
    background-color: #e6f4ff; /* Light blue hint background */
    border: 1px dashed #a6d5ff;
    border-left: 3px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    padding: 15px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #31708f; /* Darker blue text */
    transition: opacity 0.3s ease;
}
.hint.hidden {
    display: none; /* Script toggles this */
    opacity: 0;
}
.hint-content strong { /* Assuming JS puts content inside .hint-content */
    font-weight: 500;
    color: #1a5276;
    display: block;
    margin-bottom: 5px;
}
.hint-content ul {
    padding-left: 20px;
    margin-top: 8px;
    margin-bottom: 5px;
}
.hint-content li {
    margin-bottom: 4px;
}

/* --- Submit Button --- */
.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between icon and text */
    width: 100%;
    max-width: 220px;
    margin: 25px auto 40px auto;
    padding: 12px 20px;
    font-size: 1.05em;
    font-weight: 500;
    color: var(--white-color);
    background-color: var(--success-color);
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 8px rgba(46, 204, 113, 0.3);
}
.submit-button:hover {
    background-color: #27ae60; /* Darker green */
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
    transform: translateY(-1px);
}
.submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(46, 204, 113, 0.3);
}
.submit-button:disabled {
    background-color: var(--secondary-color);
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* --- Stats & History --- */
.stats-history {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* Progress Overview */
.progress-overview {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: var(--border-radius-md);
    margin-bottom: 30px;
    text-align: center;
}
#progress-text {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    font-size: 1em;
    font-weight: 500;
}
.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}
.progress-bar {
    flex-grow: 1;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}
.progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%); /* Blue gradient */
    width: 0%; /* Updated by JS */
    border-radius: 6px;
    transition: width 0.5s ease-out;
}
#progress-percentage {
    font-size: 1em;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 40px;
    text-align: right;
}

/* Chart */
.chart-wrapper {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
}
.chart-wrapper h3 {
    text-align: center;
    font-size: 1.1em;
    margin: 0 0 20px 0;
    font-weight: 500;
    color: var(--text-dark);
}
/* Chart Tooltip (ID provided by chart.js config) */
.chart-tooltip { /* Renamed class from CSS for consistency */
    position: absolute;
    background: rgba(30, 30, 30, 0.85);
    color: #fff;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
    max-width: 280px;
    white-space: normal; /* Allow text wrapping */
}
.chart-tooltip strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

/* History Table */
.history-table-wrapper {
    margin-bottom: 20px;
}
.history-table-wrapper h3 {
    text-align: center;
    font-size: 1.1em;
    margin: 0 0 20px 0;
    font-weight: 500;
    color: var(--text-dark);
}
.table-scroll-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}
#history-table {
    width: 100%;
    border-collapse: collapse;
}
#history-table th, #history-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95em;
}
#history-table thead th {
    background-color: var(--light-bg);
    color: var(--text-dark);
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 1; /* Ensure header stays above content */
}
#history-table tbody tr:nth-child(even) {
    background-color: var(--white-color);
}
#history-table tbody tr:nth-child(odd) {
    background-color: #fbfcfd; /* Very slight off-white */
}
#history-table tbody tr:hover {
    background-color: #eff5ff; /* Light blue row hover */
}

/* Specific Column Widths/Alignment */
#history-table th:nth-child(1), #history-table td:nth-child(1) { width: 5%; text-align: center; } /* # */
#history-table th:nth-child(2), #history-table td:nth-child(2) { width: 18%; } /* Date */
#history-table th:nth-child(3), #history-table td:nth-child(3) { width: 47%; } /* Topic */
#history-table th:nth-child(4), #history-table td:nth-child(4) { width: 15%; text-align: center; } /* Time */
#history-table th:nth-child(5), #history-table td:nth-child(5) { width: 15%; text-align: center; } /* Score */

#history-table select {
    width: 85px;
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--white-color);
    transition: border-color 0.2s ease;
    cursor: pointer;
}
#history-table select:hover {
    border-color: var(--primary-color);
}
#history-table select:disabled {
    background-color: #f1f1f1;
    color: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.7;
}
#history-table select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.15);
}

/* --- Footer --- */
.app-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
    color: var(--text-light);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .main-container {
        padding: 20px 25px;
    }
    .analysis-layout {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 15px 20px;
    }
    .app-header h1 { font-size: 1.7em; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .timer-display { align-self: flex-start; margin-top: 10px; }
    .analysis-layout { grid-template-columns: 1fr; } /* Stack on mobile */
    #history-table th, #history-table td { font-size: 0.9em; padding: 8px; }
    .table-scroll-container { max-height: 400px; }
}

@media (max-width: 480px) {
    body { padding: 15px 5px; }
    .main-container { padding: 10px 15px; }
    .app-header h1 { font-size: 1.5em; }
    .app-header p { font-size: 0.95em; }
    .section-header h2 { font-size: 1.2em; }
    .prompt-area { font-size: 1em; }
    #history-table th, #history-table td { font-size: 0.85em; padding: 6px; }
    #history-table select { width: 70px; padding: 4px 6px; }
}

/* Ensure writing sections are hidden initially if script handles showing them */
.phan-bai {
     display: none; /* Start hidden - JS function onTheLoaiChange should show them */
}
/* Style for when JS makes them visible */
.phan-bai.visible { /* Assuming JS might add a 'visible' class, or just sets display: block */
    display: block;
}
/* Container chính của hộp chat */
.support-box {
  /* Giữ các thuộc tính vị trí, kích thước, nền, bóng đổ cũ */
  position: fixed;
  /* bottom: 80px; /* Có thể cần điều chỉnh vị trí Y */
  /* right: 20px; */
  bottom: 20px; /* Đặt lại vị trí gần nút gốc hơn nếu muốn */
  right: 20px;
  width: 500px; /* Chiều rộng tổng thể */
  height: 60vh; /* Chiều cao tổng thể */
  background: white;
  border-radius: 16px; /* Bo góc */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden; /* Quan trọng */
  z-index: 1000;

  /* --- THAY ĐỔI QUAN TRỌNG --- */
  display: none; /* Mặc định ẩn */
  flex-direction: row; /* Sắp xếp con theo hàng ngang (header trái, iframe phải) */
}

/* Khi hộp chat được mở (có class visible) */
.support-box.visible {
  display: flex; /* Hiện và áp dụng flexbox */
}

/* Thanh header dọc bên trái */
.support-header-bar {
  background: #007bff; /* Màu nền xanh */
  color: white;
  width: 55px; /* Chiều rộng cố định cho thanh dọc */
  height: 100%; /* Chiều cao 100% của container */
  padding: 10px 0; /* Padding trên dưới */
  display: flex;
  flex-direction: column; /* Sắp xếp logo và nút đóng theo chiều dọc */
  justify-content: space-between; /* Đẩy logo lên trên, nút đóng xuống dưới */
  align-items: center; /* Căn giữa theo chiều ngang */
  flex-shrink: 0; /* Không cho phép thanh này co lại */
  box-sizing: border-box; /* Tính cả padding vào width */
}

/* Logo/Title trong header */
.support-header-bar .header-logo {
  font-size: 14px;
  font-weight: bold;
  margin-top: 10px; /* Khoảng cách trên */
  /* Có thể xoay chữ nếu muốn */
  /* writing-mode: vertical-rl; */
  /* transform: rotate(180deg); */
}

/* Phần chứa nút đóng */
.support-header-bar .header-controls {
   margin-bottom: 5px; /* Khoảng cách dưới */
}

/* Nút đóng (X) */
.support-header-bar .close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px; /* Kích thước nút X */
  cursor: pointer;
  padding: 0; /* Bỏ padding mặc định */
  line-height: 1; /* Căn chỉnh chiều cao */
}
 .support-header-bar .close-btn:hover {
   opacity: 0.8; /* Hiệu ứng hover đơn giản */
}


/* Iframe chứa nội dung chat */
.support-box iframe {
  flex-grow: 1; /* Chiếm hết không gian ngang còn lại */
  height: 100%; /* Chiếm hết chiều cao */
  border: none; /* Bỏ viền */
  width: auto; /* Để flex-grow kiểm soát chiều rộng */
}

/* --- CSS cho nút bật/tắt gốc --- */
.support-toggle-btn {
  /* Giữ nguyên CSS cũ cho nút này */
  position: fixed;
  bottom: 20px;
  right: 20px;
  /* ... các thuộc tính khác ... */
  z-index: 999; /* Nằm dưới hộp chat khi mở */
}

 /* --- Responsive cho màn hình nhỏ --- */
 @media (max-width: 768px) {
   .support-box {
     width: 95%;
     height: 80vh;
     bottom: 10px; /* Điều chỉnh vị trí */
     right: 2.5%;
   }
   .support-header-bar {
      width: 45px; /* Thu nhỏ thanh header */
   }
    .support-header-bar .header-logo {
       font-size: 12px;
    }
    .support-header-bar .close-btn {
       font-size: 20px;
    }
 }
/* --- CSS Nâng Cấp cho Nút Trợ Lý AI --- */
.support-toggle-btn {
  position: fixed;
  bottom: 25px; /* Hơi nâng lên một chút */
  right: 25px;  /* Hơi cách lề một chút */
  background: linear-gradient(145deg, #0088ff, #0061c5); /* Gradient xanh dương hiện đại */
  color: #fff;
  border: none;
  padding: 10px 20px; /* Điều chỉnh padding */
  border-radius: 12px; /* Bo góc vuông vắn hơn, hiện đại hơn */
  cursor: pointer;
  font-size: 16px;
  font-weight: 600; /* Giữ nguyên hoặc 500 */
  font-family: 'Roboto', sans-serif; /* Đảm bảo font được áp dụng */
  letter-spacing: 0.5px; /* Tăng khoảng cách chữ một chút */
  box-shadow: 0 4px 10px rgba(0, 97, 197, 0.2), /* Bóng mờ chính */
              0 1px 3px rgba(0, 0, 0, 0.1);       /* Bóng nhẹ gần hơn */
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1); /* Transition mượt mà hơn */
  z-index: 999;
  display: inline-flex; /* Sử dụng flex để căn chỉnh icon và text */
  align-items: center;
  gap: 8px; /* Khoảng cách giữa icon và text */
  white-space: nowrap; /* Không xuống dòng */
}

.support-toggle-btn:hover {
  background: linear-gradient(145deg, #007ae0, #0055b0); /* Gradient đậm hơn khi hover */
  transform: translateY(-3px); /* Hiệu ứng nhấc lên nhẹ */
  box-shadow: 0 7px 18px rgba(0, 97, 197, 0.3), /* Bóng đổ rõ hơn khi hover */
              0 3px 6px rgba(0, 0, 0, 0.15);
}

.support-toggle-btn:active {
  transform: translateY(0px); /* Hiệu ứng nhấn xuống */
  background: #0056b3; /* Màu nền đậm khi nhấn */
  box-shadow: 0 2px 5px rgba(0, 97, 197, 0.2); /* Bóng đổ nhỏ hơn khi nhấn */
}
/* === THÊM CSS CHO NÚT TOÀN MÀN HÌNH === */

/* Style chung cho các nút điều khiển trong header AI */
.support-header-bar .control-btn,
.support-header-bar .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 22px; /* Đồng nhất kích thước với nút close */
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: opacity 0.2s ease;
    width: 30px; /* Đảm bảo nút có chiều rộng để click */
    height: 30px; /* Đảm bảo nút có chiều cao để click */
    display: flex; /* Căn giữa icon */
    align-items: center;
    justify-content: center;
}

.support-header-bar .control-btn:hover,
.support-header-bar .close-btn:hover {
    opacity: 0.8;
}

/* Sắp xếp các nút điều khiển trong header */
.support-header-bar .header-controls {
   display: flex;
   flex-direction: column; /* Xếp chồng dọc */
   align-items: center;
   gap: 8px; /* Khoảng cách giữa nút toàn màn hình và nút đóng */
   margin-bottom: 10px; /* Khoảng cách với đáy */
}


/* CSS cho container khi ở chế độ toàn màn hình */
#supportContainer:fullscreen {
    /* Có thể thêm style khác nếu muốn, ví dụ nền khác */
    background-color: #ffffff;
    padding: 0; /* Bỏ padding khi fullscreen */
    border-radius: 0; /* Bỏ bo góc khi fullscreen */
}

/* Căn chỉnh lại header và iframe khi fullscreen */
#supportContainer:fullscreen .support-header-bar {
   border-radius: 0;
}

#supportContainer:fullscreen iframe {
   border-radius: 0;
}

/* Ẩn nút bật/tắt gốc khi AI đang ở chế độ toàn màn hình */
/* Lưu ý: Selector này có thể không hoạt động 100% trên mọi trình duyệt */
#supportContainer:fullscreen ~ .support-toggle-btn {
    display: none !important; /* Ưu tiên ẩn nút gốc */
}

/* === KẾT THÚC CSS THÊM === */

/* Add this to your style.css file */

.charts-container {
    display: flex;
    flex-wrap: wrap; /* Allows charts to stack on small screens */
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.charts-container .chart-wrapper {
    flex: 1 1 400px; /* Allows charts to grow and shrink */
    min-width: 350px;
    max-width: 600px; /* Prevents charts from becoming too wide */
    margin-bottom: 0; /* Remove bottom margin since the container has it */
}

.chart-wrapper canvas {
    max-width: 100%;
    height: auto;
}