/* ════════════════════════════════════════════════
   MIRAGE PRISM — Complete Stylesheet
   Dark Gold FFXIV Theme · Glassmorphism
════════════════════════════════════════════════ */

:root {
  --bg:         #0a0d12;
  --panel:      #141923;
  --panel-2:    #1b2230;
  --surface:    #202938;
  --line:       #2e3d54;
  --line-soft:  rgba(255,255,255,.07);
  --gold:       #d7b86a;
  --gold-dim:   #a8893e;
  --blue:       #65c7d7;
  --rose:       #d96b7c;
  --green:      #75c489;
  --text:       #f3ead2;
  --muted:      #a6adbb;
  --faint:      #5e6a7e;
  --shadow:     0 20px 60px rgba(0,0,0,.5);
  --header-h:   64px;
  --panel-w:    300px;
  font-family: "Outfit", "Noto Sans TC", system-ui, sans-serif;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  color: var(--text);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(101,199,215,.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(215,184,106,.05) 0%, transparent 50%),
    var(--bg);
  overflow-y: auto;
}
button, input, select { font: inherit; cursor: pointer; }
input { cursor: text; }
img { display: block; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════ */
.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10,13,18,.95);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand > i {
  font-size: 22px;
  color: var(--blue);
  filter: drop-shadow(0 0 8px rgba(101,199,215,.5));
}
.brand h1 {
  margin: 0;
  font-family: Cinzel, serif;
  font-size: 19px;
  letter-spacing: 2.5px;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(215,184,106,.25);
}
.brand span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }

/* View Switch Pills */
.view-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: rgba(0,0,0,.3);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.view-tab {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 18px;
  transition: all .2s ease;
}
.view-tab i { font-size: 13px; }
.view-tab:hover { color: var(--text); }
.view-tab.active { background: var(--gold); color: #0c0f14; font-weight: 700; }

/* Header Action Buttons */
.header-actions { min-width: 120px; display: flex; justify-content: flex-end; }
.icon-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: .18s ease;
}
.icon-button:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }
.icon-button.text-button { padding: 0 14px; }

/* ════════════════════════════════════════════════
   APP CONTAINER
════════════════════════════════════════════════ */
.app-container {
  height: calc(100vh - var(--header-h));
  overflow: visible;
  position: relative;
}

/* ════════════════════════════════════════════════
   GALLERY VIEW
════════════════════════════════════════════════ */
.gallery-container {
  height: 100%;
  overflow-y: auto;
  padding: 28px 36px 48px;
}

.gallery-hero {
  text-align: center;
  margin-bottom: 30px;
}
.gallery-hero h2 {
  font-family: Cinzel, serif;
  font-size: 26px;
  letter-spacing: 5px;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(215,184,106,.3);
  margin: 0 0 8px;
}
.gallery-hero p {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
  margin: 0;
}

.gallery-filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 12px 18px;
  background: rgba(20,25,35,.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(12px);
}
.gallery-filter-bar .search-row { flex: 1; max-width: 480px; }
.filter-controls select {
  height: 38px;
  min-width: 160px;
  background: #0f141d;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 0 10px;
  font-size: 13px;
  outline: none;
}
.filter-controls select:focus { border-color: var(--gold); }

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  padding-bottom: 20px;
}

/* Gallery Empty */
.gallery-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 20px;
  color: var(--faint);
  text-align: center;
}
.gallery-empty i { font-size: 40px; color: var(--line); }
.gallery-empty span { font-size: 16px; color: var(--muted); }
.gallery-empty small { font-size: 13px; }

/* Glamour Card */
.glamour-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid rgba(215,184,106,.1);
  cursor: pointer;
  transition: transform .3s cubic-bezier(.25,.8,.25,1),
              border-color .3s ease,
              box-shadow .3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.glamour-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 14px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(215,184,106,.2);
}

.glamour-card-image {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  position: relative;
  background: #060a10;
}
.glamour-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .5s ease;
}
.glamour-card:hover .glamour-card-image img { transform: scale(1.06); }

/* Gradient overlay on card image */
.glamour-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(8,10,16,.96) 0%,
    rgba(8,10,16,.5) 40%,
    transparent 70%);
  pointer-events: none;
}

/* Card Placeholder (no screenshot) */
.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  opacity: .4;
}

