/* RootIB: RB-20260429225716-D0E1F2A3 */

/* ==========================================================================
   public/styles.css — Shared base styles for immersive world pages
   (forge.html, laboratory.html, outdoor.html, admin-forge.html)
   ========================================================================== */

/* ── CSS Custom Properties ─────────────────────────────────────────────── */
:root {
  --color-bg:          #0d0d1a;
  --color-surface:     #1a1a2e;
  --color-surface-2:   #16213e;
  --color-border:      rgba(255, 255, 255, 0.08);
  --color-primary:     #4a90e2;
  --color-accent:      #21f3c7;
  --color-text:        #e2e8f0;
  --color-text-muted:  #94a3b8;
  --color-success:     #22c55e;
  --color-warning:     #f59e0b;
  --color-error:       #ef4444;
  --font-main:         'Orbitron', 'Exo 2', system-ui, sans-serif;
  --font-mono:         'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm:         6px;
  --radius-md:         10px;
  --radius-lg:         18px;
  --shadow-glow:       0 0 16px rgba(74, 144, 226, 0.35);
  --transition-fast:   0.15s ease;
  --transition-med:    0.3s ease;
}

/* ── Reset / Base ──────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Typography ────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(1.4rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.15rem, 3vw, 1.8rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.4rem); }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent); }
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Layout Helpers ────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }

/* ── Cards / Panels ────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: box-shadow var(--transition-med);
}
.card:hover {
  box-shadow: var(--shadow-glow);
}

.panel {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--color-primary);
  color: #fff;
}
button:hover, .btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
button:active, .btn:active {
  transform: translateY(0);
}
button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
button:disabled, .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-accent  { background: var(--color-accent); color: #0d0d1a; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}
.btn-danger  { background: var(--color-error); }

/* ── Form Elements ─────────────────────────────────────────────────────── */
input, select, textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 0.9rem;
  padding: 0.5rem 0.9rem;
  width: 100%;
  transition: border-color var(--transition-fast);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}
input::placeholder, textarea::placeholder {
  color: var(--color-text-muted);
}

/* ── Badges / Tags ─────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--color-primary);
  color: #fff;
}
.badge-success { background: var(--color-success); }
.badge-warning { background: var(--color-warning); color: #0d0d1a; }
.badge-error   { background: var(--color-error); }
.badge-accent  { background: var(--color-accent); color: #0d0d1a; }

/* ── Progress / Loading ────────────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 999px;
  transition: width var(--transition-med);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Notifications ─────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.2rem;
  color: var(--color-text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 99999;
  font-size: 0.9rem;
  max-width: 360px;
  animation: slideIn 0.25s ease;
}
@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}
.toast--success { border-left: 4px solid var(--color-success); }
.toast--warning { border-left: 4px solid var(--color-warning); }
.toast--error   { border-left: 4px solid var(--color-error); }

/* ── Tables ────────────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th {
  text-align: left;
  padding: 0.7rem 1rem;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-border);
}
td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.025); }

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

/* ── Glow Animations ───────────────────────────────────────────────────── */
.glow-pulse {
  animation: glowPulse 2.5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px var(--color-primary); }
  50%       { box-shadow: 0 0 22px var(--color-primary), 0 0 40px rgba(74,144,226,0.2); }
}

/* ── Accessibility ─────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.1rem; }
  .panel, .card { padding: 1rem; }
  button, .btn { padding: 0.5rem 0.9rem; font-size: 0.8rem; }
}
