/* ===========================================
   OLYMPUS RISING - Component Styles
   =========================================== */

/* ===========================================
   BUTTONS
   Mobile-optimized with 48px minimum touch targets
   =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 20px;
  min-height: 48px; /* Minimum touch target */
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  /* Prevent text selection on long press */
  -webkit-user-select: none;
  user-select: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
  background: var(--gradient-gold);
  color: var(--color-night-black);
  border-color: var(--color-olympus-gold);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.97);
  box-shadow: var(--shadow-glow);
}

/* Secondary Button */
.btn-secondary {
  background: transparent;
  color: var(--color-marble-cream);
  border-color: var(--color-olympus-gold-dark);
}

.btn-secondary:active:not(:disabled) {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--color-olympus-gold);
  color: var(--color-olympus-gold);
}

/* Danger Button */
.btn-danger {
  background: var(--color-blood-red);
  color: var(--color-marble-cream);
  border-color: var(--color-blood-red);
}

.btn-danger:active:not(:disabled) {
  background: #A00000;
  box-shadow: 0 0 15px rgba(139, 0, 0, 0.5);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--color-olympus-gold);
  border-color: transparent;
  min-height: 44px;
}

.btn-ghost:active:not(:disabled) {
  background: rgba(212, 175, 55, 0.1);
}

/* Button Sizes */
.btn-sm {
  padding: 10px 14px;
  min-height: 40px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 16px 28px;
  min-height: 56px;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

/* Glow Effect */
.btn-glow {
  animation: glow 2s ease-in-out infinite;
}

.btn-glow:hover {
  animation: none;
  box-shadow: 0 0 20px var(--color-olympus-gold),
              0 0 40px rgba(212, 175, 55, 0.5);
}

/* ===========================================
   FORM ELEMENTS
   =========================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--color-olympus-gold);
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  padding: var(--space-md);
  background: var(--color-aegean-blue-dark);
  border: 1px solid var(--color-aegean-blue);
  border-radius: var(--radius-md);
  color: var(--color-marble-cream);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-olympus-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

input::placeholder,
textarea::placeholder {
  color: rgba(250, 248, 240, 0.4);
}

/* Checkbox & Radio */
.checkbox-group,
.radio-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.checkbox-input,
.radio-input {
  width: 20px;
  height: 20px;
  accent-color: var(--color-olympus-gold);
}

/* ===========================================
   AUTH FORM ENHANCEMENTS
   =========================================== */

/* Field hints */
.field-hint {
  font-size: 0.75rem;
  color: rgba(250, 248, 240, 0.5);
  margin-top: -4px;
}

/* Field errors */
.field-error {
  font-size: 0.75rem;
  color: #ff6b6b;
  min-height: 1em;
  margin-top: 2px;
}

/* Form-level error */
.form-error {
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: var(--radius-sm);
  color: #ff6b6b;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: var(--space-md);
  display: none;
}

.form-error:not(:empty) {
  display: block;
}

/* Input error state */
input.input-error,
textarea.input-error,
select.input-error {
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.05);
}

input.input-error:focus {
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

/* Password input wrapper */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  flex: 1;
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 5px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toggle-password:hover {
  opacity: 1;
}

/* Password strength indicator */
.password-strength {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: 4px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  background: #666;
  border-radius: 2px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
  font-size: 0.7rem;
  color: #666;
  white-space: nowrap;
  min-width: 100px;
  text-align: right;
}

/* Form options row */
.form-options {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--color-marble-cream);
  opacity: 0.8;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-olympus-gold);
  cursor: pointer;
}

.forgot-password {
  font-size: 0.8rem;
  color: var(--color-olympus-gold);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.forgot-password:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Full width button */
.btn-block {
  width: 100%;
}

/* ===========================================
   CARDS
   =========================================== */
.card {
  background: linear-gradient(180deg, 
    rgba(30, 58, 95, 0.8) 0%, 
    rgba(13, 31, 51, 0.9) 100%
  );
  border: 1px solid var(--color-olympus-gold-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
}

.card:hover {
  border-color: var(--color-olympus-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--color-olympus-gold-dark);
}

.card-header h3 {
  font-size: 1rem;
  margin: 0;
}

.card-body {
  padding: var(--space-md);
}

.card-footer {
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--color-olympus-gold-dark);
}

/* Quest Card */
.quest-card {
  display: flex;
  align-items: stretch;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-aegean-blue);
  border: 1px solid var(--color-olympus-gold-dark);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.quest-card:hover {
  border-color: var(--color-olympus-gold);
  background: rgba(212, 175, 55, 0.1);
}

.quest-card.completed {
  opacity: 0.6;
  border-color: var(--color-laurel-green);
}

.quest-icon {
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.quest-info {
  flex: 1;
  min-width: 0;
}

.quest-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-xs);
}

.quest-desc {
  font-size: 0.85rem;
  color: var(--color-marble-cream);
  opacity: 0.8;
  margin-bottom: var(--space-sm);
}

.quest-progress {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--color-aegean-blue-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-gold);
  transition: width var(--transition-normal);
}

.progress-text {
  font-size: 0.75rem;
  color: var(--color-marble-cream);
  min-width: 40px;
  text-align: right;
}

.quest-rewards {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-xs);
}

.reward-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8rem;
  color: var(--color-olympus-gold);
}

/* Story Card */
.story-card {
  background: linear-gradient(135deg, 
    rgba(30, 58, 95, 0.9) 0%, 
    rgba(74, 14, 78, 0.4) 100%
  );
  border: 2px solid var(--color-olympus-gold-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-normal);
}

.story-card:hover {
  border-color: var(--color-olympus-gold);
  box-shadow: var(--shadow-divine);
}

.story-image {
  height: 120px;
  background: var(--gradient-olympus);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.story-chapter {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: rgba(0, 0, 0, 0.6);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--color-olympus-gold);
}

.story-icon {
  font-size: 3rem;
}

.story-content {
  padding: var(--space-md);
}

.story-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-sm);
}

.story-desc {
  font-size: 0.9rem;
  color: var(--color-marble-cream);
  opacity: 0.9;
  margin-bottom: var(--space-md);
}

.story-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-badge {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-display);
  text-transform: uppercase;
}