/* Card Content */
.glamour-card-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 16px;
  z-index: 2;
}
.glamour-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.glamour-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.glamour-card-role {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid;
  background: rgba(0,0,0,.3);
  backdrop-filter: blur(4px);
}
.glamour-card-meta {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.glamour-card-likes {
  font-size: 12px;
  color: #e05c75;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ════════════════════════════════════════════════
   EDITOR — WORKSPACE LAYOUT
════════════════════════════════════════════════ */
.workspace-editor { height: 100%; }
.workspace {
  height: 100%;
  display: grid;
  grid-template-columns: var(--panel-w) 1fr var(--panel-w);
  min-height: 0;
}

/* Side Panels */
.side-panel {
  background: rgba(18,23,33,.95);
  display: flex;
  flex-direction: column;
  min-height: 0;
  backdrop-filter: blur(10px);
}
.left-panel  { border-right: 1px solid var(--line); }
.right-panel { border-left:  1px solid var(--line); }

.panel-section {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line-soft);
  flex-shrink: 0;
}
.panel-section.grow { flex: 1; min-height: 0; overflow-y: auto; }
.publish-section { padding: 14px 16px; border-top: 1px solid var(--line); }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}
.section-title i { color: var(--blue); }

.field-label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Inputs */
.text-input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1219;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
  font-size: 13px;
}
.text-input { height: 36px; padding: 0 11px; }
select { height: 34px; padding: 0 8px; margin-top: 2px; }
.text-input:focus, select:focus { border-color: var(--gold); }

/* Segmented Buttons */
.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.gender-seg { grid-template-columns: 1fr 1fr; }
.segment, .btn-option {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  transition: all .18s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.segment:hover, .btn-option:hover { border-color: var(--gold-dim); color: var(--gold-dim); }
.segment.active, .btn-option.active { border-color: var(--gold); color: var(--gold); background: rgba(215,184,106,.1); }

/* ─── Equipped Gear List (Left Panel) ─── */
.equipped-list { display: flex; flex-direction: column; gap: 6px; }
.equipped-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-2);
  transition: border-color .2s;
}
.equipped-row:not(.empty):hover { border-color: rgba(215,184,106,.3); }

.slot-icon {
  width: 36px; height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: #0a0f18;
  flex-shrink: 0;
}
.slot-icon.empty {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  color: var(--faint);
  font-size: 14px;
}
.equipped-info { min-width: 0; }
.item-name {
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-name.muted { color: var(--faint); font-weight: 400; }
.item-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.mini-action {
  width: 26px; height: 26px;
  border: none;
  background: transparent;
  color: var(--faint);
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px;
  flex-shrink: 0;
  transition: all .15s;
  font-size: 13px;
}
.mini-action:hover { color: var(--rose); background: rgba(217,107,124,.12); }

/* Publish Button */
.publish-btn {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e5c06b, #b59247);
  border: none;
  color: #0c0f14;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 4px 18px rgba(215,184,106,.2);
  transition: all .2s ease;
}
.publish-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(215,184,106,.38);
}
.publish-btn:active { transform: translateY(0); }

/* ════════════════════════════════════════════════
   STAGE — CENTRE (Screenshot Upload)
════════════════════════════════════════════════ */
.stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  height: 100%;
  overflow: hidden;
  min-width: 0;
  background: rgba(8,11,18,.4);
}

/* Upload Zone */
.upload-zone {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(8,12,20,.6);
  border: 2px dashed rgba(100,130,165,.25);
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .25s, background .25s;
}
.upload-zone:hover { border-color: rgba(215,184,106,.45); background: rgba(8,12,20,.75); }
.upload-zone.dragover {
  border-color: var(--gold);
  background: rgba(10,15,25,.85);
  box-shadow: inset 0 0 30px rgba(215,184,106,.08);
}

.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  text-align: center;
  padding: 20px;
}
.upload-prompt i {
  font-size: 40px;
  color: var(--blue);
  opacity: .7;
  filter: drop-shadow(0 0 8px rgba(101,199,215,.3));
}
.upload-prompt span { font-size: 15px; font-weight: 500; color: var(--text); }
.upload-prompt small { font-size: 12px; color: var(--faint); }

/* Screenshot Preview */
#screenshot-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050810;
}

/* Remove Button */
.remove-screenshot-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(217,107,124,.85);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all .2s;
  font-size: 13px;
}
.remove-screenshot-btn:hover { background: #d96b7c; transform: scale(1.1); }

/* Stage Summary Bar */
.stage-summary {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  background: rgba(20,25,35,.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}
.summary-text strong { display: block; font-size: 14px; font-weight: 600; }
.summary-text span { font-size: 11px; color: var(--muted); margin-top: 2px; display: block; }

/* Slot Pip Indicators */
.slot-pips {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.slot-pip {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--faint);
  font-size: 12px;
  transition: all .2s;
}
.slot-pip.equipped { border-color: var(--gold); color: var(--gold); background: rgba(215,184,106,.1); }

/* ════════════════════════════════════════════════
   RIGHT PANEL — XIVAPI SEARCH
════════════════════════════════════════════════ */

/* Slot Tabs */
.slot-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.slot-tab {
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--faint);
  font-size: 10px;
  transition: all .18s;
  position: relative;
}
.slot-tab i { font-size: 15px; }
.slot-tab:hover { color: var(--muted); }
.slot-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.slot-tab.equipped::after {
  content: '';
  position: absolute;
  top: 7px; right: 7px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 4px var(--green);
}

/* Slot Hint */
.slot-hint {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--faint);
  text-align: center;
  background: rgba(0,0,0,.15);
  border-bottom: 1px solid var(--line-soft);
  flex-shrink: 0;
  transition: color .2s;
}
.slot-hint.active-hint { color: var(--gold); }

