/* ═══════════════════════════════════════════════════════════════════════════════
   OLYMPUS RISING - MOBILE-FIRST RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   BASE MOBILE STYLES (Mobile First - 320px+)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Prevent zoom on input focus (iOS fix) */
input,
select,
textarea,
button {
  font-size: 16px !important; /* iOS won't zoom if font is 16px+ */
}

/* Safe area handling for notched devices */
:root {
  --safe-area-inset-top: env(safe-area-inset-top);
  --safe-area-inset-bottom: env(safe-area-inset-bottom);
  --safe-area-inset-left: env(safe-area-inset-left);
  --safe-area-inset-right: env(safe-area-inset-right);
}

body {
  padding-top: var(--safe-area-inset-top);
  padding-bottom: var(--safe-area-inset-bottom);
  padding-left: var(--safe-area-inset-left);
  padding-right: var(--safe-area-inset-right);
}

/* Touch-friendly button sizes (minimum 44x44px for accessibility) */
button,
.btn,
.nav-item,
.tab-button {
  min-height: 44px;
  min-width: 44px;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
  touch-action: manipulation; /* Prevent double-tap zoom */
}

/* Smooth scrolling areas */
.scrollable,
.inventory-grid,
.skill-tree-container,
.chat-messages {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Prevent text selection on game UI elements */
.game-ui,
.nav-bar,
.header-bar,
.button-group {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Allow text selection in chat and text inputs */
.chat-messages,
input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LOADING SCREEN - Mobile Optimized
   ═══════════════════════════════════════════════════════════════════════════════ */

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a1628 0%, #1a2942 50%, #0a1628 100%);
  display: none; /* Hidden by default */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

#loading-screen.active {
  display: flex; /* Only show when active */
}

#loading-screen.with-background {
  background-image: url('../assets/loading_screen.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#loading-screen.with-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 22, 40, 0.7); /* Dark overlay for readability */
  z-index: 1;
}

#loading-screen .loading-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 400px;
  padding: 20px;
}

#loading-screen .olympus-logo {
  margin-bottom: 40px;
  text-align: center;
}

#loading-screen .logo-image {
  width: 200px;
  max-width: 70vw;
  height: auto;
  filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.4));
  animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% {
    filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.3));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 4px 30px rgba(255, 215, 0, 0.6));
    transform: scale(1.02);
  }
}

#loading-screen .tagline {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  color: #ffd700;
  margin-top: 15px;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

#loading-screen .loading-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

#loading-screen .loading-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
  background-size: 200% 100%;
  animation: loadingShine 1.5s ease-in-out infinite;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

@keyframes loadingShine {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

#loading-screen .loading-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   INTRO CUTSCENE - Mobile Optimized
   ═══════════════════════════════════════════════════════════════════════════════ */

#intro-cutscene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#intro-cutscene video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#intro-cutscene .skip-btn {
  position: absolute;
  top: max(20px, var(--safe-area-inset-top, 20px));
  right: max(20px, var(--safe-area-inset-right, 20px));
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  z-index: 10001;
  backdrop-filter: blur(10px);
  min-height: 44px;
  min-width: 80px;
}

#intro-cutscene .cutscene-hint {
  position: absolute;
  bottom: max(40px, var(--safe-area-inset-bottom, 40px));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CURRENCY & RESOURCE ICONS - Use Actual Assets
   ═══════════════════════════════════════════════════════════════════════════════ */

.currency-icon-img,
.resource-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.currency-display .currency-icon-img {
  width: 24px;
  height: 24px;
}

.stat-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   NAVIGATION BAR - Mobile First
   ═══════════════════════════════════════════════════════════════════════════════ */

.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(13, 31, 51, 0.95) 0%, rgba(10, 22, 40, 0.98) 100%);
  backdrop-filter: blur(20px);
  padding: 8px 0 max(8px, var(--safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 12px;
  position: relative;
  flex: 1;
  max-width: 80px;
}

.nav-item:active {
  transform: scale(0.95);
  background: rgba(255, 215, 0, 0.1);
}

.nav-item.active {
  background: rgba(255, 215, 0, 0.15);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
  border-radius: 0 0 3px 3px;
}

.nav-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transition: all 0.3s ease;
}