.status-badge.available {
  background: rgba(53, 94, 59, 0.3);
  color: var(--color-laurel-green);
  border: 1px solid var(--color-laurel-green);
}

.status-badge.locked {
  background: rgba(139, 0, 0, 0.3);
  color: var(--color-blood-red);
  border: 1px solid var(--color-blood-red);
}

.status-badge.completed {
  background: rgba(212, 175, 55, 0.2);
  color: var(--color-olympus-gold);
  border: 1px solid var(--color-olympus-gold);
}

/* ===========================================
   SKILL TREE
   =========================================== */
.skill-tree {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-md);
}

.skill-tier {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  position: relative;
}

.skill-tier::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -var(--space-lg);
  width: 2px;
  height: var(--space-lg);
  background: var(--color-olympus-gold-dark);
}

.skill-tier:first-child::before {
  display: none;
}

.skill-node {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-round);
  background: var(--color-aegean-blue);
  border: 3px solid var(--color-aegean-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.skill-node:hover {
  transform: scale(1.05);
  border-color: var(--color-olympus-gold-dark);
}

.skill-node.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.skill-node.unlocked {
  border-color: var(--color-olympus-gold);
  box-shadow: var(--shadow-glow);
}

.skill-node.equipped {
  border-color: var(--color-laurel-green);
  box-shadow: 0 0 15px var(--color-laurel-green);
}

.skill-node .skill-icon {
  font-size: 1.8rem;
}

.skill-node .skill-level {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: var(--color-olympus-gold);
  color: var(--color-night-black);
  width: 20px;
  height: 20px;
  border-radius: var(--radius-round);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Skill Tooltip */
.skill-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid var(--color-olympus-gold);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  width: 200px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
}

.skill-node:hover .skill-tooltip {
  opacity: 1;
  visibility: visible;
}

.skill-tooltip h4 {
  font-size: 0.9rem;
  margin-bottom: var(--space-xs);
}

.skill-tooltip p {
  font-size: 0.8rem;
  margin-bottom: var(--space-sm);
  color: var(--color-marble-cream);
}

.skill-tooltip .skill-stats {
  font-size: 0.75rem;
  color: var(--color-olympus-gold-light);
}

/* ===========================================
   TABS
   =========================================== */
.tabs {
  display: flex;
  background: var(--color-aegean-blue-dark);
  border-radius: var(--radius-md);
  padding: var(--space-xs);
  margin-bottom: var(--space-md);
}

.tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: none;
  color: var(--color-marble-cream);
  font-family: var(--font-display);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border-radius: var(--radius-sm);
}

.tab:hover {
  background: rgba(212, 175, 55, 0.1);
}

.tab.active {
  background: var(--color-olympus-gold);
  color: var(--color-night-black);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* ===========================================
   LISTS
   =========================================== */
.list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-aegean-blue);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.list-item:hover {
  border-color: var(--color-olympus-gold-dark);
}

.list-item.selected {
  border-color: var(--color-olympus-gold);
  background: rgba(212, 175, 55, 0.1);
}

.list-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  background: var(--color-aegean-blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.list-content {
  flex: 1;
  min-width: 0;
}

.list-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--color-marble-cream);
}

.list-subtitle {
  font-size: 0.8rem;
  color: var(--color-marble-cream);
  opacity: 0.7;
}

.list-action {
  flex-shrink: 0;
}

/* ===========================================
   STATS DISPLAY
   =========================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  background: var(--color-aegean-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.stat-info {
  flex: 1;
}

.stat-name {
  font-size: 0.75rem;
  color: var(--color-marble-cream);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-olympus-gold);
}

/* ===========================================
   ALLIANCE COMPONENTS
   =========================================== */
.alliance-card {
  background: var(--color-aegean-blue);
  border: 1px solid var(--color-olympus-gold-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.alliance-card:hover {
  border-color: var(--color-olympus-gold);
}

.alliance-emblem {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--gradient-olympus);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 2px solid var(--color-olympus-gold-dark);
}

.alliance-info {
  flex: 1;
}

.alliance-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-xs);
}

.alliance-stats {
  display: flex;
  gap: var(--space-md);
  font-size: 0.8rem;
  color: var(--color-marble-cream);
}

/* ===========================================
   BATTLE PASS
   =========================================== */
.battle-pass-track {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding: var(--space-md) 0;
  -webkit-overflow-scrolling: touch;
}

.bp-tier {
  flex-shrink: 0;
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.bp-tier-number {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--color-olympus-gold);
}

.bp-reward {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--color-aegean-blue);
  border: 2px solid var(--color-aegean-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition-fast);
}

.bp-reward.free {
  border-color: var(--color-olympus-gold-dark);
}

.bp-reward.premium {
  border-color: var(--color-divine-purple);
  background: linear-gradient(135deg, 
    var(--color-aegean-blue) 0%, 
    rgba(74, 14, 78, 0.5) 100%
  );
}

.bp-reward.claimed {
  opacity: 0.5;
  border-color: var(--color-laurel-green);
}

.bp-reward.current {
  border-color: var(--color-olympus-gold);
  box-shadow: var(--shadow-glow);
}

/* ===========================================
   HOME VIEW COMPONENTS
   =========================================== */
.home-welcome {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.home-welcome h2 {
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
}

.home-welcome p {
  font-family: var(--font-accent);
  color: var(--color-marble-cream);
  opacity: 0.8;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--color-aegean-blue);
  border: 1px solid var(--color-olympus-gold-dark);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-btn:hover {
  border-color: var(--color-olympus-gold);
  transform: translateY(-2px);
}

.action-icon {
  font-size: 2rem;
}

.action-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--color-marble-cream);
}

/* Idle Collection */
.idle-collection {
  background: linear-gradient(135deg, 
    rgba(53, 94, 59, 0.3) 0%, 
    rgba(30, 58, 95, 0.5) 100%
  );
  border: 1px solid var(--color-laurel-green);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.idle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.idle-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-laurel-green);
}

.idle-time {
  font-size: 0.8rem;
  color: var(--color-marble-cream);
}

.idle-rewards {
  display: flex;
  gap: var(--space-lg);
}

.idle-reward {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.idle-reward .icon {
  font-size: 1.2rem;
}

.idle-reward .amount {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-olympus-gold);
}

