/* ========== 1. Reset cơ bản ========== */
* {
    margin: 0;
    padding: 0;
    /*box-sizing: border-box;*/
    font-family: Arial, sans-serif;
}

/* ========== 2. Body ========== */
body {
    background-color: #e8f5e9;
}

/* ========== 3. Header ========== */
header {
    background-color: #5abe37;
    color: white;
    width: 100%;
    top: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-align: center;
}
.header-wrapper {
    max-width: 950px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ========== 4. Auth Buttons & Menu Toggle ========== */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}
.auth-buttons a {
    padding: 5px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}
.register-btn {
    background: #4CAF50;
    color: white;
    border: 2px solid #4CAF50;
}
.login-btn {
    background: #2196F3;
    color: white;
    border: 2px solid #2196F3;
}
.register-btn:hover {
    background: #45a049;
    border-color: #45a049;
}
.login-btn:hover {
    background: #1976D2;
    border-color: #1976D2;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

/* ========== 5. Container0 (Tabs) ========== */
.container0 {
    display: flex;
    gap: 10px;
    max-width: 950px;
    margin: 15px auto 0;
    justify-content: flex-start;
    padding-left: 20px;
    flex-wrap: wrap; /* allow wrap on small */
}
.container0 button {
    background-color: limegreen;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.container0 button:hover {
    background-color: limegreen;
}
.container0 button.active {
    background-color: orange;
    color: white;
}

/* ========== 6. Semester Tag ========== */
.semester-tag {
    margin: 20px 0;
}

/* ========== 7. Grid Containers ========== */
.container {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    max-width: 950px;
    margin: 0 auto;
}
.twocolum {
    display: block;
    grid-template-columns: repeat(2, 1fr);
    max-width: 950px;
}
.container.active {
    display: grid;
}
.subject-column {
    padding: 20px;
    border-radius: 10px;
}
.subject-column h2 {
    color: #2e7d32;
    margin-bottom: 15px;
    padding-bottom: 10px;
}
.exam-list li {
    margin-bottom: 10px;
}

/* ========== 8. Links & Tags ========== */
a {
    text-decoration: underline;
    color: black;
    cursor: pointer;
}
a:hover {
    color: #1b5e20;
    text-decoration: none;
    font-weight: bold;
}
.new-tag {
    color: #e53935;
    font-weight: bold;
    font-size: 0.9em;
    margin-left: 8px;
    background-color: #fff9e6;
    padding: 2px 8px;
    border-radius: 4px;
    animation: blink 1s infinite ease-in-out;
    border: 1px solid #ffd700;
}
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ========== 9. Loading & Error ========== */
.loading, .error {
    padding: 2rem;
    text-align: center;
    font-size: 1.2rem;
    color: #666;
}
.error {
    color: #d32f2f;
}

/* ========== 10. Auth Form Container ========== */
.auth-form-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}
.auth-form label {
    display: block;
    margin: 10px 0 5px;
}
.auth-form input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    margin-bottom: 15px;
}
.auth-form .btn {
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    border: none;
    border-radius: 4px;
    background: #4CAF50;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}
.auth-form .btn:hover {
    background: #45a049;
}



.mini-frame {
    border-radius: 3px;
    /* width: 200px; */
    height: 50px;
    background: linear-gradient(to bottom, #87CEEB, #E0F7FA);
    /* border-radius: 8px; */
    position: relative;
    /* overflow: hidden; */
    /* border: 4px solid #FFA500; */
    /* box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); */
    display: flex;
    justify-content: center;
    align-items: center;
}
        
    .mini-title {
        font-family: sans-serif;
        font-size: 25px;
        font-weight: bold;
        color: #FF5722;
        text-align: center;
        z-index: 2;
        text-shadow: 1px 1px 0 #FFEB3B;
        position: relative;
    }
    
    .mini-sun {
        position: absolute;
        top: 5px;
        left: 10px;
        width: 20px;
        height: 20px;
        background: #FFEB3B;
        border-radius: 50%;
        box-shadow: 0 0 5px #FFEB3B;
        z-index: 1;
    }
    
    .mini-cloud-right {
        position: absolute;
        width: 40px;
        height: 15px;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 15px;
        top: 15px;
        right: 10px;
        z-index: 1;
    }
    
    .mini-cloud-right:before {
        content: '';
        position: absolute;
        width: 12px;
        height: 12px;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 50%;
        top: -6px;
        left: 8px;
    }
    
    .mini-cloud-center {
        position: absolute;
        width: 50px;
        height: 18px;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 15px;
        top: 30px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
    }
    
    .mini-cloud-center:before {
        content: '';
        position: absolute;
        width: 15px;
        height: 15px;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 50%;
        top: -7px;
        left: 10px;
    }
    
    .mini-sea {
        position: absolute;
        bottom: 0;
        width: 100%;
        height: 20px;
        background: #1E88E5;
        z-index: 0;
    }
    
    .mini-wave {
        position: absolute;
        top: -3px;
        width: 100%;
        height: 5px;
background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 10" xmlns="http://www.w3.org/2000/svg"><path d="M0,5 C30,-5 70,15 100,5 C130,-5 170,15 200,5 L200,10 L0,10 Z" fill="%231E88E5" opacity="0.6"/></svg>');
        background-size: 200px 10px;
    }

/* ========== 11. Footer ========== */
footer {
    background-color: #e1e1e1;
    color: #444;
    text-align: center;
    padding: 15px;
    /*width: 100%;*/
}


   .exam-list a::before {
    content: "📝";
    font-size: 1.2em;
}
a {
    text-decoration: none;
}
.exam-list li {
    height: 50px;
    border: 2px solid #e0e0e0;
    margin-bottom: 8px;
    background: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Đẩy text và badge ra 2 bên */
    padding: 0 20px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.exam-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    flex-grow: 1;
}

.exam-list li:hover {
    border-color: #3498db; /* Đổi màu viền khi hover */
    transform: translateX(5px); /* Hiệu ứng di chuyển nhẹ */
}


/* HIỆU ỨNG ĐẶC BIỆT */
.exam-list li::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.exam-list li:hover::after {
    border-color: rgba(52, 152, 219, 0.2); /* Hiệu ứng ánh sáng xung quanh */
}
.count-badge {
    display: inline-flex;
    align-items: center;
    height: 30px; /* Chiều cao phù hợp với container */
    padding: 0 12px;
    border-radius: 15px;
    background: #f0f3f5;
    border: 1px solid #dde1e5;
    font-size: 0.9em;
    gap: 6px;
}

.count-badge i {
    font-size: 0.9em;
    color: #6c757d;
}
/* Thêm style cho đề bị khóa */
.locked {
    opacity: 0.6;
    background-color: #f9f9f9;
}
.locked a {
    color: #777;
    cursor: not-allowed;
}
/* Style cho admin controls */
.admin-controls-container {
  display: flex;  
  align-items: center; /* Căn giữa theo chiều dọc */
  gap: 16px;
  margin-bottom: 15px;
}


    @keyframes blink1 {
        0% { box-shadow: 0 0 5px #4CAF50; }
        50% { box-shadow: 0 0 20px #4CAF50; }
        100% { box-shadow: 0 0 5px #4CAF50; }
    }

    .zalo-button {
        display: inline-flex;
        align-items: center;
        padding: 12px 25px;
        background-color: white;
        color: red;
        text-decoration: none;
        border-radius: 30px;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s;
        animation: blink1 1.5s infinite;
        position: relative;
        border: 2px solid #fff;
    }

    .zalo-button:hover {
        /*background-color: #45a049;*/
        transform: scale(1.05);
        animation-play-state: paused;
    }

.new-tag2 {
    color: #2e7d32; /* Xanh lá đậm cho chữ */
    font-weight: bold;
    font-size: 0.9em;
    margin-left: 8px;
    background-color: white; /* Nền xanh lá nhạt */
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #81c784; /* Viền xanh lá mềm mại */
    /* animation: blink 1s infinite ease-in-out; */
}

.new-tag1 {
    color: #e53935;
    font-weight: bold;
    font-size: 0.9em;
    margin-left: 8px;
    background-color: #fff9e6;
    padding: 2px 8px;
    border-radius: 4px;
    /* animation: blink 1s infinite ease-in-out; */
    border: 1px solid #ffd700;
}
  /* Wrapper for responsive scroll on mobile */
  .table-wrapper {
    width: 100%;
    scrollbar-width: none;
    /*overflow-x: auto;*/
  }
  .table-wrapper table {
    min-width: 700px; /* ensures columns maintain layout but scrolls on small screens */
    width: 100%;
  }
 .exam-table .btn {
    padding: 6px 12px !important;
  }

  .exam-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    background: #fff;                          /* white background */
    border: 1px solid #000;                   /* black border around table */
  }
  .exam-table th,
  .exam-table td {
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    text-align: center; /* center all by default */
  }
  /* Left-align the "Đề" column */
  .exam-table th.col-de,
  .exam-table td.col-de {
    text-align: left !important;
  }
  .exam-table th {
    background: #f7f7f7;
    font-weight: 600;
  }
  .exam-table tbody tr:hover {
    background: #f7faff;
  }
  .exam-table tbody tr.locked {
    background: #f9f9f9;
  }
  .exam-table tbody tr.locked td a,
  .exam-table tbody tr.locked td button {
    color: #777;
    cursor: not-allowed;
    text-decoration: none;
  }
  .count-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    background: #eef6ff;
    font-size: 0.85em;
    color: #2563eb;
    gap: 4px;
  }
  .count-badge i {
    font-size: 0.85em;
  }
  .btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: none;
    display: inline-block;
  }
  .btn-primary {
    background: #2563eb;
    color: #fff;
  }
  .exam-table a:hover {
      color: unset;
      font-weight: unset;
  }
  /* Disabled button style: maintain overridden padding */
  .exam-table .btn-primary:disabled {
    background-color: #2563eb;
    color: black;
    opacity: 0.5;
    pointer-events: none;
  }
  .highlight-score {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    background: #fff7ed;
    border: 1px solid #fcd34d;
    font-weight: 600;
    font-size: 1.0em;
    color: red;
  }
  /* Style cho link Bảng xếp hạng */
    .ranking-link {
      margin-top: 4px;
      text-align: center;
    }
    .ranking-link a {
      font-size: 0.8em;
      color: #3498db;
      text-decoration: none;
    }
    .ranking-link a:hover {
      text-decoration: underline;
    }
    /* Modal nền mờ */
/* Modal Overlay */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  animation: fadeInBackdrop 0.3s ease;
}

/* Modal Content */
.modal-content {
  background: #ffffff;
  padding: 15px;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-30px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#rankingModal .modal-content th {
  text-align: center;
}

/* Khi modal hiển thị */
.modal.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

/* Đóng nút */
.close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  font-size: 1.4em;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  color: #fff;
  background: orange;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 1001; /* nổi lên trên modal */
}
.close-modal:hover {
  background: #e74c3c;
  transform: scale(1.1);
}
.close-modal:active {
  transform: scale(0.95);
}


