:root {
  --bg-app: #08121a;
  --bg-panel: #0d1b26;
  --bg-card: #112332;
  --bg-hover: #172d42;
  --bg-active: #0088cc;
  
  --border-ocean: #19344d;
  --border-focus: #00a8e8;
  
  --cyan-glow: #00b4d8;
  --blue-bright: #0077b6;
  --teal-accent: #00c49f;
  --gold-accent: #e5a912;
  --danger: #e63946;
  
  --text-main: #e2ecf5;
  --text-muted: #8ca3b8;
  --text-dim: #546e84;
  
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  
  --shadow-ocean: 0 4px 16px rgba(0, 0, 0, 0.4);
  --glow-cyan: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-app);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ======================================================== */
/* ⬛ SCROLLBAR                                             */
/* ======================================================== */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: #060e15;
}
::-webkit-scrollbar-thumb {
  background: #193852;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-glow);
}

* {
  scrollbar-width: thin;
  scrollbar-color: #193852 #060e15;
}

/* ======================================================== */
/* 1. TOP NAVBAR                                            */
/* ======================================================== */
.ocean-navbar {
  height: 52px;
  padding: 0 20px;
  background: #09141f;
  border-bottom: 1px solid var(--border-ocean);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  flex-shrink: 0;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-logo {
  font-size: 1.3rem;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
}
.brand-name span {
  color: var(--cyan-glow);
}

.navbar-tabs {
  display: flex;
  gap: 4px;
  background: #060e15;
  padding: 3px;
  border: 1px solid var(--border-ocean);
  border-radius: var(--radius-sm);
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-xs);
  transition: all 0.15s;
}

.nav-tab-btn:hover {
  color: #fff;
  background: var(--bg-hover);
}

.nav-tab-btn.active {
  background: var(--cyan-glow);
  color: #05131d;
  font-weight: 700;
}

.nav-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  color: inherit;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-export-main {
  background: var(--cyan-glow);
  color: #05131d;
  border: 1px solid var(--cyan-glow);
  padding: 7px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-xs);
}

.btn-export-main:hover {
  background: #26cbff;
}

/* ======================================================== */
/* 2. LEAN WORKSPACE LAYOUT (2 KOLOM: KONTROL + CANVAS LEGA)*/
/* ======================================================== */
.workspace-container {
  flex: 1;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
  padding: 14px 20px;
  height: calc(100vh - 52px);
  overflow: hidden;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
}

.ocean-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-ocean);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 10px 14px;
  background: #0e1c28;
  border-bottom: 1px solid var(--border-ocean);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-body {
  padding: 12px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.form-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.form-input, .form-select {
  background: #060e15;
  border: 1px solid var(--border-ocean);
  color: #fff;
  padding: 6px 8px;
  font-size: 0.82rem;
  border-radius: var(--radius-xs);
  outline: none;
  width: 100%;
}

.form-input:focus, .form-select:focus {
  border-color: var(--border-focus);
}

.row-pills {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}

.pill-btn {
  background: #060e15;
  border: 1px solid var(--border-ocean);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 0;
  border-radius: var(--radius-xs);
  cursor: pointer;
  text-align: center;
  transition: all 0.1s;
}

.pill-btn:hover {
  background: var(--bg-hover);
  color: #fff;
  border-color: var(--border-focus);
}

.pill-btn.active {
  background: var(--cyan-glow);
  color: #05131d;
  border-color: var(--cyan-glow);
}

.align-box {
  background: #08131d;
  border: 1px solid var(--border-ocean);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.dpad-container {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  grid-template-rows: repeat(3, 28px);
  gap: 3px;
  justify-content: center;
  align-items: center;
}

.btn-dpad {
  background: #0e2030;
  border: 1px solid var(--border-ocean);
  color: var(--cyan-glow);
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.btn-dpad:hover {
  background: var(--cyan-glow);
  color: #05131d;
}
.btn-dpad:active {
  background: #0099cc;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.mini-input-number {
  background: #060e15;
  border: 1px solid var(--border-ocean);
  color: var(--cyan-glow);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 4px;
  border-radius: var(--radius-xs);
  width: 50px;
  text-align: right;
  outline: none;
}
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: #142a3e;
  border-radius: 2px;
  outline: none;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan-glow);
  cursor: pointer;
}

.dropzone {
  border: 1px dashed var(--border-ocean);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  background: #060e15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.dropzone:hover {
  border-color: var(--cyan-glow);
  background: #091724;
}
.dropzone-icon {
  font-size: 1.1rem;
}
.dropzone-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-primary-action {
  background: #0088cc;
  border: 1px solid #00a8e8;
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
}
.btn-primary-action:hover {
  background: var(--cyan-glow);
  color: #05131d;
}

/* ======================================================== */
/* 3. RIGHT CANVAS STAGE & 100% MINECRAFT ASSET SYMMETRY     */
/* ======================================================== */
.canvas-stage-panel {
  background: #050d14;
  border: 1px solid var(--border-ocean);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.stage-toolbar {
  height: 38px;
  padding: 0 12px;
  background: #091622;
  border-bottom: 1px solid var(--border-ocean);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.stage-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #050d14;
  background-image: 
    radial-gradient(circle, #0e2030 1px, transparent 1px);
  background-size: 18px 18px;
  user-select: none;
}

/* 🧱 100% FLAT PRECISE MINECRAFT CONTAINER (NO CONFUSING SHADOW) */
.gui-frame {
  position: relative;
  width: 352px; /* 176px Native * 2 */
  background-color: #c6c6c6;
  box-sizing: content-box;
  /* Flat border simetris tanpa shadow miring */
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
  transform-origin: center center;
  transition: transform 0.05s ease-out;
}

.gui-header-title {
  position: absolute;
  top: 10px;
  left: 16px;
  font-family: 'VT323', 'Silkscreen', monospace;
  font-size: 20px;
  color: #3f3f3f;
  pointer-events: none;
  z-index: 15;
  letter-spacing: 0.5px;
}

.gui-player-title {
  position: absolute;
  left: 16px;
  font-family: 'VT323', 'Silkscreen', monospace;
  font-size: 20px;
  color: #3f3f3f;
  pointer-events: none;
  z-index: 15;
  letter-spacing: 0.5px;
}

/* Texture Overlay */
.gui-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  image-rendering: pixelated;
}

/* Slots Grids */
.slots-grid, .player-inventory-grid, .player-hotbar-grid {
  position: absolute;
  display: grid;
  z-index: 20;
}

/* 🎯 AUTHENTIC MINECRAFT SLOT 36X36 PX BEVEL (18PX * 2 SCALE) */
.mc-slot {
  width: 36px;
  height: 36px;
  background-color: #8b8b8b;
  border-top: 2px solid #373737;
  border-left: 2px solid #373737;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: 'VT323', monospace;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  user-select: none;
}

.mc-slot:hover {
  background-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.mc-slot.active {
  background-color: rgba(0, 229, 255, 0.45);
  border-color: #00e5ff;
  color: #00e5ff;
}

.slot-semi-transparent {
  background-color: rgba(139, 139, 139, 0.25);
}

/* Modal Backdrops & Cards */
.cumpack-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cumpack-modal {
  background: #08141f;
  border: 1px solid var(--border-ocean);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
  width: 100%;
  max-width: 580px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-ocean);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d1e2e;
}

.modal-body {
  padding: 14px;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-ocean);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #060e15;
}