/* ===========================================
   LEADERBOARD
   =========================================== */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-aegean-blue);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.leaderboard-item.top-3 {
  border-color: var(--color-olympus-gold);
  background: linear-gradient(135deg, 
    rgba(212, 175, 55, 0.1) 0%, 
    var(--color-aegean-blue) 100%
  );
}

.leaderboard-item.self {
  border-color: var(--color-divine-purple);
}

.rank {
  width: 30px;
  font-family: var(--font-display);
  font-size: 1rem;
  text-align: center;
}

.rank-1 { color: #FFD700; }
.rank-2 { color: #C0C0C0; }
.rank-3 { color: #CD7F32; }

.leaderboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  background: var(--color-aegean-blue-dark);
  border: 2px solid var(--color-olympus-gold-dark);
}

.leaderboard-info {
  flex: 1;
}

.leaderboard-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-marble-cream);
}

.leaderboard-alliance {
  font-size: 0.75rem;
  color: var(--color-marble-cream);
  opacity: 0.7;
}

.leaderboard-score {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-olympus-gold);
}

/* ===========================================
   VIP BADGE
   =========================================== */
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 2px var(--space-sm);
  background: linear-gradient(135deg, #8B4513, #D4AF37);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--color-night-black);
}

.vip-badge.vip-1 { background: linear-gradient(135deg, #8B4513, #CD7F32); }
.vip-badge.vip-2 { background: linear-gradient(135deg, #4682B4, #87CEEB); }
.vip-badge.vip-3 { background: linear-gradient(135deg, #9932CC, #DA70D6); }
.vip-badge.vip-4 { background: linear-gradient(135deg, #B8860B, #FFD700); }
.vip-badge.vip-5 { background: linear-gradient(135deg, #DC143C, #FF6347); }

/* ===========================================
   DAMAGE NUMBERS (Combat Animation)
   =========================================== */
.damage-number {
  position: absolute;
  font-family: var(--font-display);
  font-weight: bold;
  pointer-events: none;
  animation: damageFloat 1s ease-out forwards;
}

.damage-number.damage {
  color: #FF6B6B;
}

.damage-number.heal {
  color: #4ADE80;
}

.damage-number.critical {
  color: #FFD700;
  font-size: 1.5em;
  text-shadow: 0 0 10px #FFD700;
}

@keyframes damageFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-30px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
  }
}

/* ===========================================
   EMPTY STATE
   =========================================== */
.empty-state {
  text-align: center;
  padding: var(--space-xxl) var(--space-lg);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-sm);
}

.empty-message {
  font-size: 0.9rem;
  color: var(--color-marble-cream);
  opacity: 0.7;
  margin-bottom: var(--space-lg);
}

/* ===========================================
   TOAST NOTIFICATIONS
   =========================================== */
#toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 10000;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: rgba(20, 20, 30, 0.95);
  border: 1px solid var(--color-olympus-gold-dark);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast-message {
  font-size: 0.9rem;
  color: var(--color-marble-cream);
}

.toast-success {
  border-color: #4ADE80;
}

.toast-success .toast-icon {
  color: #4ADE80;
}

.toast-error {
  border-color: #FF6B6B;
}

.toast-error .toast-icon {
  color: #FF6B6B;
}

.toast-info {
  border-color: var(--color-olympus-gold);
}

.toast-info .toast-icon {
  color: var(--color-olympus-gold);
}

/* ===========================================
   COMBAT ANIMATIONS
   =========================================== */
.attacking {
  animation: attackPulse 0.4s ease-out;
}

@keyframes attackPulse {
  0% {
    transform: scale(1) translateX(0);
  }
  30% {
    transform: scale(1.1) translateX(30px);
  }
  60% {
    transform: scale(1.05) translateX(20px);
  }
  100% {
    transform: scale(1) translateX(0);
  }
}

.shake {
  animation: shakeHit 0.3s ease-out;
}

@keyframes shakeHit {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(10px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}

.dying {
  animation: deathFade 0.5s ease-out forwards;
}

@keyframes deathFade {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
}

/* ===========================================
   STATUS EFFECTS DISPLAY
   =========================================== */
.status-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  justify-content: center;
}

.status-effects.player-effects {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
}

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: help;
  animation: statusPulse 2s infinite;
}

.status-icon[title*="Burning"],
.status-icon[title*="burn"] {
  border-color: #ff4500;
  box-shadow: 0 0 6px rgba(255, 69, 0, 0.5);
}

.status-icon[title*="Bleeding"],
.status-icon[title*="bleed"] {
  border-color: #8b0000;
  box-shadow: 0 0 6px rgba(139, 0, 0, 0.5);
}

.status-icon[title*="Poison"] {
  border-color: #228b22;
  box-shadow: 0 0 6px rgba(34, 139, 34, 0.5);
}

.status-icon[title*="Stun"],
.status-icon[title*="Frozen"] {
  border-color: #87ceeb;
  box-shadow: 0 0 6px rgba(135, 206, 235, 0.5);
}

.status-icon[title*="Fear"] {
  border-color: #4a0080;
  box-shadow: 0 0 6px rgba(74, 0, 128, 0.5);
}

.status-icon[title*="Slow"] {
  border-color: #888;
  box-shadow: 0 0 6px rgba(136, 136, 136, 0.5);
}

.status-icon[title*="Blind"] {
  border-color: #333;
  box-shadow: 0 0 6px rgba(51, 51, 51, 0.5);
}

.status-icon[title*="Strengthen"],
.status-icon[title*="Fortif"] {
  border-color: #ffd700;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

.status-icon[title*="Regen"],
.status-icon[title*="heal"] {
  border-color: #32cd32;
  box-shadow: 0 0 6px rgba(50, 205, 50, 0.5);
}

.status-icon[title*="Invulnerable"] {
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: invulnerablePulse 0.5s infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes invulnerablePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Boss phase indicator */
.boss-phase {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #8b0000, #ff4500);
  color: white;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.boss-phase::before {
  content: '⚠️ ';
}

/* Shield indicator enhancement */
.shield-indicator {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(135deg, #4a9eff, #2196f3);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(74, 158, 255, 0.5);
}

/* Combat buttons */
.combat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(40, 40, 60, 0.9);
  border: 2px solid var(--color-olympus-gold-dark);
  border-radius: var(--radius-md);
  color: var(--color-marble-cream);
  cursor: pointer;
  transition: var(--transition-fast);
  min-width: 70px;
}

.combat-btn:hover:not(.disabled) {
  background: rgba(60, 60, 80, 0.9);
  border-color: var(--color-olympus-gold);
  transform: translateY(-2px);
}

.combat-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.combat-btn .btn-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.combat-btn .btn-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.combat-btn .btn-cost {
  font-size: 0.65rem;
  opacity: 0.7;
  margin-top: 2px;
}

.combat-btn.attack-btn {
  border-color: #FF6B6B;
}

.combat-btn.attack-btn:hover:not(.disabled) {
  border-color: #FF8888;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.combat-btn.defend-btn {
  border-color: #4A9EFF;
}

.combat-btn.defend-btn:hover:not(.disabled) {
  border-color: #6BB3FF;
  box-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
}

.combat-btn.flee-btn {
  border-color: #888;
}

.combat-btn.ability-btn {
  border-color: #9B6BFF;
}

.combat-btn.ability-btn:hover:not(.disabled) {
  border-color: #B088FF;
  box-shadow: 0 0 10px rgba(155, 107, 255, 0.3);
}

/* ===========================================
   COMBAT RESULT MODAL
   =========================================== */
.combat-result {
  text-align: center;
  padding: var(--space-xl);
}

.combat-result h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: var(--space-lg);
}

.combat-result.victory h2 {
  color: var(--color-olympus-gold);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.combat-result.defeat h2 {
  color: #FF6B6B;
}

.combat-result .rewards {
  margin: var(--space-xl) 0;
}

.combat-result .rewards h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-md);
}

.combat-result .reward-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.combat-result .reward-item {
  padding: var(--space-sm) var(--space-md);
  background: rgba(40, 40, 60, 0.5);
  border-radius: var(--radius-sm);
}

.combat-result .reward-item.level-up {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(178, 134, 0, 0.2));
  border: 1px solid var(--color-olympus-gold);
  color: var(--color-olympus-gold);
  font-weight: bold;
}

.combat-result .defeat-message {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: rgba(139, 0, 0, 0.1);
  border-radius: var(--radius-md);
}

/* ===========================================
   PVP RESULT
   =========================================== */
.pvp-result {
  text-align: center;
  padding: var(--space-xl);
}

.pvp-result h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.pvp-result.victory h2 {
  color: var(--color-olympus-gold);
}

.pvp-result.defeat h2 {
  color: #FF6B6B;
}

.pvp-result .rewards {
  margin: var(--space-lg) 0;
}

.pvp-result .rewards p {
  padding: var(--space-sm);
}

/* ===========================================
   SHOP MODAL
   =========================================== */
.shop-modal {
  padding: var(--space-lg);
}

.shop-modal h2 {
  font-family: var(--font-display);
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--color-olympus-gold);
}

.shop-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: rgba(40, 40, 60, 0.5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-olympus-gold-dark);
}

.shop-item .item-name {
  font-weight: bold;
}

.shop-item .item-price {
  color: var(--color-olympus-gold);
}

.shop-note {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: var(--space-lg);
}

/* ===========================================
   SETTINGS MODAL
   =========================================== */
.settings-modal {
  padding: var(--space-lg);
}

.settings-modal h2 {
  font-family: var(--font-display);
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--color-olympus-gold);
}

.settings-section {
  margin-bottom: var(--space-xl);
}

.settings-section h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-row label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.setting-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-olympus-gold);
}

.settings-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: space-between;
  margin-top: var(--space-xl);
}

