/* ---------- Widget goc ---------- */

.corner-widgets {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.corner-fab {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent-dim);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

.corner-fab:hover,
.corner-fab:focus-visible {
  background: var(--accent-dim);
  transform: translateY(-2px);
}

#feedback-fab { background: var(--gold); color: #1a1206; border-color: var(--gold); }
#feedback-fab:hover, #feedback-fab:focus-visible { background: #c99a12; }

.corner-panel {
  width: min(340px, calc(100vw - 36px));
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.corner-panel[hidden] { display: none; }

.corner-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.corner-panel-close {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
}

.corner-panel-body {
  padding: 12px 14px;
  overflow-y: auto;
}

.corner-stats-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.corner-stat {
  font-family: inherit;
  text-align: left;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  cursor: default;
}

.corner-stat .stat-icon {
  width: 16px;
  height: 16px;
  margin-bottom: 4px;
}

.corner-stat strong {
  display: block;
  font-size: 1.15rem;
  color: var(--gold);
  letter-spacing: 0.2px;
}

.corner-stat span {
  display: block;
  margin-top: 2px;
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 1.3;
}

.corner-stat-link {
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.corner-stat-link:hover,
.corner-stat-link:focus-visible {
  border-color: var(--gold);
}

@media (max-width: 640px) {
  .corner-widgets { right: 12px; bottom: 12px; }
}

/* ---------- Thu vien anh & video (mo tu the "Thu vien anh & video") ---------- */

.media-library-box {
  max-width: 760px;
}

.media-library-title {
  margin: 0 0 4px;
  padding-right: 32px;
  font-size: 1.1rem;
}

.media-library-hint {
  margin: 0 0 16px;
  font-size: 0.84rem;
  color: var(--text-dim);
}

.media-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.media-library-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  background: var(--bg-alt);
}

.media-library-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-library-item-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 20px;
}
