@import url('https://fonts.googleapis.com/css2?family=Russo+One&display=swap');

h2#pageTitle {
  font-family: 'Russo One', sans-serif;
}
/* === Bổ sung layout riêng cho trang chọn đề === */
.lang-select{
  position: absolute;
  top: 90px;               /* nằm dưới header */
  right: 30px;
  z-index: 50;
}
.lang-select select{
  padding: .4rem .6rem;
  border-radius: 6px;
  font-weight: 600;
}
#hintActivator {
  position: fixed;
  bottom: 380px;
  right: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 20px;
  background: #facc15;
  border: none;
  cursor: pointer;
  z-index: 9990!important;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}
/* Khung chứa nội dung */
.container{
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1rem;
  border-radius: 12px;
  backdrop-filter: blur(6px);
}
html[data-theme="light"] .container{
  background: rgba(255,255,255,.8);
}

/* Nút chung */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(to right, #007BFF, #0099FF);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  margin: 20px;
}

.btn:hover {
  background: linear-gradient(to right, #0056b3, #007BFF); /* đậm hơn khi hover */
  box-shadow: 0 6px 14px rgba(0, 123, 255, 0.35);
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
}
.small-btn{padding:.4rem .8rem;font-size:.9rem}
.new-label{
  background:var(--accent-orange);
  color:#fff;
  border-radius:4px;
  font-size:.75rem;
  padding:0 .35rem;
  margin-left:.5rem;
}

/* Cấu trúc phần / kỹ năng */
.section-card{
  margin:.75rem 0;
  padding:1rem;
  border-left:4px solid var(--accent-blue);
  background:rgba(0,0,0,.1);
  border-radius:8px;
}
html[data-theme="light"] .section-card{
  background:rgba(240,244,248,.8);
}
.part-row{
  margin-left:1rem;
  padding:.25rem 0;
}

/* Ẩn / hiện */
.hidden{display:none!important}

/* Responsive */
@media(max-width:600px){
  .container{padding:1rem}
  .lang-select{top:76px;right:10px}
}



/* khoá & nhãn new */
.lock{margin-left:4px;font-size:1.1em;color:#e74c3c}
.new-label{background:#ff9800;color:#fff;font-size:.7em;padding:2px 4px;border-radius:3px;margin-left:6px}





/* Dark mode: màu dịu hơn */
html[data-theme="dark"] #examStructure {
  color: #e0e0e0;
}

html[data-theme="dark"] #examStructure h4,
html[data-theme="dark"] #examStructure p,
html[data-theme="dark"] #examStructure .section-title,
html[data-theme="dark"] #examStructure .part-label,
html[data-theme="dark"] #examStructure .part-desc {
  color: #e0e0e0;
}




#examStructure {
  max-height: none;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  position: relative;
}

/* Trạng thái thu gọn */
#examStructure.collapsed {
  max-height: 200px;
  opacity: 0.6;
  mask-image: linear-gradient(to bottom, black 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent);
}

/* Nút mở rộng */
#expandStructureBtn {
  display: none;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  margin-top: 0.5rem;
  color: var(--accent-blue, #007acc);
}
#examStructure.collapsed + #expandStructureBtn {
  display: block;
}
#toggleStructureBtn {
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  margin: 0.5rem auto 1rem;
  color: var(--accent-blue, #007acc);
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.3s;
}

#toggleStructureBtn .toggle-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* Khi mở rộng – xoay mũi tên */
#examStructureWrapper.expanded + #toggleStructureBtn .toggle-arrow {
  transform: rotate(180deg);
}

#keyInput {
  padding: 0.4rem 0.6rem;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 220px;
  transition: border-color 0.2s;
}

#keyInput:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.3);
}

#keyError {
  color: red;
  font-size: 14px;
  position: relative;
  white-space: nowrap;
}

#submitKeyBtn {
  padding: 0.4rem 0.8rem;
  font-size: 14px;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
#keyInputContainer {
  display: flex;
  gap: 0.4rem;
  /* margin-top: 1rem; */
  animation: fadeIn 0.3s ease-in-out;
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap;
  align-content: space-between;
  align-items: flex-end;
}

h2#pageTitle {
  font-size: 3rem;
  font-weight: 1000;
  /* color: #222; */
  text-align: center;
  margin: 40px auto 20px;
  position: relative;
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(to right, #2196f3, #21cbf3);
  color: transparent;
  border-radius: 16px;
  transition: all 0.3s ease-in-out;
  background-clip: text;
}

h2#pageTitle:hover {
  transform: scale(1.05);
  text-shadow: 0 12px 30px rgba(33, 203, 243, 0.4);
}


.level-circle-container {
  position: relative;
  width: 100%;
  height: 500px;
  text-align: center;
  --radius: 180px; /* Khoảng cách từ tâm ra cánh */
}

.level-circle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle at 100% 0%,#169e45, #000000);
  color: white;
  font-weight: bold;
  font-family: "Segoe UI", sans-serif;
  font-size: 16px;
  text-align: center;
  line-height: 1.2;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 3;
}

.line-text {
  display: block;
}
.line-1 {
  font-size: 20px;
  font-weight: bold;
}
.line-2, .line-3 {
  font-size: 14px;
  opacity: 0.8;
}

.level-circle-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--size, 100px);
  height: var(--size, 100px);
  border-radius: 50%;
  color: white;
  text-align: center;
  line-height: var(--size, 100px);
  font-weight: bold;
  background-color: gray;
  box-shadow: 2px 4px 10px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  animation: bloom 0.5s ease-out forwards;
  animation-delay: calc(var(--i) * 0.1s);
  text-decoration: none;
  font-size: large;
}
/* Vị trí động */
.level-circle-item::before {
  content: '';
  display: block;
  position: absolute;
}