.settings-actions .btn {
  flex: 1;
}

/* Danger zone */
.danger-zone {
  border-top: 1px solid rgba(255, 107, 107, 0.3);
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
}

.danger-zone h3 {
  color: #ff6b6b;
}

/* Warning box */
.warning-box {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.warning-box p {
  margin-bottom: var(--space-sm);
  color: #ffaaaa;
}

.warning-box p:last-child {
  margin-bottom: 0;
}

/* Modal actions */
.modal-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.modal-actions .btn {
  flex: 1;
}

/* Change password modal */
.change-password-modal,
.delete-account-modal {
  padding: var(--space-lg);
  max-width: 400px;
}

.change-password-modal h2,
.delete-account-modal h2 {
  font-family: var(--font-display);
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--color-olympus-gold);
}

.delete-account-modal h2 {
  color: #ff6b6b;
}

/* ===========================================
   HOME VIEW
   =========================================== */
.home-view {
  padding: var(--space-lg);
}

.welcome-card {
  text-align: center;
  padding: var(--space-xl);
  background: linear-gradient(135deg, rgba(40, 40, 60, 0.8), rgba(30, 30, 50, 0.8));
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-olympus-gold-dark);
  margin-bottom: var(--space-xl);
}

.welcome-card h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-sm);
}

.welcome-card .god-blessing {
  font-size: 0.9rem;
  opacity: 0.8;
}

.idle-rewards-card {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(34, 197, 94, 0.1));
  border: 1px solid #4ADE80;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.idle-rewards-card h3 {
  font-family: var(--font-display);
  color: #4ADE80;
  margin-bottom: var(--space-md);
}

.idle-earnings {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin: var(--space-lg) 0;
  font-weight: bold;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(40, 40, 60, 0.6);
  border: 1px solid var(--color-olympus-gold-dark);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-card:hover {
  background: rgba(60, 60, 80, 0.6);
  border-color: var(--color-olympus-gold);
  transform: translateY(-2px);
}

.action-card .action-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.action-card .action-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-overview {
  background: rgba(40, 40, 60, 0.5);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.stats-overview h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-md);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
}

.stat-name {
  text-transform: capitalize;
  opacity: 0.8;
}

.stat-value {
  font-weight: bold;
  color: var(--color-olympus-gold);
}

.stat-points-available {
  margin-top: var(--space-md);
  text-align: center;
  padding: var(--space-sm);
  background: rgba(212, 175, 55, 0.1);
  border-radius: var(--radius-sm);
  color: var(--color-olympus-gold);
}

/* ===========================================
   STORY VIEW
   =========================================== */
.story-view {
  padding: var(--space-lg);
}

.story-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.story-header h2 {
  font-family: var(--font-display);
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-sm);
}

