/* Modern Liquid Glass / Glassmorphism Stylesheet - Crimson & Ruby Theme */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --crimson-500: #f43f5e;
  --crimson-600: #e11d48;
  --crimson-700: #be123c;
  --crimson-800: #9f1239;
  --crimson-900: #881337;
  --crimson-glow: rgba(225, 29, 72, 0.45);
  --crimson-glow-soft: rgba(225, 29, 72, 0.18);
  --crimson-border: rgba(244, 63, 94, 0.32);

  --glass-bg: rgba(14, 10, 16, 0.72);
  --glass-bg-subtle: rgba(25, 16, 23, 0.55);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-hover: rgba(244, 63, 94, 0.38);
  --glass-shadow: 0 18px 45px -10px rgba(0, 0, 0, 0.7), 0 0 30px rgba(190, 18, 60, 0.12);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
}

body {
  font-family: var(--font-sans);
  background-color: #060307;
  color: #f8fafc;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Liquid Glass Mesh-Gradient Orbs (Ruby & Crimson Accents) */
body::before {
  content: '';
  position: fixed;
  top: -12%;
  left: 12%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.18) 0%, rgba(190, 18, 60, 0.08) 45%, rgba(0, 0, 0, 0) 75%);
  border-radius: 50%;
  filter: blur(95px);
  pointer-events: none;
  z-index: 0;
  animation: pulse-slow 12s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  bottom: -15%;
  right: 8%;
  width: 750px;
  height: 750px;
  background: radial-gradient(circle, rgba(190, 18, 60, 0.22) 0%, rgba(136, 19, 55, 0.12) 50%, rgba(0, 0, 0, 0) 75%);
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  animation: pulse-slow 16s ease-in-out infinite alternate-reverse;
}

.ambient-orb-3 {
  position: fixed;
  top: 45%;
  left: 65%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.12) 0%, rgba(159, 18, 57, 0.06) 40%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

@keyframes pulse-slow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.8; }
  50% { transform: scale(1.08) translate(20px, -15px); opacity: 1; }
  100% { transform: scale(0.95) translate(-15px, 20px); opacity: 0.85; }
}

/* Liquid Glass Panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
  border-radius: 1.1rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-panel-hover:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.75), 0 0 25px rgba(225, 29, 72, 0.25);
}

.glass-header {
  background: rgba(14, 9, 16, 0.82);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.45);
}

.glass-card {
  background: var(--glass-bg-subtle);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.glass-card:hover {
  background: rgba(36, 22, 33, 0.65);
  border-color: rgba(244, 63, 94, 0.28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 18px rgba(225, 29, 72, 0.15);
}

.glass-input {
  background: rgba(20, 13, 22, 0.7) !important;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
  transition: all 0.2s ease;
}

.glass-input:focus {
  border-color: rgba(244, 63, 94, 0.65) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.22), 0 0 15px rgba(225, 29, 72, 0.25) !important;
}

/* Liquid Glass Buttons - Crimson & Ruby */
.glass-button-primary {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.92), rgba(190, 18, 60, 0.98));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 18px rgba(225, 29, 72, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.glass-button-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(225, 29, 72, 0.6), 0 0 15px rgba(244, 63, 94, 0.4);
}

.glass-button-primary:active {
  transform: translateY(0);
}

.glass-button-secondary {
  background: rgba(30, 20, 28, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  transition: all 0.15s ease;
}

.glass-button-secondary:hover {
  background: rgba(45, 28, 41, 0.8);
  border-color: rgba(244, 63, 94, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.glass-button-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.85), rgba(185, 28, 28, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.glass-button-danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.55);
}

.glass-badge {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.font-mono-code {
  font-family: var(--font-mono);
}

/* Nav Tab Active Styling - Glowing Ruby Pill */
.nav-tab-active {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.28), rgba(190, 18, 60, 0.36)) !important;
  border-color: rgba(244, 63, 94, 0.5) !important;
  color: #ffe4e6 !important;
  box-shadow: 0 0 16px rgba(225, 29, 72, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Terminal & Console - Dark Liquid Glass with Crimson Accent */
.terminal-window {
  background: rgba(9, 6, 12, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(244, 63, 94, 0.25);
  font-family: var(--font-mono);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.85), 0 0 25px rgba(225, 29, 72, 0.08);
}

.terminal-header {
  background: rgba(18, 11, 20, 0.85);
  border-bottom: 1px solid rgba(244, 63, 94, 0.2);
}

/* Custom Scrollbars in Ruby Accent */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 7, 12, 0.85);
}

::-webkit-scrollbar-thumb {
  background: rgba(190, 18, 60, 0.45);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(225, 29, 72, 0.75);
  box-shadow: 0 0 8px rgba(225, 29, 72, 0.5);
}

.terminal-scroll::-webkit-scrollbar {
  width: 6px;
}
.terminal-scroll::-webkit-scrollbar-track {
  background: rgba(8, 5, 10, 0.9);
}
.terminal-scroll::-webkit-scrollbar-thumb {
  background: rgba(225, 29, 72, 0.4);
  border-radius: 3px;
}
.terminal-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(244, 63, 94, 0.7);
}

/* xterm.js styling overrides for Crimson theme */
.xterm {
  padding: 8px;
}
.xterm .xterm-viewport {
  background-color: transparent !important;
}
.xterm .xterm-cursor-bar,
.xterm .xterm-cursor-block {
  background-color: #f43f5e !important;
  color: #000 !important;
}

/* Minecraft Inventory Slot Grid */
.mc-slot {
  width: 44px;
  height: 44px;
  background-color: rgba(110, 110, 110, 0.85);
  border-top: 2px solid #2b2b2b;
  border-left: 2px solid #2b2b2b;
  border-right: 2px solid #e2e8f0;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.mc-slot:hover {
  filter: brightness(1.22);
  transform: scale(1.05);
  cursor: pointer;
}

.mc-slot-active {
  outline: 2px solid #f43f5e;
  outline-offset: 1px;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.6);
}

.mc-slot-armor {
  background-color: rgba(80, 70, 85, 0.85);
}

.mc-item-count {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 0px #000, -1px -1px 0px #000, 1px -1px 0px #000, -1px 1px 0px #000;
  pointer-events: none;
}

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

/* Mobile Utilities & Responsive Optimizations */
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

button, select, input, a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 640px) {
  .glass-panel {
    border-radius: 0.85rem;
  }
  .glass-card {
    border-radius: 0.75rem;
  }
}

@media (max-width: 480px) {
  .mc-slot {
    width: 34px;
    height: 34px;
  }
  .mc-slot-armor {
    width: 34px;
    height: 34px;
  }
  .mc-item-count {
    font-size: 9px;
    bottom: 0;
    right: 1px;
  }
}