/* Search Section */
.search-section { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); flex-shrink: 0; }
.search-row {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1219;
  transition: border-color .2s;
}
.search-row:focus-within { border-color: var(--blue); }
.search-row > i { color: var(--blue); font-size: 13px; flex-shrink: 0; }
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 13px;
  min-width: 0;
}
.search-input::placeholder { color: var(--faint); }
.search-btn {
  width: 28px; height: 28px;
  border-radius: 5px;
  background: var(--gold);
  border: none;
  color: #0c0f14;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  transition: all .15s;
}
.search-btn:hover { background: #e5c96b; transform: scale(1.05); }

/* API Badge */
.api-badge {
  margin-top: 7px;
  font-size: 10px;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 5px;
}
.api-badge i { color: var(--blue); }

/* Gear Count */
.gear-count {
  padding: 8px 14px 0;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

/* Gear List */
.gear-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Gear Card (XIVAPI result) */
.gear-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  width: 100%;
  transition: border-color .15s, background .15s;
}
.gear-card:hover { border-color: rgba(215,184,106,.4); background: var(--surface); }
.gear-card.equipped { border-color: var(--gold); background: rgba(215,184,106,.06); }
.gear-icon {
  width: 44px; height: 44px;
  border-radius: 5px;
  background: #0a0f18;
  object-fit: cover;
  flex-shrink: 0;
}
.gear-info { min-width: 0; }
.gear-info .item-name { font-size: 12px; font-weight: 500; }
.gear-info .item-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Bind Label */
.bind-label {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: var(--faint);
  flex-shrink: 0;
  transition: all .15s;
}
.gear-card:hover .bind-label { border-color: var(--gold); color: var(--gold); }
.bind-label.bound { border-color: var(--gold); color: var(--gold); background: rgba(215,184,106,.12); }

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 50px 20px;
  color: var(--muted);
  font-size: 13px;
}
.spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty / Error State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--faint);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.empty-state i { font-size: 28px; color: var(--line); margin-bottom: 4px; }
.empty-state span { font-size: 13px; color: var(--muted); }
.empty-state small { font-size: 11px; line-height: 1.6; }
.error-state { border-color: rgba(217,107,124,.3); }
.error-state i { color: var(--rose); }