.nav-item.active .nav-icon-img {
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
  transform: scale(1.1);
}

.nav-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.nav-item.active .nav-label {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.5);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 2px 15px rgba(255, 0, 0, 0.8);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   GAME HEADER - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */

.game-header {
  padding: max(12px, var(--safe-area-inset-top)) 12px 12px !important;
  gap: 8px;
  min-height: 72px;
}

.game-header .header-left {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px !important;
  flex: 1;
  min-width: 0;
}

.game-header .header-right {
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start !important;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.game-header .player-info {
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  max-width: 100%;
}

.game-header .player-avatar {
  width: 40px !important;
  height: 40px !important;
  flex-shrink: 0;
}

.game-header .player-details {
  min-width: 0;
  overflow: hidden;
}

.game-header .player-name {
  font-size: 14px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-header .level-badge {
  font-size: 12px !important;
}

.game-header .xp-bar {
  min-width: 120px;
  max-width: 200px;
}

.game-header .currency {
  font-size: 13px !important;
  padding: 6px 10px !important;
  gap: 6px !important;
  display: flex !important;
  align-items: center !important;
}

.game-header .currency .currency-icon-img {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  vertical-align: baseline !important; /* Fix alignment issue */
}

.game-header .currency .currency-icon {
  font-size: 20px !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0 !important;
}

.game-header .currency-amount {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 20px !important; /* Match icon height */
  display: flex !important;
  align-items: center !important;
}

/* Fix add button size */
.game-header .add-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  font-size: 20px !important;
  line-height: 1 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Fix currency items in dropdown */
.currency-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px !important;
}

.currency-item .currency-icon-img,
.currency-item .currency-icon {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.currency-item .currency-name {
  flex: 1 !important;
  font-size: 14px !important;
}

.currency-item .currency-value {
  font-size: 14px !important;
  font-weight: 600 !important;
}

.game-header .music-btn,
.game-header .settings-btn {
  width: 36px !important;
  height: 36px !important;
  padding: 6px !important;
  font-size: 18px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CHARACTER SHEET - Mobile Fixes for Number Overflow
   ═══════════════════════════════════════════════════════════════════════════════ */

.character-sheet .attr-header {
  gap: 8px;
  flex-wrap: wrap;
}

.character-sheet .attr-total {
  font-size: 1.2rem !important;
  max-width: 80px;
  text-align: right;
  word-break: keep-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.character-sheet .attr-breakdown {
  width: 100%;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.65rem !important;
}

.character-sheet .stat-value {
  max-width: 100px;
  word-break: keep-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.character-sheet .stat-row {
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
}

.character-sheet .stat-row > *:first-child {
  flex: 1;
  min-width: 0;
}

.character-sheet .stat-row > *:last-child {
  flex-shrink: 0;
  text-align: right;
}

.character-sheet .cs-resource {
  min-width: 70px;
  flex: 1;
}

.character-sheet .resource-value {
  font-size: 1.2rem !important;
  word-break: break-all;
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.1);
  border: 2px solid rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.header-icon-btn:active {
  transform: scale(0.9);
  background: rgba(255, 215, 0, 0.2);
}

.header-icon-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SCREEN CONTAINER - Mobile First
   ═══════════════════════════════════════════════════════════════════════════════ */

.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  display: flex; /* Use flex to maintain centering for auth screen */
  flex-direction: column;
}

.screen-content {
  padding: calc(60px + var(--safe-area-inset-top)) 16px calc(80px + var(--safe-area-inset-bottom)) 16px;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   AUTH SCREEN - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */

#auth-screen {
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#auth-screen .auth-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

#auth-screen .auth-header {
  margin-bottom: 24px;
}

#auth-screen .auth-logo {
  max-width: 200px;
  margin: 0 auto 16px;
}

#auth-screen .form-group {
  margin-bottom: 16px;
}

#auth-screen input {
  font-size: 16px !important; /* Prevent iOS zoom */
  padding: 12px;
}

#auth-screen .btn {
  min-height: 48px; /* Touch-friendly */
  font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CHARACTER CREATION - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */

#character-creation-screen {
  padding: 20px;
  overflow-y: auto;
}