/* Tiêu đề */
.modal-content h3 {
  margin-top: 0;
  font-size: 1.6em;
  color: #333;
  text-align: center;
}

/* Bọc bảng để scroll ngang trên mobile */
.table-wrapper {
  overflow-x: auto;
  margin-top: 16px;
}

/* Bảng chính */
.exam-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  font-family: sans-serif;
}

/* Tiêu đề cột */
.exam-table thead th {
  position: sticky;
  top: 0;
  background: #f7f9fc;
  color: #333;
  font-weight: 600;
  text-align: center;
  padding: 12px 16px;
  border-bottom: 2px solid #e0e4e8;
}

/* Ô dữ liệu */
.exam-table td {
  /*padding: 12px 16px;*/
  border-bottom: 1px solid #e0e4e8;
  color: #555;
}

/* Xen kẽ màu nền */
.exam-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

/* Hover hàng */
.exam-table tbody tr:hover {
  background: #f0f4f8;
}

/* Keyframes cho backdrop */
@keyframes fadeInBackdrop {
  from { background: rgba(0,0,0,0); }
  to   { background: rgba(0,0,0,0.6); }
}


.trophy-stack {
  position: relative;
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  line-height: 1.2em;
}
/* Cúp to hơn một chút */
.trophy-stack .fa-trophy {
  font-size: 1.2em;
}
/* Số nằm chính giữa cúp */
.trophy-number {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;           /* Màu chữ */
  text-shadow: 0 0 2px #000;
}
    /* Mobile details inside Đề column */
  .exam-table .mobile-info {
    display: none;
  }
  /* Mobile tweaks */
  @media (max-width: 600px) {
    .exam-table th,
    .exam-table td {
      padding: 6px 8px;
      font-size: 15px;
    }
    .exam-table th:nth-child(3),
    .exam-table td:nth-child(3),
    .exam-table th:nth-child(4),
    .exam-table td:nth-child(4),
    .exam-table th:nth-child(5),
    .exam-table td:nth-child(5) {
      display: none; /* hide less critical columns to reduce width */
    }
        /* show mobile info under Đề */
    .exam-table .mobile-info {
      display: block;
      font-size: 1em;
      color: #333;
      margin-top: 4px;
      line-height: 1.4;
    }
    /* Wrap Đề column text */
    .exam-table th.col-de,
    .exam-table td.col-de {
      white-space: normal;
      max-width: 150px;
      word-break: break-word;
    }
    .table-wrapper table {
      min-width: auto;  /* allow table to shrink on mobile */
    }
    
/* 1. Reset wrapper để không có scrollbar ngang */
  #rankingModal .table-wrapper {
    overflow-x: hidden;
  }

  /* 2. Table co lại vừa container, dùng layout fixed để width columns được tôn trọng */
  #rankingModal #rankingTable {
    width: 100% !important;
    min-width: auto !important;
    table-layout: fixed;
  }
  #delete-selected-btn, #delete-all-btn {
      display: none !important;
  }

