/* ==========================================================================
   Creator Studio — Visual Suite for GUI, Banners, Discord Bots & Licenses
   Adheres strictly to DESIGN.md (Oxblood, Wine, Muted Rose)
   ========================================================================== */

/* Container Layout */
.creator-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 8px 0 24px;
  align-items: start;
}

@media (max-width: 980px) {
  .creator-container {
    grid-template-columns: minmax(0, 1fr);
  }
}

.creator-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.creator-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--line-quiet);
}

.creator-panel-header h2 {
  font: 700 20px/1.2 var(--display);
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.creator-panel-body {
  padding: 22px;
}

/* ==========================================================================
   1. Minecraft GUI & Inventory Creator
   ========================================================================== */

.gui-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gui-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.gui-toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gui-toolbar-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.gui-chest-container {
  background: #1e1016;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.4);
}

.gui-chest-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 4px;
}

.gui-chest-title {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0px rgba(0,0,0,0.8);
}

.gui-slots-grid {
  display: grid;
  grid-template-columns: repeat(9, 44px);
  gap: 4px;
  justify-content: center;
}

@media (max-width: 520px) {
  .gui-slots-grid {
    grid-template-columns: repeat(9, 34px);
    gap: 2px;
  }
}

.gui-slot {
  position: relative;
  width: 44px;
  height: 44px;
  background: #140a0e;
  border-top: 2px solid #0d0609;
  border-left: 2px solid #0d0609;
  border-bottom: 2px solid #3d212c;
  border-right: 2px solid #3d212c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}

@media (max-width: 520px) {
  .gui-slot {
    width: 34px;
    height: 34px;
  }
}

.gui-slot:hover {
  background: #2b1620;
}

.gui-slot.is-selected {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  background: #361b27;
}

.gui-slot-item {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
  pointer-events: none;
}

.gui-slot-item.is-enchanted {
  filter: drop-shadow(0 0 4px var(--accent));
  animation: item-pulse 2s infinite ease-in-out;
}

@keyframes item-pulse {
  0%, 100% { filter: drop-shadow(0 0 2px var(--accent)); }
  50% { filter: drop-shadow(0 0 6px var(--accent-hover)); }
}

.gui-slot-qty {
  position: absolute;
  right: 2px;
  bottom: 0px;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 1px 1px 0px #000, -1px -1px 0px #000, 1px -1px 0px #000, -1px 1px 0px #000;
  line-height: 1;
}

/* Item Inspector Drawer */
.inspector-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 8px;
}

.inspector-tab {
  background: transparent;
  border: 0;
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.inspector-tab.is-active {
  background: var(--surface-raised);
  color: var(--accent);
}

.mc-preview-box {
  background: #10080c;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  margin-top: 14px;
}

.mc-preview-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.mc-formatted-text {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Minecraft Color Codes */
.mc-c-0 { color: #000000; }
.mc-c-1 { color: #0000AA; }
.mc-c-2 { color: #00AA00; }
.mc-c-3 { color: #00AAAA; }
.mc-c-4 { color: #AA0000; }
.mc-c-5 { color: #AA00AA; }
.mc-c-6 { color: #FFAA00; }
.mc-c-7 { color: #AAAAAA; }
.mc-c-8 { color: #555555; }
.mc-c-9 { color: #5555FF; }
.mc-c-a { color: #55FF55; }
.mc-c-b { color: #55FFFF; }
.mc-c-c { color: #FF5555; }
.mc-c-d { color: #FF55FF; }
.mc-c-e { color: #FFFF55; }
.mc-c-f { color: #FFFFFF; }
.mc-bold { font-weight: 700; }
.mc-italic { font-style: italic; }
.mc-underline { text-decoration: underline; }
.mc-strike { text-decoration: line-through; }

/* Code Export Modal / Viewer */
.code-viewer {
  background: #10080c;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--ink);
  line-height: 1.6;
  max-height: 320px;
  overflow: auto;
  white-space: pre;
}

/* ==========================================================================
   2. Discord Embed & Bot Builder
   ========================================================================== */

.discord-preview-container {
  background: #313338;
  border-radius: 6px;
  padding: 18px;
  font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #dbdee1;
}

.discord-message {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: var(--ground);
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.discord-content {
  flex: 1;
  min-width: 0;
}

.discord-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.discord-author {
  font-size: 15px;
  font-weight: 600;
  color: #f2f3f5;
}

.discord-bot-badge {
  background: #5865f2;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
}

.discord-timestamp {
  font-size: 12px;
  color: #949ba4;
}

.discord-embed-card {
  margin-top: 8px;
  padding: 12px 16px;
  background: #2b2d31;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discord-embed-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.discord-embed-title a {
  color: #00a8fc;
  text-decoration: none;
}

.discord-embed-desc {
  font-size: 14px;
  line-height: 1.5;
  color: #dbdee1;
  white-space: pre-wrap;
}

.discord-embed-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.discord-field-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.discord-field-val {
  font-size: 13px;
  color: #dbdee1;
}

.discord-embed-footer {
  font-size: 12px;
  color: #949ba4;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   3. Minecraft Banner Studio
   ========================================================================== */

.banner-studio-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 760px) {
  .banner-studio-layout {
    grid-template-columns: 1fr;
  }
}

.banner-canvas-frame {
  background: #140a0e;
  border: 2px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.banner-render {
  width: 140px;
  height: 280px;
  border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
}

.banner-layers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-height: 260px;
  overflow-y: auto;
}

.banner-layer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line-quiet);
  border-radius: 3px;
  font-size: 12px;
}

/* ==========================================================================
   4. License & Security Hub
   ========================================================================== */

.license-hero {
  padding: 24px;
  background: linear-gradient(135deg, rgba(223, 160, 175, 0.08) 0%, rgba(36, 19, 25, 1) 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.license-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.license-status-badge.is-active {
  background: rgba(181, 198, 165, 0.15);
  border: 1px solid var(--success);
  color: var(--success);
}

.license-status-badge.is-basic {
  background: rgba(223, 160, 175, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.license-status-badge.is-revoked {
  background: rgba(244, 167, 171, 0.15);
  border: 1px solid var(--error);
  color: var(--error);
}

.license-key-display {
  font-family: var(--font-mono, monospace);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink);
  background: var(--ground);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: inline-block;
}

.api-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  color: var(--ink-muted);
}