#character-creation-screen .creation-header {
  margin-bottom: 20px;
}

#character-creation-screen .creation-steps {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

#character-creation-screen .step {
  min-width: 50px;
}

#character-creation-screen .step-number {
  width: 32px !important;
  height: 32px !important;
  font-size: 14px;
}

#character-creation-screen input,
#character-creation-screen select,
#character-creation-screen button {
  font-size: 16px !important; /* Prevent iOS zoom */
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESOURCE BARS - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */

.resource-bars {
  padding: 8px 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-bar {
  min-width: 0;
  flex: 1 1 auto;
}

.resource-bar .resource-icon-img {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

.resource-bar .bar-container {
  min-width: 80px;
  flex: 1;
}

.resource-bar .resource-text {
  font-size: 12px !important;
  white-space: nowrap;
  min-width: 60px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BOTTOM NAVIGATION - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */

.game-nav {
  padding: max(8px, var(--safe-area-inset-bottom)) 8px;
  gap: 4px;
}

.nav-btn {
  flex: 1;
  min-width: 0;
  padding: 6px 2px !important; /* Reduced from 4px */
  gap: 3px !important; /* Reduced from 4px */
}

.nav-btn .nav-icon-img {
  width: 24px !important; /* Reduced from 26px */
  height: 24px !important;
}

.nav-btn .nav-label {
  font-size: 9.5px !important; /* Reduced slightly */
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  display: block !important;
}

.nav-btn .nav-badge {
  top: 4px !important;
  right: 4px !important;
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  padding: 2px 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MODALS & OVERLAYS - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */

.modal-overlay {
  padding: 16px;
  align-items: center;
  justify-content: center;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  margin: 0;
  overflow-y: auto;
}

.modal-header {
  padding: 16px;
  gap: 12px;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(85vh - 120px);
}

.modal-close {
  width: 36px !important;
  height: 36px !important;
  font-size: 24px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CHAT BAR - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */

.chat-bar {
  max-height: 60px;
  padding: 8px 12px;
}

.chat-bar-collapsed {
  gap: 8px;
}

.chat-channel-indicator {
  width: 32px;
  height: 32px;
  font-size: 18px;
  flex-shrink: 0;
}

.chat-scroll-area {
  font-size: 13px;
  line-height: 1.4;
}

.chat-bar-expanded {
  max-height: 50vh;
}

.chat-messages {
  max-height: calc(50vh - 120px);
  padding: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   WELCOME CARD & HOME SCREEN OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */
.welcome-card {
  padding: 16px !important;
  margin-bottom: 16px !important;
}

.welcome-card h2 {
  font-size: 1.2rem !important;
  line-height: 1.3 !important;
  margin-bottom: 8px !important;
  word-wrap: break-word !important;
}

.welcome-card .god-blessing {
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
}

.welcome-card .god-blessing strong {
  display: inline-block !important;
  max-width: 100% !important;
  word-wrap: break-word !important;
}

.idle-rewards-card {
  padding: 16px !important;
  margin-bottom: 16px !important;
}

.idle-rewards-card h3 {
  font-size: 1rem !important;
  margin-bottom: 12px !important;
}

.idle-rewards-card p {
  font-size: 0.85rem !important;
  margin-bottom: 8px !important;
}

.idle-earnings {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin: 12px 0 !important;
  font-size: 0.9rem !important;
}

.daily-login-banner {
  padding: 12px !important;
  font-size: 0.9rem !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: center !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   STAT ALLOCATION MODAL - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */
.allocation-modal {
  padding: 16px !important;
}

.allocation-modal h2 {
  font-size: 1.2rem !important;
  margin-bottom: 12px !important;
}

.allocation-grid {
  gap: 12px !important;
  margin: 16px 0 !important;
}

.allocation-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px !important;
  background: rgba(0, 0, 0, 0.2) !important;
  border-radius: 8px !important;
  gap: 12px !important;
}

.allocation-stat {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.allocation-stat .stat-icon {
  font-size: 20px !important;
  flex-shrink: 0 !important;
}

.allocation-stat .stat-name {
  font-size: 14px !important;
  font-weight: 600 !important;
}

.allocation-controls {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.allocation-btn {
  width: 32px !important;
  height: 32px !important;
  font-size: 20px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.allocation-value {
  min-width: 50px !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

.pending-value {
  color: #4ade80 !important;
  font-size: 14px !important;
  margin-left: 4px !important;
}

.allocation-info {
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  margin: 16px 0 !important;
  padding: 12px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px !important;
}

.allocation-info p {
  margin: 6px 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PATH SCREEN - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */
.paths-container {
  padding: 12px !important;
}

.god-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 16px !important;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(218, 165, 32, 0.1)) !important;
  border-radius: 12px !important;
  margin-bottom: 16px !important;
}

.god-header .god-icon {
  font-size: 48px !important;
  flex-shrink: 0 !important;
}

.god-header .god-info h3 {
  font-size: 1.1rem !important;
  margin-bottom: 4px !important;
}

.god-header .god-info p {
  font-size: 0.85rem !important;
  opacity: 0.8 !important;
}

.innate-passives {
  margin-bottom: 20px !important;
}

.innate-passives h4 {
  font-size: 1rem !important;
  margin-bottom: 12px !important;
}

.passives-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.passive-card {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding: 12px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.passive-card .passive-icon {
  font-size: 24px !important;
  flex-shrink: 0 !important;
}

.passive-card .passive-info {
  flex: 1 !important;
  min-width: 0 !important;
}

.passive-card .passive-info strong {
  font-size: 14px !important;
  display: block !important;
  margin-bottom: 4px !important;
}

.passive-card .passive-info p {
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
  opacity: 0.9 !important;
}

.path-selection h4 {
  font-size: 1rem !important;
  margin-bottom: 8px !important;
}

.path-hint {
  font-size: 0.85rem !important;
  opacity: 0.8 !important;
  margin-bottom: 16px !important;
}

.paths-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.path-card {
  padding: 16px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 2px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.path-card.selected {
  border-color: #ffd700 !important;
  background: rgba(255, 215, 0, 0.1) !important;
}

.path-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
  flex-wrap: wrap !important;
}

.path-header .path-icon {
  font-size: 32px !important;
  flex-shrink: 0 !important;
}

.path-header h5 {
  font-size: 1.1rem !important;
  flex: 1 !important;
  margin: 0 !important;
}

.archetype-badge {
  font-size: 0.75rem !important;
  padding: 4px 8px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
}

.path-desc {
  font-size: 0.9rem !important;
  line-height: 1.4 !important;
  margin-bottom: 8px !important;
}

.path-theme {
  font-size: 0.85rem !important;
  opacity: 0.7 !important;
  margin-bottom: 12px !important;
}

.path-stats,
.path-progress {
  font-size: 0.85rem !important;
  opacity: 0.9 !important;
  margin-top: 8px !important;
}

.selected-badge {
  display: inline-block !important;
  margin-top: 8px !important;
  padding: 6px 12px !important;
  background: #ffd700 !important;
  color: #1a1a1a !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CHAT - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */
.chat-container {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.chat-messages-container {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 12px !important;
  min-height: 0 !important;
}

.chat-message {
  margin-bottom: 12px !important;
  font-size: 0.9rem !important;
  line-height: 1.4 !important;
}

.chat-input-area {
  display: flex !important;
  gap: 8px !important;
  padding: 12px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  flex-shrink: 0 !important;
}

#chat-input {
  flex: 1 !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  min-width: 0 !important;
}

#chat-input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

.send-btn,
#send-chat-btn {
  padding: 10px 16px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.channel-tabs {
  display: flex !important;
  gap: 4px !important;
  padding: 8px !important;
  background: rgba(0, 0, 0, 0.2) !important;
  overflow-x: auto !important;
  flex-shrink: 0 !important;
}

.channel-tab {
  padding: 8px 12px !important;
  font-size: 0.85rem !important;
  white-space: nowrap !important;
  border-radius: 6px !important;
}

.chat-input {
  font-size: 16px !important; /* Prevent iOS zoom */
  padding: 10px 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   INVENTORY & GEAR - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */

.inventory-grid,
.gear-grid {
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  padding: 12px;
}

.item-card,
.gear-slot {
  min-height: 80px;
  padding: 8px;
}

.item-icon,
.gear-icon {
  width: 48px !important;
  height: 48px !important;
}

.item-name,
.gear-name {
  font-size: 11px !important;
  line-height: 1.2;
}

.item-stats,
.gear-stats {
  font-size: 10px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SKILLS & ABILITIES - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */

.skill-tree,
.abilities-grid {
  padding: 12px;
  gap: 12px;
}

.skill-node,
.ability-card {
  min-width: 70px;
  padding: 8px;
}

.skill-icon,
.ability-icon {
  width: 44px !important;
  height: 44px !important;
}

.skill-name,
.ability-name {
  font-size: 12px !important;
}

.skill-description,
.ability-description {
  font-size: 11px !important;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   WORLD MAP & ZONES - Mobile Optimizations
   ═══════════════════════════════════════════════════════════════════════════════ */

.zone-grid,
.adventure-zones {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
}

.zone-card {
  padding: 16px;
}

.zone-image {
  height: 120px;
  border-radius: 8px;
}

.zone-title {
  font-size: 16px !important;
}

.zone-description {
  font-size: 13px !important;
  line-height: 1.4;
}

.zone-stats {
  flex-wrap: wrap;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Small phones (up to 374px) */
@media (max-width: 374px) {
  .header-bar {
    padding: max(6px, var(--safe-area-inset-top)) 8px 6px;
  }

  .currency-display {
    padding: 4px 8px;
    font-size: 12px;
  }

  .currency-icon-img {
    width: 18px;
    height: 18px;
  }

  .nav-icon-img {
    width: 24px;
    height: 24px;
  }

  .nav-label {
    font-size: 10px;
  }
}

/* Larger phones (375px - 767px) - default styles already optimized */

/* Tablets (768px - 1023px) */
@media (min-width: 768px) {
  .screen-content {
    max-width: 700px;
    margin: 0 auto;
    padding: calc(70px + var(--safe-area-inset-top)) 24px calc(90px + var(--safe-area-inset-bottom)) 24px;
  }

  .header-bar {
    padding: max(12px, var(--safe-area-inset-top)) 24px 12px;
  }

  .nav-bar {
    max-width: 700px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px 20px 0 0;
  }

  .currency-display {
    font-size: 14px;
    padding: 8px 14px;
  }

  .nav-icon-img {
    width: 32px;
    height: 32px;
  }

  .nav-label {
    font-size: 12px;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .screen-content {
    max-width: 900px;
    padding: calc(80px + var(--safe-area-inset-top)) 40px calc(100px + var(--safe-area-inset-bottom)) 40px;
  }

  .header-bar {
    max-width: 900px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 20px 20px;
  }

  .nav-bar {
    max-width: 900px;
  }

  .nav-item:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
  }

  .currency-display:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.05);
  }

  .header-icon-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.1);
  }
}

/* Landscape mode on phones */
@media (max-height: 500px) and (orientation: landscape) {
  .screen-content {
    padding: 60px 16px 70px 16px;
  }

  .header-bar {
    padding: 6px 12px;
  }

  .nav-bar {
    padding: 6px 0 6px;
  }

  .nav-item {
    flex-direction: row;
    gap: 6px;
    padding: 6px 10px;
  }

  .nav-label {
    font-size: 11px;
  }
}