#rankingModal #rankingTable th,
#rankingModal #rankingTable td {
  display: none !important;
}

/* -------------------------------------------------- */
/* 2. STUDENT VIEW: show các cột #, Họ & Tên, Điểm, Thời Gian */
/* -------------------------------------------------- */
#rankingModal:not(.admin-mode) #rankingTable th:nth-child(1),
#rankingModal:not(.admin-mode) #rankingTable td:nth-child(1), /* # */
#rankingModal:not(.admin-mode) #rankingTable th:nth-child(2),
#rankingModal:not(.admin-mode) #rankingTable td:nth-child(2), /* Họ & Tên */
#rankingModal:not(.admin-mode) #rankingTable th:nth-child(5),
#rankingModal:not(.admin-mode) #rankingTable td:nth-child(5), /* Điểm */
#rankingModal:not(.admin-mode) #rankingTable th:nth-child(6),
#rankingModal:not(.admin-mode) #rankingTable td:nth-child(6)  /* Thời Gian */ {
  display: table-cell !important;
}

/* -------------------------------------------------- */
/* 3. ADMIN/TEACHER VIEW: show các cột Rank(#), Họ & Tên, Điểm, Thời Gian */
/*    (vì admin-mode có thêm cột checkbox ở vị trí 1)      */
/* -------------------------------------------------- */
#rankingModal.admin-mode #rankingTable th:nth-child(2),
#rankingModal.admin-mode #rankingTable td:nth-child(2), /* # */
#rankingModal.admin-mode #rankingTable th:nth-child(3),
#rankingModal.admin-mode #rankingTable td:nth-child(3), /* Họ & Tên */
#rankingModal.admin-mode #rankingTable th:nth-child(6),
#rankingModal.admin-mode #rankingTable td:nth-child(6), /* Điểm */
#rankingModal.admin-mode #rankingTable th:nth-child(7),
#rankingModal.admin-mode #rankingTable td:nth-child(7)  /* Thời Gian */ {
  display: table-cell !important;
}