.story-quests {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.quest-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  background: rgba(40, 40, 60, 0.6);
  border: 1px solid var(--color-olympus-gold-dark);
  border-radius: var(--radius-md);
}

.quest-card.completed {
  opacity: 0.6;
  border-color: #4ADE80;
}

.quest-info h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-xs);
}

.quest-info p {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: var(--space-sm);
}

.quest-rewards {
  display: flex;
  gap: var(--space-md);
  font-size: 0.8rem;
}

.quest-status {
  color: #4ADE80;
  font-weight: bold;
}

/* ===========================================
   SKILLS VIEW
   =========================================== */
.skills-view {
  padding: var(--space-lg);
}

.skills-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.skills-header h2 {
  font-family: var(--font-display);
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-sm);
}

.skill-tree {
  margin-bottom: var(--space-xl);
}

.skill-tier {
  margin-bottom: var(--space-lg);
}

.skill-tier h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tier-abilities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.ability-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md);
  background: rgba(40, 40, 60, 0.6);
  border: 2px solid rgba(100, 100, 120, 0.5);
  border-radius: var(--radius-md);
  min-width: 80px;
  opacity: 0.5;
}

.ability-card.unlocked {
  opacity: 1;
  border-color: var(--color-olympus-gold);
}

.ability-card.available {
  opacity: 0.8;
  border-color: #4ADE80;
}

.ability-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.ability-name {
  font-size: 0.75rem;
  text-align: center;
}

.ability-cost {
  font-size: 0.65rem;
  opacity: 0.7;
}

.equipped-skills {
  background: rgba(40, 40, 60, 0.5);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.equipped-skills h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-md);
}

.skill-slots {
  display: flex;
  gap: var(--space-md);
}

.skill-slot {
  flex: 1;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border: 2px dashed rgba(100, 100, 120, 0.5);
  border-radius: var(--radius-md);
}

.skill-slot.filled {
  border-style: solid;
  border-color: var(--color-olympus-gold-dark);
}

.empty-slot {
  font-size: 0.7rem;
  opacity: 0.5;
}

/* ===========================================
   QUESTS VIEW
   =========================================== */
.quests-view {
  padding: var(--space-lg);
}

.quest-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.quest-tab {
  flex: 1;
  padding: var(--space-md);
  background: transparent;
  border: 1px solid var(--color-olympus-gold-dark);
  border-radius: var(--radius-md);
  color: var(--color-marble-cream);
  font-family: var(--font-display);
  cursor: pointer;
  transition: var(--transition-fast);
}

.quest-tab.active {
  background: var(--color-olympus-gold);
  color: var(--color-night-black);
}

.quest-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.quest-item {
  padding: var(--space-lg);
  background: rgba(40, 40, 60, 0.6);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-olympus-gold-dark);
}

.quest-item.completed {
  border-color: #4ADE80;
}

.quest-progress {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.quest-progress .progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.quest-progress .progress-fill {
  height: 100%;
  background: var(--color-olympus-gold);
  transition: width 0.3s ease;
}

.quest-progress .progress-text {
  font-size: 0.8rem;
  opacity: 0.8;
}

.quest-details h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: var(--space-xs);
}

.quest-details p {
  font-size: 0.8rem;
  opacity: 0.7;
}

.quest-reward {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
  font-size: 0.85rem;
}

/* ===========================================
   SOCIAL VIEW
   =========================================== */
.social-view {
  padding: var(--space-lg);
}

.social-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.social-tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 1px solid var(--color-olympus-gold-dark);
  border-radius: var(--radius-md);
  color: var(--color-marble-cream);
  font-family: var(--font-display);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.social-tab.active {
  background: var(--color-olympus-gold);
  color: var(--color-night-black);
}

/* Alliance Section */
.alliance-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.create-alliance,
.join-alliance {
  background: rgba(40, 40, 60, 0.5);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
}

.create-alliance h3,
.join-alliance h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-md);
}

.create-alliance input,
.create-alliance textarea {
  width: 100%;
  margin-bottom: var(--space-md);
}

.create-alliance textarea {
  min-height: 60px;
  resize: vertical;
}

.alliance-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.alliance-details h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: var(--space-xs);
}

.alliance-details p {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: var(--space-xs);
}

.member-count {
  font-size: 0.75rem;
  color: var(--color-olympus-gold);
}

/* PvP Section */
.pvp-section {
  text-align: center;
  padding: var(--space-xl);
}

.pvp-stats {
  background: rgba(40, 40, 60, 0.5);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}

.pvp-stats h3 {
  font-family: var(--font-display);
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-md);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
}

.btn-large {
  padding: var(--space-lg) var(--space-xxl);
  font-size: 1.1rem;
}

.pvp-note {
  margin-top: var(--space-lg);
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Leaderboard */
.leaderboard {
  background: rgba(40, 40, 60, 0.5);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
}

.leaderboard h3 {
  font-family: var(--font-display);
  color: var(--color-olympus-gold);
  text-align: center;
  margin-bottom: var(--space-lg);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.leaderboard-entry {
  display: flex;
  align-items: center;
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

.leaderboard-entry .rank {
  width: 30px;
  font-family: var(--font-display);
  font-weight: bold;
}

.leaderboard-entry .player-name {
  flex: 1;
}

.leaderboard-entry .player-rating {
  color: var(--color-olympus-gold);
  font-weight: bold;
}

.leaderboard-entry.top-1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 193, 7, 0.2));
  border: 1px solid gold;
}

.leaderboard-entry.top-2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(169, 169, 169, 0.2));
  border: 1px solid silver;
}

.leaderboard-entry.top-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(184, 115, 51, 0.2));
  border: 1px solid #CD7F32;
}

/* ===========================================
   LOADING STATE
   =========================================== */
.loading {
  text-align: center;
  padding: var(--space-xl);
  opacity: 0.7;
}

/* ===========================================
   ERROR STATE
   =========================================== */
.error-state {
  text-align: center;
  padding: var(--space-xl);
  color: #FF6B6B;
}

/* ===========================================
   GOD DETAIL CARD
   =========================================== */
.god-detail-card {
  background: rgba(40, 40, 60, 0.8);
  border: 1px solid var(--color-olympus-gold);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.god-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.detail-symbol {
  font-size: 2.5rem;
}

.god-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-olympus-gold);
  margin-bottom: var(--space-xs);
}

