/* ============================================================
   RISE ONLINE STREAMER STUDIO - REWARD MANAGEMENT & STUDIO CSS
   ============================================================ */

.rewards-studio-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1650px;
  margin: 0 auto;
  padding: 14px 18px 40px;
  min-height: calc(100vh - 120px);
}

/* Header Banner */
.rewards-header-card {
  background: linear-gradient(135deg, rgba(24, 29, 44, 0.95) 0%, rgba(13, 16, 23, 0.98) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg, 16px);
  padding: 16px 24px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.rewards-header-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rewards-header-icon {
  font-size: 2.2rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.rewards-header-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--gold-light, #fbbf24);
  letter-spacing: 0.5px;
  margin: 0 0 4px 0;
}

.rewards-header-sub {
  font-size: 0.82rem;
  color: var(--text-dim, #94a3b8);
  margin: 0;
}

.rewards-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rewards-count-badge {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid #22c55e;
  color: #4ade80;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Two-Column Grid */
.rewards-columns-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1200px) {
  .rewards-columns-grid {
    grid-template-columns: 1fr;
  }
}

/* Studio Left Card */
.studio-creator-card {
  background: linear-gradient(180deg, rgba(19, 24, 38, 0.95) 0%, rgba(10, 13, 22, 0.98) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.studio-creator-header {
  padding: 14px 20px;
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-subtabs-nav {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 14px 18px 0;
  gap: 4px;
}

.studio-subtab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim, #94a3b8);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.studio-subtab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.studio-subtab-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.studio-subtab-content {
  display: none;
  padding: 18px;
}

.studio-subtab-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* Canvas Preview Pedestal */
.canvas-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(30, 41, 67, 0.6) 0%, rgba(5, 7, 12, 0.95) 75%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
  position: relative;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

#reward-text-preview-canvas {
  width: 210px;
  height: 290px;
  border-radius: 14px;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.35);
  display: block;
}

.canvas-preview-hint {
  font-size: 0.72rem;
  color: var(--gold-light, #fbbf24);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

/* Upload Drop Zone */
.reward-drop-zone {
  border: 2px dashed rgba(245, 158, 11, 0.4);
  background: rgba(10, 14, 24, 0.6);
  border-radius: 14px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 14px;
}

.reward-drop-zone:hover,
.reward-drop-zone.drag-active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
  transform: scale(1.01);
}

.upload-dimension-alert {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  color: #93c5fd;
  line-height: 1.45;
}

/* Active Rewards Right Column */
.rewards-pool-card {
  background: linear-gradient(180deg, rgba(16, 21, 33, 0.95) 0%, rgba(9, 12, 19, 0.98) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
  padding: 20px;
}

.rewards-pool-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.rewards-pool-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-light, #fbbf24);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Active Rewards Grid */
.active-rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 14px;
}

.reward-manager-card {
  background: linear-gradient(180deg, #171d2c 0%, #0c0f18 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.reward-manager-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  border-color: rgba(245, 158, 11, 0.8) !important;
}

.reward-manager-card.disabled {
  opacity: 0.55;
  filter: grayscale(0.85);
}

.reward-card-top-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rarity-badge-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.source-tag-pill {
  font-size: 0.66rem;
  color: var(--text-dim, #94a3b8);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}

.reward-card-img-wrap {
  width: 92px;
  height: 127px;
  border-radius: 12px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  margin-bottom: 10px;
}

.reward-card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
}

.reward-card-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  min-height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.reward-card-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* Custom Toggle Switch */
.reward-toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  user-select: none;
}

.reward-toggle-switch input {
  display: none;
}

.reward-toggle-switch .slider {
  width: 32px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  position: relative;
  transition: 0.25s;
  display: inline-block;
}

.reward-toggle-switch .slider:before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.25s;
}

.reward-toggle-switch input:checked + .slider {
  background-color: #22c55e;
}

.reward-toggle-switch input:checked + .slider:before {
  transform: translateX(14px);
}

.reward-toggle-switch .toggle-label {
  color: var(--text-dim, #94a3b8);
}

.reward-toggle-switch input:checked ~ .toggle-label {
  color: #4ade80;
}

.btn-reward-delete {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reward-delete:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Preset Items List */
.preset-items-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.preset-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  transition: all 0.2s;
}

.preset-item-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.preset-item-card.in-pool {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
}

.preset-item-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  background: #000;
  border-radius: 6px;
  padding: 2px;
}

.preset-item-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
}

.preset-item-rarity {
  font-size: 0.7rem;
  font-weight: 600;
}
