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

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Rajdhani', 'Orbitron', system-ui, -apple-system, sans-serif;
  color: #ffffff;
}

/* === APP CONTAINER === */
.app-container {
  position: relative;
  width: 100%;
  height: 100vh;
  background: #0a0c14 url('../style/background/cavern_background.png') center / cover no-repeat fixed;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* === VIGNETTE OVERLAY === */
.vignette-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 20%, rgba(5, 6, 11, 0.5) 60%, rgba(5, 6, 11, 0.8) 100%),
    linear-gradient(180deg, rgba(8, 10, 16, 0.4) 0%, rgba(8, 10, 16, 0.2) 40%, rgba(8, 10, 16, 0.5) 100%);
  pointer-events: none;
  z-index: 1;
}

/* === TOP BAR === */
.top-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(10, 12, 20, 0.92) 0%, rgba(15, 18, 28, 0.88) 100%);
  border-bottom: 2px solid rgba(138, 92, 246, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 30px rgba(138, 92, 246, 0.25);
  backdrop-filter: blur(12px);
}

/* === LOGO SECTION === */
.logo-section {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(106, 76, 255, 0.18), rgba(138, 92, 246, 0.12));
  border: 2px solid rgba(138, 92, 246, 0.35);
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(138, 92, 246, 0.45);
}

.minecart-logo {
  width: 100%;
  height: 100%;
  background: url('../style/minecart_logo.png') center / contain no-repeat;
  filter: drop-shadow(0 4px 14px rgba(245, 158, 11, 0.7));
}

/* === NAVIGATION BUTTONS === */
.nav-buttons {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 600px;
}

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

/* === NEON BUTTON SYSTEM === */
.neon-btn {
  position: relative;
  padding: 14px 20px;
  min-height: 50px;
  background: transparent;
  border: none;
  border-radius: 14px;
  color: #ffffff;
  font-family: 'Rajdhani', 'Orbitron', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 14px rgba(138, 92, 246, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.neon-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 32, 0.7) url('../style/button_frame_normal.png') center / 100% 100% no-repeat;
  border-radius: 14px;
  z-index: -1;
  box-shadow: 0 0 22px rgba(138, 92, 246, 0.65), 0 4px 14px rgba(0, 0, 0, 0.6);
}

.neon-btn:hover::before {
  background-image: url('../style/button_frame_hover.png');
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.85), 0 6px 18px rgba(0, 0, 0, 0.5);
}

.neon-btn:active::before,
.neon-btn.active::before {
  background-image: url('../style/button_frame_active.png');
  box-shadow: 0 0 38px rgba(234, 88, 12, 1), 0 4px 16px rgba(0, 0, 0, 0.6);
}

.neon-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.15);
}

.neon-btn:active,
.neon-btn.active {
  transform: translateY(0) scale(0.98);
  filter: brightness(1.2) saturate(1.3);
}

/* === SAFE MARGIN === */
.safe-margin {
  flex-shrink: 0;
  width: 20%;
  min-width: 150px;
}

/* === CONTENT AREA (55% height) === */
.content-area {
  position: relative;
  z-index: 5;
  flex: 1;
  max-height: 55%;
  padding: 20px;
  overflow-y: auto;
}

.content-placeholder {
  padding: 40px;
  text-align: center;
  opacity: 0.6;
}

.content-placeholder h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content-placeholder p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
}

/* === CHAT PANEL (45% height) === */
.chat-panel {
  position: relative;
  z-index: 10;
  height: 45%;
  padding: 20px;
  flex-shrink: 0;
}

.chat-container {
  width: 100%;
  height: 100%;
  background: rgba(10, 12, 20, 0.88);
  border: 24px solid transparent;
  border-image: url('../style/panel_frame_9slice.png') 24 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  box-shadow:
    0 0 28px rgba(138, 92, 246, 0.45),
    0 12px 40px rgba(0, 0, 0, 0.7),
    inset 0 2px 6px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* === CHAT HEADER === */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(15, 18, 28, 0.95), rgba(20, 24, 36, 0.92));
  border-bottom: 2px solid rgba(138, 92, 246, 0.35);
  flex-shrink: 0;
}

.chat-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #8b5cf6, #6a4cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 8px rgba(138, 92, 246, 0.5);
}

.chat-alerts {
  display: flex;
  gap: 8px;
}

.alert-btn {
  padding: 8px 14px;
  background: rgba(138, 92, 246, 0.2);
  border: 1px solid rgba(138, 92, 246, 0.4);
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.alert-btn:hover {
  background: rgba(138, 92, 246, 0.35);
  border-color: rgba(138, 92, 246, 0.6);
  box-shadow: 0 0 12px rgba(138, 92, 246, 0.4);
}

/* === CHAT MESSAGES === */
.chat-messages {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  background: rgba(8, 10, 16, 0.6);
}

.chat-message {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
  padding: 6px 0;
}

.timestamp {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
  min-width: 45px;
}

.username {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  min-width: 100px;
}

.user-purple { color: #a78bfa; }
.user-gold { color: #fbbf24; }
.user-orange { color: #fb923c; }
.user-cyan { color: #22d3ee; }

.message-text {
  flex: 1;
  font-size: 14px;
  color: #ffffff;
  line-height: 1.4;
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(138, 92, 246, 0.1);
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(138, 92, 246, 0.4);
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(138, 92, 246, 0.6);
}

/* === CHAT INPUT === */
.chat-input-row {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(15, 18, 28, 0.95), rgba(20, 24, 36, 0.92));
  border-top: 2px solid rgba(138, 92, 246, 0.35);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(8, 10, 18, 0.9);
  border: 1px solid rgba(138, 92, 246, 0.4);
  border-radius: 10px;
  color: #ffffff;
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.chat-input:focus {
  border-color: rgba(249, 115, 22, 0.7);
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.4);
}

.send-btn {
  position: relative;
  padding: 12px 28px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-family: 'Rajdhani', 'Orbitron', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
}

.send-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 32, 0.7) url('../style/button_frame_normal.png') center / 100% 100% no-repeat;
  border-radius: 10px;
  z-index: -1;
  box-shadow: 0 0 18px rgba(138, 92, 246, 0.6);
}

.send-btn:hover::before {
  background-image: url('../style/button_frame_hover.png');
  box-shadow: 0 0 26px rgba(245, 158, 11, 0.8);
}

.send-btn:active::before {
  background-image: url('../style/button_frame_active.png');
  box-shadow: 0 0 32px rgba(234, 88, 12, 1);
}

.send-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
}

.send-btn:active {
  transform: scale(0.98);
  filter: brightness(1.25);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .nav-buttons {
    max-width: 500px;
  }

  .neon-btn {
    padding: 12px 16px;
    font-size: 13px;
    min-height: 44px;
  }

  .alert-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
}

@media (max-width: 900px) {
  .chat-alerts {
    flex-wrap: wrap;
  }

  .safe-margin {
    min-width: 100px;
  }
}