/* ════════════════════════════════════════════════
   DETAIL MODAL
════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.7);
  z-index: 100;
  backdrop-filter: blur(4px);
}
.modal.show { display: flex; animation: fade-in .25s ease; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { opacity: 0; transform: scale(.96) translateY(16px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.detail-panel {
  position: relative;
  width: min(920px, 95vw);
  max-height: 88vh;
  background: rgba(18,23,34,.92);
  border: 1px solid rgba(215,184,106,.35);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.07);
  animation: slide-up .3s cubic-bezier(.16,1,.3,1);
}
.close-modal-btn {
  position: absolute;
  top: 15px; right: 15px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  font-size: 15px;
  transition: all .2s;
}
.close-modal-btn:hover { background: var(--rose); color: #fff; transform: rotate(90deg); }

.detail-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  max-height: 88vh;
}

/* Visual Side */
.detail-visual {
  background: #04060c;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 500px;
}
#detail-image {
  width: 100%;
  height: 100%;
  max-height: 88vh;
  object-fit: contain;
}
.detail-visual-placeholder {
  width: 100%;
  height: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

/* Info Side */
.detail-info {
  padding: 32px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.detail-header-block { border-bottom: 1px solid var(--line-soft); padding-bottom: 18px; }
.detail-meta-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.detail-role-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border: 1px solid;
  border-radius: 6px;
  background: rgba(0,0,0,.25);
}
.detail-date { font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 5px; }
.detail-header-block h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  font-family: Outfit, sans-serif;
}
.detail-author { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.detail-author i { color: var(--blue); }

.detail-section h3 {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Detail Gear List */
.detail-gear-list { display: flex; flex-direction: column; gap: 7px; }
.detail-gear-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 8px;
}
.detail-gear-row.empty { opacity: .45; }
.slot-icon-mini {
  width: 32px; height: 32px;
  border-radius: 5px;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--faint);
  font-size: 13px;
  flex-shrink: 0;
}
.gear-icon-sm {
  width: 36px; height: 36px;
  border-radius: 5px;
  background: #0a0f18;
  object-fit: cover;
  flex-shrink: 0;
}
.detail-gear-info { flex: 1; min-width: 0; }
.detail-gear-slot { display: block; font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.detail-gear-name { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-gear-name.empty-text { color: var(--faint); font-weight: 400; }
.detail-ilvl {
  font-size: 11px;
  color: var(--gold-dim);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Detail Actions Layout */
.detail-actions {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 8px;
}
.like-post-btn {
  flex: 2;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #c83856, #9e2842);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(200,56,86,.2);
  transition: all .2s ease;
}
.like-post-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(200,56,86,.4); }
.like-post-btn:active { transform: translateY(0); }
.like-post-btn.liked {
  background: linear-gradient(135deg, #6b1224, #4a0d1a);
  box-shadow: 0 4px 18px rgba(200,56,86,.1);
  opacity: 0.75;
}
.like-post-btn.liked:hover { box-shadow: 0 8px 28px rgba(200,56,86,.2); }

.fav-post-btn {
  flex: 1.2;
  height: 46px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  transition: all .2s ease;
}
.fav-post-btn:hover { transform: translateY(-2px); border-color: var(--gold); color: var(--gold); }
.fav-post-btn:active { transform: translateY(0); }

.report-post-btn {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  color: var(--rose);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s ease;
  font-size: 15px;
  flex-shrink: 0;
}
.report-post-btn:hover { background: rgba(217,107,124,0.12); border-color: var(--rose); transform: translateY(-2px); }
.report-post-btn:active { transform: translateY(0); }

/* ════════════════════════════════════════════════
   TOAST
════════════════════════════════════════════════ */
#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 20px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: rgba(18,23,33,.97);
  color: var(--gold);
  font-size: 13px;
  font-weight: 500;
  transition: all .22s ease;
  z-index: 200;
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(0,0,0,.6);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  :root { --panel-w: 260px; }
  .icon-button.text-button span { display: none; }
  .icon-button.text-button { padding: 0 10px; }
}

@media (max-width: 860px) {
  body { overflow: auto; }
  .workspace { grid-template-columns: 1fr; height: auto; }
  .left-panel  { order: 2; border-right: none; border-bottom: 1px solid var(--line); }
  .stage       { order: 1; min-height: 480px; }
  .right-panel { order: 3; border-left: none; border-top: 1px solid var(--line); }
  .detail-content-wrapper { grid-template-columns: 1fr; }
  .detail-visual { min-height: 300px; max-height: 45vh; }
}

/* Card Action Overlays */
.card-action-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 2;
}
.glamour-card:hover .card-action-overlay {
  opacity: 1;
}
.card-overlay-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(10, 15, 25, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.card-overlay-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #0c0f14;
  transform: scale(1.1);
}
.card-overlay-btn.fav-btn.active {
  color: var(--gold);
}
.card-overlay-btn.fav-btn.active:hover {
  color: #0c0f14;
}
.card-overlay-btn.report-btn:hover {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
}

/* Card Like Button */
.card-like-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s ease;
  padding: 2px 6px;
  border-radius: 4px;
}
.card-like-btn:hover {
  color: #e05c75;
  background: rgba(224, 92, 117, 0.10);
}
.card-like-btn i {
  color: var(--muted);  /* 預設空心灰色 */
}
.card-like-btn.liked i {
  color: #e05c75;       /* 已按讚實心紅色 */
}

/* Admin Panel Styles */
.admin-container {
  padding: 30px;
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.admin-hero {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.admin-hero h2 {
  font-family: Cinzel, serif;
  color: var(--gold);
  margin: 0 0 6px;
  font-size: 24px;
}
.admin-hero p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.admin-table-wrapper {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.admin-table th, .admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.admin-table th {
  background: rgba(0,0,0,0.3);
  color: var(--gold);
  font-weight: 600;
}
.admin-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}
.admin-thumb {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.admin-thumb-empty {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  border: 1px dashed var(--line);
}
.admin-btn-delete {
  background: var(--rose);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}
.admin-btn-delete:hover {
  background: #ff8093;
  transform: translateY(-1px);
}
.admin-btn-keep {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 8px;
  transition: all 0.15s;
}
.admin-btn-keep:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.admin-empty {
  text-align: center;
  padding: 40px !important;
  color: var(--faint);
}
.admin-empty i {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
}

/* My Glamour Action Buttons hover states */
.btn-edit-glamour {
  transition: all 0.2s ease !important;
}
.btn-edit-glamour:hover {
  background: rgba(215, 184, 106, 0.15) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}
.btn-delete-glamour {
  transition: all 0.2s ease !important;
}
.btn-delete-glamour:hover {
  background: rgba(217, 107, 124, 0.22) !important;
}
