/* Giao diện Ghép ảnh Liên Quân trên AOVTool - Polished Dark Gaming UI */
.collage-page {
  display: grid;
  gap: 18px;
}

.collage-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 16px;
  background: #090d1a;
  border: 1px solid rgba(167, 139, 250, 0.24);
  border-radius: 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.collage-mode-tab,
.collage-tab-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #9aa4bf;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 14px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.collage-mode-tab:hover:not([aria-selected="true"]),
.collage-tab-btn:hover:not([aria-selected="true"]) {
  color: #e2e8f0;
  background: rgba(139, 92, 246, 0.08);
}

.collage-mode-tab[aria-selected="true"],
.collage-tab-btn[aria-selected="true"] {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  border-color: rgba(196, 181, 253, 0.38);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.collage-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 560px) {
  .collage-options-grid {
    grid-template-columns: 1fr;
  }
}

.collage-options-grid label,
.collage-single-fields label,
.collage-option-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 0 !important;
}

.collage-options-grid label>span,
.collage-single-fields label>span,
.collage-option-field span,
#collage-batch-box>label>span {
  font-size: 0.82rem;
  font-weight: 650;
  color: #cbd5e1;
  letter-spacing: 0.01em;
}

.collage-options-grid select,
.collage-single-fields input,
.collage-option-field select,
.collage-single-inputs input {
  width: 100%;
  box-sizing: border-box;
  height: 43px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #353b54;
  background-color: #090d1a;
  color: #f4f2ff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.collage-options-grid select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.collage-options-grid select:hover,
.collage-single-fields input:hover {
  border-color: #5b4d85;
  background-color: #0c1122;
}

.collage-options-grid select:focus,
.collage-single-fields input:focus {
  outline: none;
  border-color: #9b7aff;
  background-color: #0d1326;
  box-shadow: 0 0 0 3px rgba(155, 122, 255, 0.2);
}

.collage-single-fields {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.collage-single-fields input::placeholder {
  color: #64708d;
}

#collage-batch-box {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

#collage-batch-box[hidden] {
  display: none !important;
}

#collage-batch-box .rb-input-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 4px !important;
}

#collage-batch-box .rb-action {
  flex: 1;
  height: 36px;
  border-radius: 9px;
  border: 1px solid #383e59;
  background: linear-gradient(180deg, #1d2338 0%, #151a2b 100%);
  color: #d8ddf0;
  font-size: 0.82rem;
  font-weight: 650;
  transition: all 0.16s ease;
}

#collage-batch-box .rb-action:hover {
  border-color: #8b5cf6;
  background: linear-gradient(180deg, #2a2346 0%, #1d1833 100%);
  color: #ffffff;
}

.collage-page .rank-ban-input-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  margin-top: 6px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.09);
  border: 1px solid rgba(167, 139, 250, 0.22);
  font-size: 0.82rem;
  color: #cbd5e1;
}

.collage-page .rank-ban-input-note b {
  color: #dcd0ff;
  font-weight: 700;
}

.collage-page #collage-submit-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 11px;
  border: 1px solid rgba(196, 181, 253, 0.35);
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 55%, #4c1d95 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(109, 40, 217, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.collage-page #collage-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.07);
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.collage-page #collage-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.collage-page #collage-submit-btn:disabled {
  background: #23283c;
  border-color: #363d56;
  color: #7c86a2;
  box-shadow: none;
  cursor: not-allowed;
}

.collage-preview-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  margin: 0 20px 18px;
  padding: 16px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 25%, rgba(124, 58, 237, 0.12), rgba(9, 11, 20, 0.95) 75%);
  border: 1px dashed rgba(167, 139, 250, 0.28);
  position: relative;
  overflow: hidden;
}

.collage-preview-stage img {
  max-width: 100%;
  max-height: 680px;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.65);
  cursor: zoom-in;
}

.collage-preview-empty {
  text-align: center;
  color: #8c96b2;
  padding: 36px 18px;
  font-size: 0.9rem;
}

.collage-preview-meta {
  width: 100%;
  margin-top: 14px;
  padding: 12px 15px;
  border-radius: 10px;
  background: rgba(18, 23, 41, 0.92);
  border: 1px solid rgba(167, 139, 250, 0.22);
  font-size: 0.86rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.collage-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
  justify-content: flex-end;
}

.collage-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
  max-height: 620px;
  overflow-y: auto;
  padding: 12px;
}