.god-domain {
  font-size: 0.85rem;
  opacity: 0.8;
}

.god-element {
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
}

.god-element strong {
  text-transform: capitalize;
  color: var(--color-olympus-gold);
}

.god-bonuses {
  font-size: 0.9rem;
}

.bonuses-list {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.stat-bonus {
  padding: var(--space-xs) var(--space-sm);
  background: rgba(74, 222, 128, 0.2);
  border-radius: var(--radius-sm);
  color: #4ADE80;
  font-weight: bold;
}

/* Currency Icon Styles */
.currency-icon-img {
  vertical-align: middle;
  object-fit: contain;
}

.currency-icon-sm {
  width: 16px;
  height: 16px;
}

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

.currency-icon {
  font-size: 1em;
}

/* Enemy sprite thumbnails in zone modal */
.enemy-sprite-thumb {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}

/* Zone card with background */
.zone-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.zone-card:hover:not(.locked) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Opponent Portrait Styles */
.opponent-portrait {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.opponent-god-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opponent-god-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--primary);
}

/* Alliance Member Portrait Styles */
.member-portrait {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.member-god-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-god-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: var(--primary);
}

.member-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ===========================================
   UNIFIED ICON SYSTEM STYLES
   =========================================== */

.game-icon {
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}

.icon-fallback {
  display: inline-block;
  text-align: center;
  vertical-align: middle;
}

/* Icon Sizes */
.icon-tiny, .icon-fallback.icon-tiny {
  width: 14px;
  height: 14px;
  font-size: 12px;
}

.icon-sm, .icon-fallback.icon-sm {
  width: 18px;
  height: 18px;
  font-size: 16px;
}

.icon-md, .icon-fallback.icon-md {
  width: 24px;
  height: 24px;
  font-size: 20px;
}

.icon-lg, .icon-fallback.icon-lg {
  width: 32px;
  height: 32px;
  font-size: 28px;
}

.icon-xl, .icon-fallback.icon-xl {
  width: 48px;
  height: 48px;
  font-size: 40px;
}

/* Icon with text alignment */
.icon-with-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.icon-with-text .game-icon,
.icon-with-text .icon-fallback {
  flex-shrink: 0;
}

/* Stat icons in hero view */
.stat-icon .game-icon {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Currency icons glow effects */
.game-icon[alt="gold"] {
  filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.4));
}

.game-icon[alt="gems"] {
  filter: drop-shadow(0 0 3px rgba(138, 43, 226, 0.4));
}

.game-icon[alt="honor"] {
  filter: drop-shadow(0 0 3px rgba(255, 165, 0, 0.4));
}

/* Element icons */
.game-icon[alt="fire"] {
  filter: drop-shadow(0 0 3px rgba(255, 100, 0, 0.5));
}

.game-icon[alt="water"] {
  filter: drop-shadow(0 0 3px rgba(0, 150, 255, 0.5));
}

.game-icon[alt="lightning"] {
  filter: drop-shadow(0 0 3px rgba(255, 255, 0, 0.5));
}

.game-icon[alt="shadow"] {
  filter: drop-shadow(0 0 3px rgba(100, 0, 150, 0.5));
}

.game-icon[alt="light"] {
  filter: drop-shadow(0 0 3px rgba(255, 255, 200, 0.5));
}

.game-icon[alt="nature"] {
  filter: drop-shadow(0 0 3px rgba(0, 200, 100, 0.5));
}

/* ===========================================
   STAT ICON DISPLAY FIXES
   =========================================== */

/* Stat icons in hero/character views */
.stat-icon .game-icon,
.stat-icon .icon-fallback {
  vertical-align: middle;
  margin-right: 4px;
}

.stat-header .stat-icon {
  display: inline-flex;
  align-items: center;
}

/* Allocation dialog stat icons */
.allocation-stat .stat-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
}

.allocation-stat .stat-icon .game-icon {
  width: 20px;
  height: 20px;
}

/* Combat stat labels */
.combat-stat .stat-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.combat-stat .stat-label .game-icon {
  width: 14px;
  height: 14px;
}

/* Reward displays */
.reward .game-icon,
.reward-item .game-icon,
.quest-reward .game-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 2px;
}

/* XP and gold reward specific */
.xp-reward .game-icon,
.gold-reward .game-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

/* Inline icon spacing */
.icon-with-value {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ===========================================
   CHAT BAR
   Persistent chat bar on main game screen
   Mobile-optimized with 48px minimum touch targets
   =========================================== */

.chat-bar {
  position: fixed !important;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  z-index: 99 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   COLLAPSED STATE - Thin bar with scrolling messages
   ═══════════════════════════════════════════════════════════════════════════════ */
.chat-bar-collapsed {
  display: flex !important;
  align-items: center;
  width: 100% !important;
  height: 32px;
  background: linear-gradient(90deg, rgba(13, 31, 51, 0.95) 0%, rgba(13, 31, 51, 0.85) 100%);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  cursor: pointer;
}

.chat-bar.expanded .chat-bar-collapsed {
  display: none !important;
}

/* Channel indicator - small icon on left */
.chat-channel-indicator {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: rgba(212, 175, 55, 0.15);
  border-right: 1px solid rgba(212, 175, 55, 0.2);
}

/* Scrolling messages - takes full remaining width */
.chat-scroll-area {
  flex: 1;
  display: flex;
  align-items: center;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 16px;
  padding: 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chat-scroll-area::-webkit-scrollbar {
  display: none;
}

/* Individual message in scroll */
.chat-scroll-msg {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: rgba(250, 248, 240, 0.9);
  animation: chatSlideIn 0.3s ease;
}

@keyframes chatSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.chat-scroll-msg .msg-sender {
  color: var(--color-olympus-gold);
  font-weight: 600;
}

.chat-scroll-msg .msg-text {
  color: rgba(250, 248, 240, 0.85);
}

.chat-empty-hint {
  color: rgba(250, 248, 240, 0.4);
  font-style: italic;
  font-size: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   EXPANDED STATE - Full chat panel (full width above nav)
   ═══════════════════════════════════════════════════════════════════════════════ */
.chat-bar-expanded {
  display: none;
  flex-direction: column;
  width: 100% !important;
  max-width: 100% !important;
  height: 280px;
  background: rgba(13, 31, 51, 0.98);
  border-top: 2px solid var(--color-olympus-gold-dark);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
}

.chat-bar.expanded .chat-bar-expanded {
  display: flex !important;
}

/* Header with tabs and close button */
.chat-expanded-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px 0 0;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-bar .chat-tabs {
  display: flex;
  flex: 1;
}

.chat-bar .chat-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(250, 248, 240, 0.6);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.chat-bar .chat-tab:active {
  background: rgba(212, 175, 55, 0.15);
}

.chat-bar .chat-tab.active {
  color: var(--color-olympus-gold);
  border-bottom-color: var(--color-olympus-gold);
  background: rgba(212, 175, 55, 0.1);
}

.chat-bar .chat-tab.has-unread {
  position: relative;
}

.chat-bar .chat-tab.has-unread::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background: var(--color-blood-red);
  border-radius: 50%;
}

.chat-close-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(250, 248, 240, 0.6);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
}

.chat-close-btn:active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-olympus-gold);
}