/* -------------------------------------------------- */
/* 4. width cho các cột luôn hiển thị */
/* -------------------------------------------------- */
#rankingModal:not(.admin-mode) #rankingTable th:nth-child(1),
#rankingModal:not(.admin-mode) #rankingTable td:nth-child(1) {
  width: 40px;   /* số thứ tự */
}
#rankingModal:not(.admin-mode) #rankingTable th:nth-child(2),
#rankingModal:not(.admin-mode) #rankingTable td:nth-child(2) {
  width: auto;   /* họ và tên */
}
#rankingModal:not(.admin-mode) #rankingTable th:nth-child(5),
#rankingModal:not(.admin-mode) #rankingTable td:nth-child(5),
#rankingModal:not(.admin-mode) #rankingTable th:nth-child(6),
#rankingModal:not(.admin-mode) #rankingTable td:nth-child(6) {
  width: 80px;   /* điểm & thời gian */
}

/* admin-mode widths */
#rankingModal.admin-mode #rankingTable th:nth-child(2),
#rankingModal.admin-mode #rankingTable td:nth-child(2) {
  width: 40px;   /* số thứ tự */
}
#rankingModal.admin-mode #rankingTable th:nth-child(3),
#rankingModal.admin-mode #rankingTable td:nth-child(3) {
  width: auto;   /* họ và tên */
}
#rankingModal.admin-mode #rankingTable th:nth-child(6),
#rankingModal.admin-mode #rankingTable td:nth-child(6),
#rankingModal.admin-mode #rankingTable th:nth-child(7),
#rankingModal.admin-mode #rankingTable td:nth-child(7) {
  width: 80px;   /* điểm & thời gian */
}


  /* 6. Canh text cho dễ đọc */
  #rankingModal #rankingTable th,
  #rankingModal #rankingTable td {
    text-align: center;
    overflow-wrap: break-word;
  }
  /* Nhưng Họ và Tên (cột 2) vẫn left */
  #rankingModal #rankingTable th:nth-child(2),
  #rankingModal #rankingTable td:nth-child(2) {
    text-align: left;
  }
    
  }