/* Keyframe nở hoa */
@keyframes bloom {
  to {
    transform:
      translate(-50%, -50%)
      rotate(calc(360deg / var(--total) * var(--i)))
      translateY(calc(-1 * var(--radius)))
      rotate(calc(-360deg / var(--total) * var(--i)));
    opacity: 1;
  }
}




.blue {
  background: linear-gradient(145deg, #003B8B, #007FFF);
  color: white;
}

.green {
  background: linear-gradient(145deg, #006644, #00FF88);
  color: white;
}

.red {
  background: linear-gradient(145deg, #B0003A, #FF0040);
  color: white;
}

.purple {
  background: linear-gradient(145deg, #4B0082, #9932CC);
  color: white;
}

.orange {
  background: linear-gradient(145deg, #C04800, #FF8C00);
  color: white;
}

.lightblue {
  background: linear-gradient(145deg, #005f73, #0a9396);
  color: white;
}

.pink {
  background: linear-gradient(145deg, #C2185B, #FF4081);
  color: white;
}
input#level-circle-toggle {
  display: none;
}
div#examOptionsContainer {
  box-shadow: 10px 10px 10px 10px whitesmoke;
  width: 100%;
  height: auto;
}


.exam-lock {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 18px;
  color: #e53935;
}

.icon-lock:before {
  content: '\e815'; /* thay bằng mã đúng từ fontello config */
  font-family: 'fontello';
  font-style: normal;
  font-weight: normal;
  speak: none;
  display: inline-block;
}
.icon-lock:before {
  content: '\e815';
  top: -10px!important;
  position: fixed;
  right: 1px;
  font-size: 28px;
  color: initial;
}

.exam-new-badge {
  position: absolute;
  top: -1rem;
  left: 16px;
  background: #ff4081;
  color: white;
  font-size: 16px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: bold;
  letter-spacing: 0.5px;
  transform: rotate3d(1, 1, 1, -20deg);
}
.exam-card {
  position: relative;
  padding: 20px 24px;
  margin: 20px;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  min-width: 260px;
  max-width: 440px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  animation: cardFadeIn 0.6s ease forwards;
}

.exam-card:hover {
  transform: translateY(0) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

/* Gradient Themes */
.gradient-blue    { background: linear-gradient(135deg, #2980b9, #6dd5fa); }
.gradient-green   { background: linear-gradient(135deg, #11998e, #38ef7d); }
.gradient-orange  { background: linear-gradient(135deg, #f12711, #f5af19); }
.gradient-purple  { background: linear-gradient(135deg, #8e2de2, #4a00e0); }
.gradient-red     { background: linear-gradient(135deg, #ff416c, #ff4b2b); }

/* Badge & Lock */
.exam-new-badge {
  position: absolute;
  top: -12px;
  background: #fff;
  color: #e91e63;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

.exam-lock {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 20px;
  color: #fff;
  opacity: 0.8;
}

/* Nội dung */
.exam-content {
  z-index: 1;
}

/* Animation */
@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h3#examListTitle {
  position: relative;
  display: inline-block;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, #1e3c72, #2a5298); /* Màu xanh đậm chuyển sắc */
  padding: 14px 28px;
  margin: 24px auto;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  text-align: center;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Tạo hình đuôi tam giác bên trái */
h3#examListTitle::before {
  content: "";
  position: absolute;
  top: 0;
  left: -20px;
  width: 0;
  height: 0;
  border-top: 28px solid transparent;
  border-bottom: 28px solid transparent;
  border-right: 20px solid #1e3c72;
}

/* Tạo hình đuôi tam giác bên phải */
h3#examListTitle::after {
  content: "";
  position: absolute;
  top: 0;
  right: -20px;
  width: 0;
  height: 0;
  border-top: 28px solid transparent;
  border-bottom: 28px solid transparent;
  border-left: 20px solid #2a5298;
}
#keyInputContainer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 12px 16px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

#keyInput {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: #1a1a1a;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}

#keyInput::placeholder {
  color: #aaa;
  font-style: italic;
}

#keyInput:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #007BFF33;
}

#submitKeyBtn {
  padding: 12px 28px;
  border: none;
  background: linear-gradient(135deg, #007BFF, #3399FF);
  color: white;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

#submitKeyBtn:hover {
  background: linear-gradient(135deg, #0056b3, #228be6);
  transform: translateY(-1px);
}

#keyError {
  color: #ff4d4f;
  font-weight: 500;
  font-size: 0.95rem;
  margin-left: 0.5rem;
}



@media (max-width: 768px) {
  .level-circle-container {
    --radius: 130px !important;
  }
}
@media (max-width: 768px) {
  #keyInputContainer {
    display: flex;
    gap: 0.4rem;
    animation: fadeIn 0.3s ease-in-out;
    flex-direction: row;
    justify-content: center;
    align-content: center;
    align-items: center;
    flex-wrap: nowrap;
  }
  .level-circle-container {
    position: relative;
    width: 75vw;
    height: 50vh;
    text-align: center;
    --radius: 130px;
    right: 4rem!important;
    padding: 0;
    left: 0;
}

h2#pageTitle {
  font-size: 1.5rem!important
}
}


.level-circle-item:hover {
  transform: scale(1.1);
  z-index: 10;
}

.level-circle-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0px rgba(0, 255, 128, 0);
  transition: box-shadow 0.3s ease;
  z-index: -1;
}

.level-circle-item:hover::before {
  box-shadow: 0 0 18px rgba(0, 255, 128, 0.6);
}
.cursor-help {
  cursor: help !important;
}
.cursor-help *,
.cursor-help *:hover,
.cursor-help button,
.cursor-help button:hover,
.cursor-help a,
.cursor-help a:hover {
  cursor: help !important;
}