/* Messages area - scoped to chat-bar */
.chat-bar .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.chat-bar .chat-messages::-webkit-scrollbar {
  width: 3px;
}

.chat-bar .chat-messages::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 2px;
}

/* Chat bar specific message styling */
.chat-bar .chat-message {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-olympus-gold-dark);
  animation: messageSlideIn 0.2s ease;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.own-message {
  border-left-color: var(--color-poseidon-blue);
  background: rgba(0, 105, 148, 0.1);
}

.chat-message.system-message {
  border-left-color: var(--color-olympus-gold);
  background: rgba(212, 175, 55, 0.1);
  font-style: italic;
  text-align: center;
}

.chat-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.chat-message-sender {
  font-weight: 600;
  color: var(--color-olympus-gold);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-sender-level {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-weight: normal;
}

.chat-sender-title {
  font-size: 0.65rem;
  color: var(--color-divine-purple);
  font-weight: normal;
}

.chat-message-time {
  font-size: 0.65rem;
  color: var(--color-text-muted);
}

.chat-message-content {
  color: var(--color-marble-cream);
  font-size: 0.9rem; /* Increased for readability */
  line-height: 1.45;
  word-wrap: break-word;
}

.chat-message-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.chat-action-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 8px;
  min-height: 32px;
  -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
}

.chat-action-btn:active {
  color: var(--color-olympus-gold);
}

.chat-input-container {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-height: 48px; /* Touch target */
  color: var(--color-marble-cream);
  font-size: 1rem; /* 16px prevents iOS zoom */
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition-fast);
  -webkit-appearance: none;
}

.chat-input::placeholder {
  color: rgba(250, 248, 240, 0.4);
}

.chat-input:focus {
  border-color: var(--color-olympus-gold);
  background: rgba(255, 255, 255, 0.1);
}

.chat-send-btn {
  background: var(--gradient-gold);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  min-width: 56px;
  min-height: 48px; /* Touch target */
  color: var(--color-night-black);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.chat-send-btn:active {
  transform: scale(0.95);
  box-shadow: var(--shadow-glow);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Chat empty state */
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-muted);
  text-align: center;
  padding: 20px;
}

.chat-empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

.chat-empty-text {
  font-size: 0.85rem;
}

/* Chat typing indicator */
.chat-typing {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 4px 12px;
}

/* Private message specific */
.chat-private-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(168, 85, 247, 0.1);
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.chat-private-back {
  background: transparent;
  border: none;
  color: var(--color-marble-cream);
  cursor: pointer;
  padding: 4px 8px;
}

.chat-private-name {
  font-weight: 600;
  color: var(--color-divine-purple);
}

/* Conversation list for private messages */
.chat-conversations {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}

.chat-conversation-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.chat-conversation-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.chat-conversation-item.has-unread {
  border-left: 3px solid var(--color-divine-purple);
}

.chat-conversation-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.chat-conversation-info {
  flex: 1;
  min-width: 0;
}

.chat-conversation-name {
  font-weight: 600;
  color: var(--color-marble-cream);
  font-size: 0.85rem;
}

.chat-conversation-preview {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conversation-time {
  font-size: 0.65rem;
  color: var(--color-text-muted);
}

/* Alliance chat - show online members count */
.chat-alliance-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(34, 197, 94, 0.1);
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.chat-online-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ===========================================
   FLOATING CHAT BUTTON (Alternative to chat bar)
   Use .chat-bar.fab-mode to switch to FAB
   =========================================== */

.chat-fab {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  width: 56px;
  height: 56px;
  background: var(--gradient-gold);
  border: none;
  border-radius: 50%;
  color: var(--color-night-black);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), var(--shadow-glow);
  z-index: 99;
  display: none; /* Hidden by default, enable via JS */
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.chat-fab.visible {
  display: flex;
}

.chat-fab:active {
  transform: scale(0.9);
}

.chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  background: var(--color-blood-red);
  border-radius: 11px;
  font-size: 0.75rem;
  font-weight: bold;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 2px solid var(--color-night-black);
}

/* ===========================================
   MOBILE RESPONSIVE OPTIMIZATIONS
   =========================================== */