@media (min-device-width: 768px) {

 .nolog {
     display: none;
 }    
    
}
/* ========== 12. Media Queries (Mobile) ========== */
@media (max-device-width: 768px) {
    .header-wrapper {
    max-width: unset;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
    /* Header menu */
    .auth-buttons a { display: none; }
    .menu-toggle { display: block; }
    .auth-buttons.open a {
        display: block;
        margin: 10px 0;
    }
    .auth-form-container {
        margin: 30px 20px;
        padding: 20px;
    }

    /* Container0 wrap */
    .container0 {
        justify-content: flex-start;
        padding-left: 0;
        margin: 15px 20px 0;
    }

    /* Grid → list */
    .container {
        display: none; /* vẫn ẩn nếu chưa active */
        grid-template-columns: 1fr;
        margin: 0 20px;
    }
    
    .container.active {
        display: grid;
    }
    .subject-column {
        padding: 15px;
    }
    .exam-list {
        padding-left: 20px;
    }
}
        /* Hiệu ứng loading */
        .skeleton-loader {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            border-radius: 8px;
            height: 80px;
            margin: 10px 0;
            animation: shimmer 1.5s infinite;
        }

        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }
    
    .auth-buttons {
        display: flex;
        gap: 15px;
        margin-left: auto;
    }

    .register-btn, .login-btn {
        padding: 5px 15px;
        border-radius: 25px;
        text-decoration: none;
        font-weight: bold;
        transition: all 0.3s ease;
    }

    .register-btn {
        background: #4CAF50;
        color: white;
        border: 2px solid #4CAF50;
    }

    .login-btn {
        background: #2196F3;
        color: white;
        border: 2px solid #2196F3;
    }

    .register-btn:hover {
        background: #45a049;
        border-color: #45a049;
    }

    .login-btn:hover {
        background: #1976D2;
        border-color: #1976D2;
    }
    .menu-toggle {
        color: white;
    }
    
    

/* Dropdown styles */
.auth-buttons .dropdown {
    position: relative;
}

.auth-buttons .user-menu {
    background: white;
    color: black;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 2px solid #4CAF50;
    position: relative;
}

.auth-buttons .dropdown::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}
/*.auth-buttons .user-menu:hover {*/
/*    background: #45a049;*/
/*    border-color: #45a049;*/
/*}*/

.auth-buttons .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;
    margin-top: 8px;
    text-align: left;
}

.auth-buttons .dropdown:hover .dropdown-content {
    display: block;
}

.auth-buttons .dropdown-item {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
}

.auth-buttons .dropdown-item:hover {
    background: #f5f5f5;
    color: #000;
}

.auth-buttons .dropdown-item.logout {
    color: #e74c3c;
}

.auth-buttons .dropdown-item.logout:hover {
    background: #fdecea;
}
/*--------------------------------------*/
/* CSS cho slideshow */
.slideshow-container {
    max-width: 910px;
    position: relative;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 12px;
}