.collage-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(15, 19, 34, 0.95);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 12px;
  padding: 10px;
  gap: 8px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.collage-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.collage-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 11;
  background: #090b14;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.collage-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.collage-card-info {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.collage-card-info strong {
  color: #f8fafc;
  display: block;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collage-card-actions {
  display: flex;
  gap: 6px;
}

.collage-card-actions button {
  flex: 1;
  font-size: 0.8rem;
  padding: 7px 8px;
  border-radius: 8px;
}

.collage-card-actions button.collage-card-delete-btn {
  flex: 0 0 auto;
  padding: 7px 10px;
}

/* ==========================================================================
   BẢNG TÙY CHỈNH TRỰC TIẾP ẢNH GHÉP (KÉO THẢ BẬC SKIN, TÀI NGUYÊN, TIÊU ĐỀ, MÀU NỀN)
   ========================================================================== */
.collage-live-customizer {
  width: 100%;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #0b0f1d;
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: grid;
  gap: 14px;
  box-sizing: border-box;
  text-align: left;
}

.collage-live-customizer[hidden] {
  display: none !important;
}

.clc-section {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.clc-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.clc-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.clc-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
}

.clc-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.clc-badge-info {
  font-size: 0.78rem;
  font-weight: 700;
  color: #38bdf8;
}

.clc-hint-text {
  font-size: 0.75rem;
  color: #60a5fa;
}

.clc-mini-btn {
  appearance: none;
  border: 1px solid #334155;
  background: #161e31;
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.clc-mini-btn:hover {
  border-color: #8b5cf6;
  background: #231d3c;
  color: #ffffff;
}

.clc-mini-btn[data-active="true"] {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.22);
  color: #f3e8ff;
}

.clc-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.clc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: grab;
  user-select: none;
  border: 1px solid rgba(16, 185, 129, 0.55);
  background: rgba(6, 78, 59, 0.45);
  color: #ecfdf5;
  transition: all 0.15s ease;
}

.clc-chip:active {
  cursor: grabbing;
}

.clc-chip.is-dragging {
  opacity: 0.45;
  transform: scale(0.96);
}

.clc-chip.is-unchecked {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.7);
  color: #64748b;
}

.clc-chip-block {
  border-color: rgba(59, 130, 246, 0.65);
  background: rgba(30, 58, 138, 0.45);
  color: #eff6ff;
  cursor: pointer;
}

.clc-chip-block.is-unchecked {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.7);
  color: #64748b;
}

.clc-grip {
  color: #64748b;
  font-size: 0.78rem;
  letter-spacing: -1px;
  cursor: grab;
}

.clc-check {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #10b981;
  color: #052e16;
  font-size: 0.7rem;
  font-weight: 900;
}

.clc-chip-block .clc-check {
  background: #22c55e;
}

.clc-chip.is-unchecked .clc-check,
.clc-chip-block.is-unchecked .clc-check {
  background: #1e293b;
  border: 1px solid #475569;
  color: transparent;
}

.clc-inline-select {
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(147, 197, 253, 0.4);
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.clc-inline-select:hover,
.clc-inline-select:focus {
  border-color: #60a5fa;
}

.clc-tier-name[data-tier*="SS"],
.clc-tier-name[data-tier*="EVO"],
.clc-tier-name[data-tier*="Tuyệt"],
.clc-tier-name[data-tier*="Thứ"],
.clc-tier-name[data-tier*="VIP"] {
  color: #fbbf24;
}

.clc-tier-name[data-tier="S+"],
.clc-tier-name[data-tier*="S+"] {
  color: #fb923c;
}

.clc-tier-name[data-tier="S hữu hạn"] {
  color: #f472b6;
}

.clc-tier-name[data-tier="Quang vinh"] {
  color: #38bdf8;
}

.clc-count {
  color: #e2e8f0;
  font-weight: 800;
}

.clc-divider {
  width: 1px;
  height: 22px;
  background: rgba(148, 163, 184, 0.25);
  margin: 0 3px;
}

.clc-title-inputs {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 0.75fr;
  gap: 10px;
}

@media (max-width: 720px) {
  .clc-title-inputs {
    grid-template-columns: 1fr;
  }
}

.clc-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.clc-input-group span {
  font-size: 0.75rem;
  font-weight: 650;
  color: #60a5fa;
}

.clc-input-group input {
  width: 100%;
  box-sizing: border-box;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #2b354f;
  background: #070b15;
  color: #f8fafc;
  font-size: 0.85rem;
}

.clc-input-group input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}