/* Small phones (320px - 375px) */
@media (max-width: 375px) {
  :root {
    --space-md: 12px;
    --space-lg: 18px;
  }
  
  .chat-bar {
    bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  .chat-bar .chat-tab {
    padding: 10px 10px;
    font-size: 0.7rem;
  }
  
  .chat-bar-expanded {
    height: 220px;
  }
  
  .chat-message-content {
    font-size: 0.85rem;
  }
  
  .chat-input {
    padding: 10px 12px;
  }
  
  .chat-send-btn {
    padding: 10px 14px;
    min-width: 48px;
  }
  
  .nav-label {
    font-size: 0.6rem;
  }
}

/* Standard phones (376px - 480px) */
@media (min-width: 376px) and (max-width: 480px) {
  .chat-bar {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .chat-bar .chat-tab {
    padding: 10px 12px;
  }

  .chat-bar-expanded {
    height: 240px;
  }
}

/* Full-screen chat on mobile portrait */
@media (max-width: 768px) and (orientation: portrait) {
  .chat-bar.expanded .chat-bar-expanded {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
    z-index: 1000 !important;
  }

  .chat-bar.expanded + .game-nav {
    display: none !important;
  }

  /* Ensure messages area and input are properly sized */
  .chat-bar.expanded .chat-messages {
    flex: 1;
    min-height: 0;
    max-height: calc(100vh - 120px); /* Account for header and input */
  }

  .chat-bar.expanded .chat-input-container {
    flex-shrink: 0;
  }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .chat-bar-expanded {
    height: 180px;
  }
  
  .game-nav {
    height: 50px;
  }
  
  .nav-label {
    display: none;
  }
  
  .nav-icon-img {
    width: 28px;
    height: 28px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover effects on touch devices */
  .btn:hover:not(:disabled) {
    transform: none;
    box-shadow: none;
  }
  
  /* Better active states for touch */
  .btn:active:not(:disabled) {
    transform: scale(0.97);
  }
  
  /* Remove hover on nav */
  .nav-btn:hover .nav-label,
  .nav-btn:hover .nav-icon {
    opacity: inherit;
    color: inherit;
    transform: none;
  }
  
  /* Ensure adequate spacing */
  .modal-content {
    margin: 8px;
    max-height: calc(100vh - 16px);
  }
}

/* Large phones / Small tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  /* Chat bar stays full width */
  .chat-bar-expanded {
    height: 280px;
  }
}

/* Tablet and up - chat bar stays full width above nav */
@media (min-width: 769px) {
  /* Chat bar remains full width, not floating */
  .chat-bar-expanded {
    height: 400px; /* Increased to show header + messages + input */
  }
  
  /* Restore hover effects on desktop */
  .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
  }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .chat-bar {
    border-top-width: 1px !important;
  }
}

/* Dark mode specific (if system prefers) */
@media (prefers-color-scheme: dark) {
  .chat-input {
    background: rgba(255, 255, 255, 0.04);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .chat-message {
    animation: none;
  }
  
  .btn,
  .nav-btn,
  .chat-tab {
    transition: none;
  }
  
  @keyframes pulse {
    0%, 100% { opacity: 1; }
  }
}


/* ═══════════════════════════════════════════════════════════════════════════════
   SPRINT 3 ENHANCEMENTS - Level Up Celebration & Progression
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Enhanced Level Up Modal */
.level-up-modal {
  text-align: center;
  padding: 30px;
  max-width: 400px;
  position: relative;
  overflow: hidden;
}

.level-up-modal .level-up-glow {
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(241, 196, 15, 0.3) 0%, transparent 70%);
  animation: level-glow 2s ease infinite;
  pointer-events: none;
}

@keyframes level-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.level-up-modal .level-up-particles {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle, #f1c40f 1px, transparent 1px),
    radial-gradient(circle, #e74c3c 1px, transparent 1px),
    radial-gradient(circle, #9b59b6 1px, transparent 1px);
  background-size: 40px 40px, 60px 60px, 80px 80px;
  animation: particles-float 3s linear infinite;
  opacity: 0.5;
  pointer-events: none;
}

@keyframes particles-float {
  0% { background-position: 0 0, 0 0, 0 0; }
  100% { background-position: 40px 40px, 60px 60px, 80px 80px; }
}

.level-up-modal.milestone .level-up-glow {
  background: radial-gradient(circle, rgba(155, 89, 182, 0.4) 0%, rgba(241, 196, 15, 0.2) 50%, transparent 70%);
}

.level-up-title {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #f1c40f;
  text-shadow: 0 0 20px rgba(241, 196, 15, 0.5);
  animation: title-bounce 0.6s ease;
  position: relative;
}

@keyframes title-bounce {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.new-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  animation: level-zoom 0.5s ease 0.2s backwards;
}

@keyframes level-zoom {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.new-level .level-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0.7;
}

.new-level .level-number {
  font-size: 5rem;
  font-weight: bold;
  background: linear-gradient(135deg, #f1c40f 0%, #e67e22 50%, #f1c40f 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 2s linear infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 10px rgba(241, 196, 15, 0.5));
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Milestone Banner */
.milestone-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  margin: 20px 0;
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.3), rgba(241, 196, 15, 0.2));
  border: 2px solid #9b59b6;
  border-radius: 12px;
  animation: milestone-slide 0.5s ease 0.3s backwards;
}

@keyframes milestone-slide {
  0% { transform: translateX(-50px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.milestone-icon {
  font-size: 2.5rem;
  animation: milestone-spin 1s ease;
}

@keyframes milestone-spin {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(360deg); }
}

.milestone-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.milestone-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #f1c40f;
}

.milestone-bonus {
  font-size: 0.9rem;
  color: #27ae60;
}

/* Rewards List */
.level-up-rewards {
  margin: 25px 0;
  text-align: left;
  position: relative;
}

.level-up-rewards h3 {
  margin-bottom: 15px;
  color: #fff;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.level-up-rewards .reward-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.level-up-rewards .reward-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid #27ae60;
  animation: reward-slide 0.4s ease backwards;
}

@keyframes reward-slide {
  0% { transform: translateX(30px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.level-up-rewards .reward-icon {
  font-size: 1.5rem;
}

.level-up-rewards .reward-text {
  font-size: 1rem;
  color: #2ecc71;
  font-weight: 500;
}

/* Progress to Next Milestone */
.level-up-progress {
  margin: 20px 0;
  text-align: center;
}

.level-up-progress .progress-label {
  font-size: 0.85rem;
  opacity: 0.7;
  display: block;
  margin-bottom: 8px;
}

.progress-bar-small {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-small .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #9b59b6, #f1c40f);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Continue Button */
.level-up-modal .btn-glow {
  margin-top: 20px;
  padding: 12px 40px;
  font-size: 1.1rem;
  animation: button-pulse 1.5s ease infinite;
  position: relative;
}

@keyframes button-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
  50% { box-shadow: 0 0 0 10px rgba(52, 152, 219, 0.3); }
}

/* Milestone Modal Extra Effects */
.level-up-modal.milestone::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #f1c40f, #9b59b6, #e74c3c, #3498db, #f1c40f);
  background-size: 400% 400%;
  border-radius: inherit;
  animation: border-gradient 3s linear infinite;
  z-index: -1;
}

@keyframes border-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