.slides-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out; /* Hiệu ứng trượt */
}

.mySlides {
    flex: 0 0 100%;
    width: 100%;
    min-height: 100%; /* Đảm bảo chiều cao đầy đủ */
}

.mySlides img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

/* Nút điều khiển */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    user-select: none;
    /*background: rgba(0,0,0,0.3);*/
    border-radius: 0 5px 5px 0;
    text-decoration: none;
}

.next {
    right: 0;
    border-radius: 5px 0 0 5px;
}

.prev:hover, .next:hover {
    /*background: rgba(0,0,0,0.8);*/
}
/* Khung bao ngoài của từng mục */

/* Danh sách từng item */
.grade-list-item {
  list-style: none;
  font-family: Arial, sans-serif;
  flex: 1 1 calc(33.333% - 20px); /* 3 items/row on desktop */
  min-width: 280px;
  max-width: 100%;
  height: 200px;
  box-sizing: border-box;
}

/* Module chứa nội dung và viền */
.grade-module {
  border: 2px solid #2978b5;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Link toàn bộ vùng */
.grade-box-link1 {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 10px 15px;
}
.grade-box-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 10px 15px;
}
.grade-onhe-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 10px 15px;
}
.grade-onthitiengviet-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 10px 15px;
}
.grade-bttuantiengviet-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 10px 15px;
}
.grade-bttuantoan-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 10px 15px;
}
/* Tiêu đề bên cạnh chữ cái */
.grade-box-hdr {
  flex: 1;
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  color: #2978b5;
  gap: 6px;
}

/* Tên rút gọn */
.grade-box-name {
  display: block;
}

/* Mũi tên SVG */
.grades-list-arrow {
  width: 16px;
  height: 28px;
  fill: none;
  margin-left: auto;
  flex-shrink: 0;
  cursor: pointer;
}

/* Màu điền của polygon */
.blue1-fill-svg {
  fill: #2978b5;
}

/* Phần mô tả bên dưới */
.grade-body {
  padding: 10px 15px 15px;
  /*font-size: 14px;*/
  color: #333;
  background-color: #f9f9f9;
  border-top: 1px solid #ddd;
  border-radius: 0 0 8px 8px;
  flex-grow: 1;
}

.grade-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  gap: 10px;
}

.grade-description {
  font-size: 16px;
  color: #333;
}

.subject {
  text-align: left;
  flex: 1;
}

.count {
  text-align: right;
  flex-shrink: 0;
}
    .checkbox-icon {
      width: 20px;
      height: 20px;
      border: 2px solid #4CAF50; /* Màu xanh lá */
      border-radius: 6px;
      position: relative;
      display: inline-block;
    }

    .checkbox-icon::after {
      content: '';
        position: absolute;
        left: 7px;
        top: -5px;
        width: 5px;
        height: 15px;
        border: solid #4CAF50;
        border-width: 0 4px 4px 0;
        transform: rotate(45deg);
    }
    
    .fancy-button {
      padding: 12px 30px;
      font-size: 18px;
      font-weight: bold;
      color: white;
      background: linear-gradient(135deg, #4CAF50, #2E7D32);
      border: none;
      border-radius: 12px;
      cursor: pointer;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .fancy-button::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 0.3);
      transform: skewX(-30deg);
      transition: 0.5s;
    }

    .fancy-button:hover {
      transform: scale(1.05);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    .fancy-button:hover::before {
      left: 100%;
    }
    
    
    
    
/* Responsive chỉnh sửa cho màn hình nhỏ */
@media (max-width: 768px) {
  .grade-list-item {
    flex: 1 1 calc(50% - 20px); /* 2 items/row on tablet */
  }
}

@media (max-width: 480px) {
  .grade-list-item {
    flex: 1 1 100%; /* 1 item/row on mobile */
  }

  .grade-box-hdr {
    font-size: 18px;
  }

  .grade-description {
    font-size: 14px;
  }
}


/* Animation */
@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

/* Responsive */
@media screen and (max-width: 768px) {

    .prev, .next {
        padding: 12px;
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {

    .slideshow-container {
        margin: 10px auto;
        border-radius: 8px;
    }
