/* Underworld Empire - Complete Styles */
:root {
  --bg-deep: #08090c;
  --bg-primary: #0d0f14;
  --bg-card: #12151c;
  --bg-elevated: #181c26;
  --bg-hover: #1e232f;
  --gold: #d4a853;
  --gold-dim: #a17f3a;
  --gold-glow: rgba(212, 168, 83, 0.3);
  --crimson: #c23b3b;
  --crimson-glow: rgba(194, 59, 59, 0.3);
  --emerald: #3bb574;
  --emerald-glow: rgba(59, 181, 116, 0.3);
  --text-primary: #f0ebe3;
  --text-secondary: #9ca3b4;
  --text-muted: #5c6370;
  --border: rgba(255, 255, 255, 0.06);
  --border-gold: rgba(212, 168, 83, 0.25);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 20px;
}

/* ========== ROTATE DEVICE OVERLAY ========== */
.rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #08090c 0%, #12151c 100%);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.rotate-content {
  text-align: center;
  padding: 40px;
}

.rotate-phone {
  font-size: 80px;
  animation: rotatePhone 2s ease-in-out infinite;
  display: inline-block;
}

.rotate-arrow {
  font-size: 48px;
  color: var(--gold);
  margin: 20px 0;
  animation: pulse 1.5s ease-in-out infinite;
}

.rotate-content h2 {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--gold);
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.rotate-content p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 280px;
  margin: 0 auto;
}

@keyframes rotatePhone {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(90deg); }
}

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

/* Show rotate overlay on mobile portrait */
@media screen and (max-width: 900px) and (orientation: portrait) {
  .rotate-overlay {
    display: flex !important;
  }
  
  .app, .noise, .vignette {
    display: none !important;
  }
}

/* Mobile landscape optimizations */
@media screen and (max-width: 900px) and (orientation: landscape) {
  .rotate-overlay {
    display: none !important;
  }
  
  .app {
    padding: 8px;
    max-width: 100%;
  }
  
  .topbar {
    padding: 8px 12px;
    margin-bottom: 8px;
    top: 4px;
    gap: 10px;
    flex-wrap: nowrap;
  }
  
  .brand {
    gap: 8px;
  }
  
  .logo {
    width: 32px;
    height: 32px;
  }
  
  .brand-text .title {
    font-size: 20px;
    letter-spacing: 2px;
  }
  
  .brand-text .subtitle {
    display: none;
  }
  
  .top-stats {
    gap: 8px;
  }
  
  .top-stat {
    padding: 4px 8px;
    font-size: 12px;
  }
  
  .top-stat-value {
    font-size: 13px;
  }
  
  .heat-stat {
    min-width: 70px;
  }
  
  .user-menu {
    gap: 6px;
  }
  
  .inbox-btn, .lang-btn {
    width: 32px;
    height: 32px;
  }
  
  .user-pill {
    padding: 4px 10px;
    font-size: 12px;
  }
  
  /* Navigation */
  .nav {
    padding: 8px;
    gap: 4px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .nav-btn {
    padding: 8px 12px;
    font-size: 11px;
    min-width: auto;
    flex-shrink: 0;
  }
  
  .nav-btn span:first-child {
    font-size: 14px;
  }
  
  /* Cards and sections */
  .card-header h2 {
    font-size: 18px;
  }
  
  .jobs-list {
    gap: 8px;
  }
  
  .job {
    padding: 10px;
  }
  
  .job-main {
    gap: 8px;
  }
  
  .job-icon {
    font-size: 24px;
  }
  
  .job-title {
    font-size: 13px;
  }
  
  .job-reward {
    font-size: 11px;
  }
  
  /* Empire tabs */
  .empire-tabs {
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  
  .empire-tab {
    padding: 8px 10px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  /* Shop grid */
  .empire-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }
  
  .shop-item {
    padding: 10px;
  }
  
  .item-icon {
    font-size: 28px;
  }
  
  .item-name {
    font-size: 12px;
  }
  
  /* Modals */
  .modal-card, .ibx-card, .fpm-card, .ppm-card {
    max-height: 90vh;
    max-width: 95vw;
  }
  
  /* Auth Modal - Mobile Landscape */
  .auth-modal {
    padding: 10px;
  }
  
  .auth-card {
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  
  .auth-header {
    padding: 15px;
    flex-shrink: 0;
  }
  
  .auth-logo {
    font-size: 40px;
    margin-bottom: 5px;
  }
  
  .auth-header h2 {
    font-size: 20px;
    letter-spacing: 2px;
  }
  
  .auth-header p {
    font-size: 12px;
    margin-top: 4px;
  }
  
  .auth-tabs {
    flex-shrink: 0;
  }
  
  .auth-tab {
    padding: 10px;
    font-size: 14px;
  }
  
  .auth-form {
    padding: 15px 20px;
    flex: 1;
    overflow-y: auto;
  }
  
  .auth-field {
    margin-bottom: 12px;
  }
  
  .auth-field label {
    font-size: 11px;
    margin-bottom: 4px;
  }
  
  .auth-field input {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .auth-submit {
    padding: 12px;
    font-size: 16px;
  }
  
  .auth-footer {
    padding: 12px 20px;
    flex-shrink: 0;
  }
  
  .auth-warning {
    font-size: 11px;
    margin-top: 8px;
  }
  
  .auth-close {
    font-size: 12px;
  }
  
  /* Forgot password modal */
  .forgot-password-card {
    max-width: 90vw;
    max-height: 80vh;
    padding: 15px;
  }
  
  .forgot-password-card h3 {
    font-size: 18px;
  }
  
  .forgot-desc {
    font-size: 12px;
  }
  
  /* Guest banner */
  .guest-banner {
    padding: 8px 15px;
    font-size: 12px;
    gap: 10px;
  }
  
  .guest-banner span {
    font-size: 12px;
  }
  
  .guest-banner button {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  /* Family section */
  .family-grid {
    grid-template-columns: 1fr;
  }
  
  /* Leaderboard */
  .lb-table th, .lb-table td {
    padding: 8px 6px;
    font-size: 12px;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--bg-deep); color: var(--text-primary); min-height: 100vh; font-size: 16px; -webkit-tap-highlight-color: transparent; }

/* Touch-friendly base styles */
button, .btn, input, select { touch-action: manipulation; -webkit-appearance: none; }
input, select, textarea { font-size: 16px; } /* Prevents iOS zoom on focus */

.noise { position: fixed; inset: 0; pointer-events: none; z-index: 1000; opacity: 0.03; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 999; background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.6) 100%); }

.app { max-width: 1400px; margin: 0 auto; padding: 20px; position: relative; z-index: 1; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 24px; background: linear-gradient(135deg, rgba(212,168,83,0.08), rgba(18,21,28,0.95)); border: 1px solid var(--border-gold); border-radius: var(--radius-lg); box-shadow: 0 8px 32px rgba(0,0,0,0.4); margin-bottom: 20px; backdrop-filter: blur(20px); position: sticky; top: 10px; z-index: 100; }
.brand { display: flex; align-items: center; gap: 16px; }
.logo { width: 50px; height: 50px; color: var(--gold); }
.brand-text .title { font-family: var(--font-display); font-size: 32px; letter-spacing: 4px; color: var(--gold); }
.brand-text .subtitle { font-size: 12px; color: var(--text-muted); letter-spacing: 2px; }

.top-stats { display: flex; gap: 20px; }
.top-stat { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(0,0,0,0.3); border-radius: var(--radius); border: 1px solid var(--border); }
.top-stat-value { font-family: var(--font-mono); font-size: 16px; font-weight: 600; }
.heat-stat { flex-direction: column; gap: 4px; min-width: 100px; }
.heat-stat > span { display: flex; align-items: center; gap: 8px; }
.heat-bar { height: 4px; background: rgba(0,0,0,0.4); border-radius: 2px; overflow: hidden; }
.heat-fill { height: 100%; background: linear-gradient(90deg, var(--emerald), var(--gold), var(--crimson)); transition: width 0.15s linear; }

/* Inbox Button */
.inbox-stat { cursor: pointer; position: relative; min-width: auto !important; padding: 8px 12px !important; }
.inbox-stat:hover { background: var(--bg-hover); border-radius: var(--radius); }
.inbox-stat .top-stat-icon { font-size: 20px; }
.inbox-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; background: var(--crimson); color: white; font-size: 11px; font-weight: 700; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); box-shadow: 0 2px 8px rgba(194, 59, 59, 0.5); }

/* Inbox Modal */
.inbox-modal { position: fixed; inset: 0; z-index: 5000; display: none; align-items: center; justify-content: center; padding: 20px; }
.inbox-modal.active { display: flex; }
.inbox-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); }
.inbox-modal-card { position: relative; background: linear-gradient(180deg, #1a1a2e 0%, #12121c 100%); border: 1px solid rgba(212,168,83,0.3); border-radius: 16px; width: 100%; max-width: 480px; max-height: 85vh; overflow: hidden; box-shadow: 0 25px 80px rgba(0,0,0,0.8), 0 0 60px rgba(212,168,83,0.1); }

.inbox-close-btn { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; color: var(--text-muted); font-size: 18px; cursor: pointer; transition: all 0.2s; z-index: 10; display: flex; align-items: center; justify-content: center; }
.inbox-close-btn:hover { background: rgba(194,59,59,0.2); border-color: var(--crimson); color: var(--crimson); }

.inbox-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 20px; background: linear-gradient(180deg, rgba(212,168,83,0.08) 0%, transparent 100%); border-bottom: 1px solid rgba(255,255,255,0.06); }
.inbox-title { display: flex; align-items: center; gap: 12px; }
.inbox-icon { font-size: 28px; }
.inbox-header h2 { font-family: var(--font-display); font-size: 22px; letter-spacing: 2px; color: var(--text-primary); margin: 0; font-weight: 600; }

.inbox-clear-btn { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: var(--text-muted); font-size: 12px; cursor: pointer; transition: all 0.2s; }
.inbox-clear-btn:hover { background: rgba(194,59,59,0.15); border-color: rgba(194,59,59,0.3); color: var(--crimson); }

.inbox-messages { padding: 16px; min-height: 200px; max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: rgba(0,0,0,0.2); }
.inbox-messages::-webkit-scrollbar { width: 4px; }
.inbox-messages::-webkit-scrollbar-track { background: transparent; }
.inbox-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.inbox-messages::-webkit-scrollbar-thumb:hover { background: rgba(212,168,83,0.3); }

.inbox-empty { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.inbox-empty::before { content: "📭"; display: block; font-size: 48px; margin-bottom: 15px; opacity: 0.4; }

.inbox-message { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: rgba(255,255,255,0.02); border-radius: 12px; border: 1px solid rgba(255,255,255,0.04); cursor: pointer; transition: all 0.2s; }
.inbox-message:hover { background: rgba(255,255,255,0.04); border-color: rgba(212,168,83,0.2); transform: translateY(-1px); }
.inbox-message.unread { border-left: 3px solid var(--gold); background: linear-gradient(90deg, rgba(212,168,83,0.08) 0%, rgba(255,255,255,0.02) 100%); }
.inbox-message.unread .inbox-msg-title { color: var(--gold); }
.inbox-message.read { opacity: 0.6; }

.inbox-msg-icon { width: 42px; height: 42px; background: linear-gradient(135deg, rgba(212,168,83,0.15), rgba(212,168,83,0.05)); border: 1px solid rgba(212,168,83,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.inbox-message.unread .inbox-msg-icon { background: linear-gradient(135deg, rgba(212,168,83,0.25), rgba(212,168,83,0.1)); border-color: rgba(212,168,83,0.4); }

.inbox-msg-content { flex: 1; min-width: 0; }
.inbox-msg-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; gap: 10px; }
.inbox-msg-title { font-weight: 600; font-size: 14px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-msg-time { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); flex-shrink: 0; opacity: 0.7; }
.inbox-msg-from { font-size: 12px; color: var(--gold-dim); margin-bottom: 4px; }
.inbox-msg-text { font-size: 13px; color: var(--text-secondary); line-height: 1.4; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.inbox-msg-delete { width: 30px; height: 30px; background: transparent; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; opacity: 0.3; transition: all 0.2s; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.inbox-msg-delete:hover { opacity: 1; background: rgba(194,59,59,0.2); color: var(--crimson); }

.inbox-compose { padding: 20px 24px 24px; background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0.1) 100%); border-top: 1px solid rgba(255,255,255,0.06); }
.inbox-compose-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.compose-icon { font-size: 16px; }

.inbox-compose-form { display: flex; flex-direction: column; gap: 12px; }
.inbox-input { width: 100%; padding: 12px 16px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; color: var(--text-primary); font-size: 14px; transition: all 0.2s; }
.inbox-input:focus { outline: none; border-color: rgba(212,168,83,0.4); background: rgba(0,0,0,0.4); }
.inbox-input::placeholder { color: var(--text-muted); }

.inbox-textarea { width: 100%; padding: 12px 16px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; color: var(--text-primary); font-size: 14px; height: 80px; resize: none; line-height: 1.5; transition: all 0.2s; font-family: var(--font-body); }
.inbox-textarea:focus { outline: none; border-color: rgba(212,168,83,0.4); background: rgba(0,0,0,0.4); }
.inbox-textarea::placeholder { color: var(--text-muted); }

.inbox-send-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%); border: none; border-radius: 10px; color: #000; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.inbox-send-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(212,168,83,0.3); }
.inbox-send-btn:active { transform: translateY(0); }

/* Profile Message Button */
.profile-msg-btn { margin-top: 15px; padding: 12px 24px !important; font-size: 16px; }

.top-actions { display: flex; gap: 10px; align-items: center; }
.user-status { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: var(--radius); }
.user-status.logged-in { border-color: var(--emerald); background: rgba(59,181,116,0.1); }
.user-status.logged-in .user-name { color: var(--emerald); }
.user-name { color: var(--text-secondary); }
.btn-icon { width: 42px; height: 42px; border: 1px solid var(--border); background: rgba(0,0,0,0.3); border-radius: var(--radius); cursor: pointer; font-size: 18px; display: grid; place-items: center; transition: all 0.2s; }
.btn-icon:hover { background: var(--bg-hover); border-color: var(--gold-dim); }

.main-nav { display: flex; gap: 8px; margin-bottom: 20px; padding: 8px; background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.nav-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; background: transparent; border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; color: var(--text-secondary); transition: all 0.3s; }
.nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-btn.active { background: linear-gradient(135deg, rgba(212,168,83,0.15), rgba(212,168,83,0.05)); border-color: var(--border-gold); color: var(--gold); }
.nav-icon { font-size: 20px; }
.nav-label { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; }

.section { display: none; animation: fadeIn 0.4s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; }
@media (max-width: 900px) { .section-grid { grid-template-columns: 1fr; } }

.card { background: linear-gradient(180deg, var(--bg-card), var(--bg-primary)); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.card-header h2 { font-family: var(--font-display); font-size: 24px; letter-spacing: 3px; }

.player-card { text-align: center; }
.player-rank { font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: 2px; padding: 4px 12px; background: rgba(212,168,83,0.1); border-radius: 6px; border: 1px solid var(--border-gold); }
.player-avatar { position: relative; margin: 30px auto; width: 120px; height: 120px; }
.avatar-ring { width: 100%; height: 100%; border-radius: 50%; background: conic-gradient(var(--gold), var(--gold-dim), var(--gold)); padding: 4px; animation: rotate 8s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.avatar-inner { width: 100%; height: 100%; background: var(--bg-card); border-radius: 50%; display: grid; place-items: center; font-size: 48px; overflow: hidden; }
.avatar-inner img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.player-level { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--gold), var(--gold-dim)); color: var(--bg-deep); font-family: var(--font-display); font-size: 18px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }

/* Rank Progress Section */
.rank-progress-section { margin-bottom: 20px; padding: 16px; background: linear-gradient(135deg, rgba(212,168,83,0.1), transparent); border: 1px solid var(--border-gold); border-radius: var(--radius); }
.rank-progress-header { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; font-family: var(--font-display); }
.rank-current { font-size: 14px; color: var(--gold); }
.rank-arrow { color: var(--text-muted); }
.rank-next { font-size: 14px; color: var(--text-secondary); }
.rank-progress-bar { height: 8px; background: rgba(0,0,0,0.4); border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.rank-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); border-radius: 4px; transition: width 0.5s; }
.rank-requirements { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.rank-req { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; background: rgba(0,0,0,0.2); border-radius: 6px; font-size: 11px; }
.rank-req.done { background: rgba(59,181,116,0.15); }
.rank-req.done .rank-req-icon { color: var(--emerald); }
.rank-req-icon { font-size: 14px; }
.rank-req-name { color: var(--text-muted); min-width: 50px; }
.rank-req-values { color: var(--text-secondary); font-family: var(--font-mono); font-size: 10px; margin-left: auto; }
.rank-req-bar { width: 100%; height: 4px; background: rgba(0,0,0,0.3); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.rank-req-fill { height: 100%; background: var(--gold); border-radius: 2px; }
.rank-req.done .rank-req-fill { background: var(--emerald); }
.rank-max { text-align: center; padding: 10px; color: var(--gold); font-family: var(--font-display); font-size: 14px; letter-spacing: 1px; }

.stats-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.stat-box { display: grid; grid-template-columns: 40px 1fr 60px; align-items: center; gap: 12px; padding: 12px; background: rgba(0,0,0,0.2); border-radius: var(--radius); border: 1px solid var(--border); }
.stat-icon { font-size: 24px; }
.stat-info { text-align: left; }
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.stat-value { font-family: var(--font-mono); font-size: 20px; font-weight: 600; }
.stat-bar { height: 6px; background: rgba(0,0,0,0.4); border-radius: 3px; overflow: hidden; }
.stat-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.str-fill { background: linear-gradient(90deg, #ff6b6b, #ee5a5a); }
.stl-fill { background: linear-gradient(90deg, #9b59b6, #8e44ad); }
.int-fill { background: linear-gradient(90deg, #3498db, #2980b9); }

.status-pills { display: flex; gap: 10px; }
.pill { flex: 1; padding: 10px; background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; color: var(--text-secondary); text-align: center; }
.pill.danger { border-color: rgba(194,59,59,0.3); color: #ff8a8a; background: rgba(194,59,59,0.1); }
.pill.safe { border-color: rgba(59,181,116,0.3); color: #7dffb3; background: rgba(59,181,116,0.1); }
.pill.warning { border-color: rgba(212,168,83,0.3); color: #ffe4a3; background: rgba(212,168,83,0.1); }

.jobs-card { display: flex; flex-direction: column; }
.rates-display { display: flex; flex-direction: row; gap: 8px; align-items: center; }
.money-rate { font-family: var(--font-mono); color: var(--emerald); font-size: 14px; padding: 4px 10px; background: rgba(59,181,116,0.1); border-radius: 6px; border: 1px solid rgba(59,181,116,0.2); }
.rep-rate { font-family: var(--font-mono); color: var(--gold); font-size: 14px; padding: 4px 10px; background: rgba(212,168,83,0.1); border-radius: 6px; border: 1px solid rgba(212,168,83,0.2); }
.jobs-list { display: flex; flex-direction: column; gap: 12px; max-height: 400px; overflow-y: auto; }

.job { display: flex; justify-content: space-between; gap: 16px; padding: 16px; background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.3s; }
.job:hover { border-color: var(--border-gold); background: rgba(212,168,83,0.05); }
.job.locked { opacity: 0.6; background: rgba(0,0,0,0.3); }
.job.locked:hover { border-color: var(--border); background: rgba(0,0,0,0.3); }
.job-name { font-family: var(--font-display); font-size: 18px; letter-spacing: 1px; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.job-count { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); background: rgba(0,0,0,0.3); padding: 2px 8px; border-radius: 10px; }
.job-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; }

.job-unlock-progress { margin-top: 10px; }
.unlock-bar { height: 8px; background: rgba(0,0,0,0.4); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.unlock-fill { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); border-radius: 4px; transition: width 0.3s; }
.unlock-text { font-family: var(--font-mono); font-size: 12px; color: var(--gold); }
.badge { font-size: 11px; padding: 4px 10px; border-radius: 6px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); color: var(--text-secondary); font-family: var(--font-mono); }
.badge.good { border-color: rgba(59,181,116,0.3); color: #7dffb3; background: rgba(59,181,116,0.1); }
.badge.warn { border-color: rgba(212,168,83,0.3); color: #ffe4a3; background: rgba(212,168,83,0.1); }
.badge.bad { border-color: rgba(194,59,59,0.3); color: #ff8a8a; background: rgba(194,59,59,0.1); }

.job-action { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.progress { width: 120px; height: 8px; background: rgba(0,0,0,0.4); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.bar { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); transition: width 0.1s; }

.btn { padding: 10px 20px; border-radius: var(--radius); font-family: var(--font-display); font-size: 14px; letter-spacing: 2px; cursor: pointer; border: 1px solid var(--border); transition: all 0.2s; }
.btn.primary { background: linear-gradient(135deg, var(--gold), var(--gold-dim)); color: var(--bg-deep); border-color: var(--gold); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 0 20px var(--gold-glow); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* Auto Heat Section */
.auto-heat-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.auto-heat-toggle-box { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: linear-gradient(135deg, rgba(59,181,116,0.1), transparent); border: 1px solid rgba(59,181,116,0.3); border-radius: var(--radius); margin-bottom: 12px; }
.auto-heat-header { display: flex; align-items: center; gap: 14px; }
.auto-heat-icon { font-size: 32px; }
.auto-heat-info h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; color: var(--text-primary); margin: 0; }
.auto-heat-info p { font-size: 12px; color: var(--text-muted); margin: 4px 0 0; }
.auto-heat-btn { padding: 10px 24px; background: var(--bg-hover); border: 2px solid var(--border); border-radius: 30px; cursor: pointer; font-family: var(--font-display); font-size: 14px; letter-spacing: 2px; color: var(--text-muted); transition: all 0.3s; }
.auto-heat-btn:hover { border-color: var(--emerald); color: var(--text-primary); }
.auto-heat-btn.active { background: linear-gradient(135deg, var(--emerald), #2a8a5a); border-color: var(--emerald); color: white; box-shadow: 0 0 20px var(--emerald-glow); }
.auto-heat-stats { display: flex; gap: 20px; }
.auto-heat-stat { display: flex; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.auto-heat-stat strong { color: var(--emerald); font-family: var(--font-mono); }

/* Bodyguard Page */
.bg-page {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.bg-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 3px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.bg-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.bg-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .bg-cards {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin: 0 auto 20px auto;
  }
}

.bg-card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-primary));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.bg-avatar {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 35px;
  margin: 0 auto 12px auto;
  box-shadow: 0 0 30px var(--gold-glow);
}

.bg-name {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.bg-level-box {
  margin-bottom: 12px;
}

.bg-level-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 2px;
}

.bg-level-num {
  display: block;
  font-family: var(--font-display);
  font-size: 42px;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 20px var(--gold-glow);
}

.bg-power-box {
  background: rgba(212,168,83,0.1);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 16px;
}

.bg-power-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.bg-power-num {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--gold);
  line-height: 1.2;
}

.bg-power-formula {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.bg-train-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
}

.bg-train-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--gold-glow);
}

.bg-train-btn:disabled {
  background: var(--bg-hover);
  border-color: var(--border);
  cursor: not-allowed;
}

.bg-train-icon {
  font-size: 20px;
}

.bg-train-text {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--bg-deep);
}

.bg-train-btn:disabled .bg-train-text {
  color: var(--text-muted);
}

.bg-total-box {
  background: linear-gradient(135deg, rgba(212,168,83,0.15), transparent);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 20px;
  max-width: 400px;
  margin: 0 auto;
}

.bg-total-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.bg-total-num {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--gold);
  text-shadow: 0 0 30px var(--gold-glow);
}

/* Buy Multiplier */
.buy-multiplier { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.buy-multiplier span { font-family: var(--font-display); font-size: 14px; letter-spacing: 1px; color: var(--text-secondary); }
.buy-mult-btn { padding: 8px 14px; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); transition: all 0.2s; }
.buy-mult-btn:hover { border-color: var(--gold-dim); color: var(--text-primary); }
.buy-mult-btn.active { background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border-color: var(--gold); color: var(--bg-deep); font-weight: 600; }

.empire-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.empire-tab { flex: 1; padding: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-family: var(--font-display); font-size: 16px; letter-spacing: 2px; color: var(--text-secondary); transition: all 0.3s; }
.empire-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.empire-tab.active { background: linear-gradient(135deg, rgba(212,168,83,0.15), rgba(212,168,83,0.05)); border-color: var(--border-gold); color: var(--gold); }
.empire-panel { display: none; }
.empire-panel.active { display: block; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.shop-item, .perk-item { display: flex; justify-content: space-between; gap: 16px; padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.3s; }
.shop-item:hover, .perk-item:hover { border-color: var(--border-gold); transform: translateY(-2px); }
.shop-item.job-locked { border-color: rgba(212,168,83,0.2); background: linear-gradient(135deg, rgba(212,168,83,0.05), transparent); }
.shop-item.job-locked:hover { border-color: var(--gold-dim); }
.perk-item.owned { border-color: var(--emerald); background: linear-gradient(135deg, rgba(59,181,116,0.1), transparent); }
.shop-title { font-family: var(--font-display); font-size: 18px; letter-spacing: 1px; margin-bottom: 6px; }
.shop-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.shop-lock-hint { font-size: 11px; color: var(--gold); background: rgba(212,168,83,0.1); padding: 4px 8px; border-radius: 4px; margin-bottom: 8px; display: inline-block; }
.shop-cost { font-family: var(--font-mono); font-size: 14px; color: var(--gold); }
.shop-action { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.shop-owned { font-size: 14px; color: var(--text-muted); font-family: var(--font-mono); }

.rivals-header { text-align: center; margin-bottom: 30px; }
.rivals-header h2 { font-family: var(--font-display); font-size: 36px; letter-spacing: 4px; color: var(--crimson); }
.rivals-intro { color: var(--text-secondary); margin-top: 10px; }

.rivals-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.rival-stat-box { text-align: center; padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.rival-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.rival-stat-value { font-family: var(--font-mono); font-size: 24px; font-weight: 600; }

.rivals-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 30px; }
.rival-card { padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all 0.3s; }
.rival-card:hover { border-color: var(--crimson); transform: translateY(-4px); }
.rival-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.rival-avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--crimson), #8b2525); display: grid; place-items: center; font-size: 28px; }
.rival-header h3 { font-family: var(--font-display); font-size: 20px; letter-spacing: 2px; }
.rival-header span { font-size: 12px; color: var(--crimson); }
.rival-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.rival-stats > div { padding: 10px; background: rgba(0,0,0,0.2); border-radius: 6px; text-align: center; }
.rival-stats span { font-size: 10px; color: var(--text-muted); display: block; }
.rival-stats strong { font-family: var(--font-mono); font-size: 16px; }

.attack-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, var(--crimson), #8b2525); border: none; border-radius: var(--radius); cursor: pointer; font-family: var(--font-display); font-size: 16px; letter-spacing: 3px; color: white; transition: all 0.3s; }
.attack-btn:hover:not(:disabled) { transform: scale(1.02); }
.attack-btn:disabled, .attack-btn.cooldown { opacity: 0.5; cursor: not-allowed; background: var(--bg-hover); }

.attack-log { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.attack-log h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; margin-bottom: 16px; color: var(--text-secondary); }
.log-entries { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }
.log-entry { padding: 12px; background: rgba(0,0,0,0.2); border-radius: 6px; font-size: 13px; border-left: 3px solid var(--border); }
.log-entry.win { border-left-color: var(--emerald); color: #7dffb3; }
.log-entry.lose { border-left-color: var(--crimson); color: #ff8a8a; }
.log-entry.empty { text-align: center; color: var(--text-muted); }

.prestige-header { text-align: center; margin-bottom: 40px; }
.prestige-crown { font-size: 64px; margin-bottom: 16px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.prestige-header h2 { font-family: var(--font-display); font-size: 36px; letter-spacing: 4px; color: var(--gold); }
.prestige-header p { color: var(--text-secondary); margin-top: 10px; }

.prestige-stats { text-align: center; margin-bottom: 40px; }
.prestige-stat-main { display: inline-block; padding: 30px 60px; background: linear-gradient(135deg, rgba(212,168,83,0.15), rgba(212,168,83,0.05)); border: 2px solid var(--border-gold); border-radius: var(--radius-lg); margin-bottom: 20px; }
.prestige-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.prestige-value { font-family: var(--font-display); font-size: 64px; color: var(--gold); }
.prestige-bonus { font-family: var(--font-mono); font-size: 14px; color: var(--emerald); margin-top: 8px; }
.prestige-estimate { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.prestige-btn { display: inline-flex; align-items: center; gap: 12px; padding: 18px 40px; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border: none; border-radius: var(--radius-lg); cursor: pointer; font-family: var(--font-display); font-size: 20px; letter-spacing: 3px; color: var(--bg-deep); transition: all 0.3s; }
.prestige-btn:hover { transform: scale(1.05); }

.perks-section h3 { font-family: var(--font-display); font-size: 24px; letter-spacing: 3px; color: var(--text-secondary); text-align: center; margin-bottom: 24px; }
.perks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.toast-container { position: fixed; bottom: 30px; right: 30px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 16px 24px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards; font-size: 14px; max-width: 350px; }
.toast.success { border-left: 4px solid var(--emerald); }
.toast.error { border-left: 4px solid var(--crimson); }
.toast.info { border-left: 4px solid var(--gold); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }

.footer { display: flex; justify-content: space-between; padding: 20px; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

.auth-modal { position: fixed; inset: 0; z-index: 6000; display: none; align-items: center; justify-content: center; }
.auth-modal.active { display: flex; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); }
.auth-card { position: relative; width: min(450px, 90vw); background: var(--bg-card); border: 2px solid var(--border-gold); border-radius: var(--radius-lg); overflow: hidden; }
.auth-header { text-align: center; padding: 30px; background: linear-gradient(180deg, rgba(212,168,83,0.15), transparent); }
.auth-logo { font-size: 64px; margin-bottom: 10px; }
.auth-header h2 { font-family: var(--font-display); font-size: 28px; letter-spacing: 3px; color: var(--gold); }
.auth-header p { color: var(--text-secondary); margin-top: 8px; font-size: 14px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); }
.auth-tab { flex: 1; padding: 14px; background: transparent; border: none; cursor: pointer; font-family: var(--font-display); font-size: 16px; letter-spacing: 2px; color: var(--text-muted); transition: all 0.3s; }
.auth-tab.active { color: var(--gold); background: rgba(212,168,83,0.1); border-bottom: 2px solid var(--gold); }
.auth-form { padding: 25px 30px; }
.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.auth-field input { width: 100%; padding: 14px 16px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: var(--radius); font-size: 16px; color: var(--text-primary); }
.auth-field input:focus { outline: none; border-color: var(--gold); }
.auth-error { color: var(--crimson); font-size: 13px; text-align: center; min-height: 20px; margin-bottom: 10px; }
.auth-submit { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border: none; border-radius: var(--radius); cursor: pointer; font-family: var(--font-display); font-size: 18px; letter-spacing: 3px; color: var(--bg-deep); }
.auth-submit:hover { transform: translateY(-2px); }
.auth-footer { padding: 20px 30px; border-top: 1px solid var(--border); text-align: center; background: rgba(0,0,0,0.2); }
.auth-close { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 8px 16px; }
.auth-warning { margin: 12px 0 0; font-size: 12px; color: var(--crimson); }

.guest-banner { position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 20px; background: linear-gradient(90deg, rgba(194,59,59,0.9), rgba(150,40,40,0.9)); display: flex; align-items: center; justify-content: center; gap: 15px; z-index: 100; }
.guest-banner button { padding: 8px 20px; background: white; border: none; border-radius: 6px; cursor: pointer; font-family: var(--font-display); font-size: 14px; color: var(--crimson); }

.jail-overlay { position: fixed; inset: 0; z-index: 5000; background: rgba(80,0,0,0.9); display: none; align-items: center; justify-content: center; }
.jail-overlay.active { display: flex; }
.jail-content { text-align: center; }
.jail-icon { font-size: 100px; margin-bottom: 20px; }
.jail-title { font-family: var(--font-display); font-size: 72px; letter-spacing: 10px; color: var(--crimson); margin-bottom: 20px; }
.jail-timer { font-family: var(--font-mono); font-size: 120px; font-weight: bold; color: #fff; margin-bottom: 20px; }
.bail-btn { padding: 20px 50px; background: linear-gradient(135deg, var(--emerald), #2a8a5a); border: none; border-radius: var(--radius-lg); cursor: pointer; font-family: var(--font-display); font-size: 20px; color: white; }
.bail-btn:hover { transform: scale(1.05); }
.jail-or { margin-top: 20px; font-size: 14px; color: var(--text-muted); }

.attack-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; }
.attack-overlay.active { display: flex; }
.attack-vs { font-family: var(--font-display); font-size: 120px; color: var(--crimson); animation: pulse 0.5s ease infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.attack-result { font-family: var(--font-display); font-size: 48px; letter-spacing: 4px; margin-top: 20px; }
.attack-result.win { color: var(--emerald); }
.attack-result.lose { color: var(--crimson); }

/* FAMILY STYLES */
.family-container { max-width: 900px; margin: 0 auto; }

.no-family { text-align: center; padding: 40px 20px; }
.no-family-icon { font-size: 80px; margin-bottom: 20px; }
.no-family h2 { font-family: var(--font-display); font-size: 36px; letter-spacing: 3px; margin-bottom: 10px; }
.no-family p { color: var(--text-muted); margin-bottom: 30px; }
.family-actions { display: flex; gap: 15px; justify-content: center; margin-bottom: 40px; }
.family-actions .btn { padding: 15px 30px; font-size: 16px; }

.families-list h3 { font-family: var(--font-display); font-size: 20px; letter-spacing: 2px; margin-bottom: 20px; color: var(--gold); }
.families-grid { display: grid; gap: 15px; }
.family-list-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: all 0.2s; }
.family-list-item:hover { border-color: var(--gold); transform: translateY(-2px); }
.family-list-emblem { font-size: 40px; width: 60px; height: 60px; background: var(--bg-elevated); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.family-list-info { flex: 1; }
.family-list-info h4 { font-family: var(--font-display); font-size: 18px; letter-spacing: 1px; }
.family-list-info span { font-size: 12px; color: var(--text-muted); }
.family-list-stats { display: flex; gap: 20px; font-size: 13px; color: var(--text-secondary); }
.family-list-stats span { display: flex; align-items: center; gap: 5px; }
.family-list-join { padding: 10px 20px; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border: none; border-radius: var(--radius); color: var(--bg-dark); font-family: var(--font-display); cursor: pointer; }

.has-family { padding: 20px 0; }
.family-header { display: flex; align-items: center; gap: 20px; padding: 30px; background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated)); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 25px; }
.family-emblem { font-size: 60px; width: 100px; height: 100px; background: linear-gradient(135deg, var(--gold-glow), transparent); border: 3px solid var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.family-info h2 { font-family: var(--font-display); font-size: 32px; letter-spacing: 3px; margin-bottom: 5px; }
.family-rank { display: inline-block; padding: 5px 15px; background: var(--gold-glow); border-radius: 20px; font-size: 14px; color: var(--gold); }
.family-level { margin-left: auto; text-align: center; }
.family-level span { display: block; font-size: 12px; color: var(--text-muted); text-transform: uppercase; }
.family-level strong { font-family: var(--font-display); font-size: 48px; color: var(--gold); }

.family-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 25px; }
.family-stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.fstat-icon { font-size: 28px; margin-bottom: 10px; }
.fstat-value { font-family: var(--font-mono); font-size: 24px; font-weight: 700; margin-bottom: 5px; }
.fstat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; }

.family-bonuses { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 25px; }
.family-bonuses h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; margin-bottom: 15px; }
.bonus-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.bonus-item { display: flex; justify-content: space-between; padding: 12px 15px; background: var(--bg-elevated); border-radius: var(--radius); }
.bonus-item span { color: var(--text-secondary); }
.bonus-item strong { color: var(--emerald); }

.family-upgrades-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 25px; }
.family-upgrades-section h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; margin-bottom: 8px; }
.upgrades-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 15px; }
.family-upgrades-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.family-upgrade-item { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; display: flex; flex-direction: column; gap: 10px; transition: all 0.2s; }
.family-upgrade-item:hover { border-color: var(--gold-dim); }
.family-upgrade-item.maxed { opacity: 0.6; }
.family-upgrade-header { display: flex; align-items: center; gap: 10px; }
.family-upgrade-icon { font-size: 28px; }
.family-upgrade-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.family-upgrade-info span { font-size: 11px; color: var(--text-muted); }
.family-upgrade-level { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--bg-dark); border-radius: var(--radius); }
.family-upgrade-level span { font-size: 12px; color: var(--text-secondary); }
.family-upgrade-level strong { font-family: var(--font-mono); color: var(--gold); }
.family-upgrade-btn { width: 100%; padding: 10px; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border: none; border-radius: var(--radius); color: var(--bg-dark); font-family: var(--font-display); font-size: 12px; letter-spacing: 1px; cursor: pointer; transition: all 0.2s; }
.family-upgrade-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 15px var(--gold-glow); }
.family-upgrade-btn:disabled { opacity: 0.5; cursor: not-allowed; background: var(--bg-hover); color: var(--text-muted); }

.family-bank-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 25px; }
.family-bank-section h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; margin-bottom: 15px; }
.bank-actions { display: flex; gap: 10px; }
.bank-input-group { display: flex; gap: 10px; flex: 1; }
.bank-input-group input { flex: 1; padding: 12px 15px; background: var(--bg-dark); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 16px; }
.bank-input-group input:focus { outline: none; border-color: var(--gold); }

.family-members-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 25px; }
.family-members-section h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; margin-bottom: 15px; }
.members-list { display: grid; gap: 10px; }
.member-item { display: flex; flex-direction: column; gap: 10px; padding: 15px; background: var(--bg-elevated); border-radius: var(--radius); }
.member-main { display: flex; align-items: center; gap: 15px; cursor: pointer; }
.member-main:hover { opacity: 0.9; }
.member-avatar { width: 45px; height: 45px; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.member-info { flex: 1; min-width: 0; }
.member-info h4 { font-weight: 600; margin-bottom: 2px; }
.member-info span { font-size: 12px; color: var(--text-muted); }
.member-stats { display: flex; gap: 15px; font-size: 13px; color: var(--text-secondary); }
.member-rank { padding: 5px 12px; background: var(--bg-hover); border-radius: 15px; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.member-rank.don { background: linear-gradient(135deg, var(--gold), var(--gold-dim)); color: var(--bg-deep); }
.member-rank.underboss { background: rgba(212,168,83,0.3); color: var(--gold); }
.member-rank.capo { background: rgba(59,181,116,0.2); color: var(--emerald); }
.member-rank.soldier { background: var(--bg-hover); color: var(--text-muted); }

.member-actions { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.member-action-btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-hover); cursor: pointer; font-size: 14px; transition: all 0.2s; }
.member-action-btn:hover { transform: scale(1.05); }
.member-action-btn.promote { border-color: var(--emerald); }
.member-action-btn.promote:hover { background: var(--emerald); }
.member-action-btn.demote { border-color: var(--gold); }
.member-action-btn.demote:hover { background: var(--gold); }
.member-action-btn.kick { border-color: var(--crimson); }
.member-action-btn.kick:hover { background: var(--crimson); }

/* Family Chat */
.family-chat-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 25px; }
.family-chat-section h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; margin-bottom: 15px; }
.chat-container { height: 300px; overflow-y: auto; background: var(--bg-deep); border-radius: var(--radius); padding: 15px; margin-bottom: 15px; display: flex; flex-direction: column; gap: 12px; }
.no-chat { color: var(--text-muted); text-align: center; padding: 50px 20px; }
.chat-message { padding: 12px 15px; background: var(--bg-elevated); border-radius: var(--radius); border-left: 3px solid var(--border); }
.chat-message.mine { border-left-color: var(--gold); background: rgba(212,168,83,0.1); }
.chat-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.chat-rank { font-size: 10px; padding: 2px 8px; background: var(--bg-hover); border-radius: 10px; color: var(--text-muted); }
.chat-user { font-weight: 600; font-size: 13px; color: var(--gold); }
.chat-time { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.chat-text { font-size: 14px; color: var(--text-primary); line-height: 1.4; word-wrap: break-word; }
.chat-input-group { display: flex; gap: 10px; }
.chat-input-group input { flex: 1; padding: 12px 15px; background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-primary); font-size: 14px; }
.chat-input-group input:focus { outline: none; border-color: var(--gold); }
.chat-input-group .btn { padding: 12px 20px; }

.family-war-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 25px; }
.family-war-section h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; margin-bottom: 15px; }
.war-status { padding: 20px; background: var(--bg-elevated); border-radius: var(--radius); text-align: center; margin-bottom: 15px; }
.war-status.active { border: 2px solid var(--crimson); background: rgba(194, 59, 59, 0.1); }
.war-status h4 { font-family: var(--font-display); font-size: 20px; color: var(--crimson); margin-bottom: 10px; }
.war-progress { height: 20px; background: var(--bg-dark); border-radius: 10px; overflow: hidden; margin: 15px 0; }
.war-progress-fill { height: 100%; background: linear-gradient(90deg, var(--emerald), var(--gold)); transition: width 0.3s; }
.war-scores { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 18px; }

.enemy-families { display: grid; gap: 10px; }
.enemy-family { display: flex; align-items: center; gap: 15px; padding: 15px; background: var(--bg-elevated); border-radius: var(--radius); }
.enemy-family-info { flex: 1; }
.enemy-family h4 { font-weight: 600; }
.enemy-family span { font-size: 12px; color: var(--text-muted); }
.declare-war-btn { padding: 10px 20px; background: linear-gradient(135deg, var(--crimson), #8a2a2a); border: none; border-radius: var(--radius); color: white; font-family: var(--font-display); cursor: pointer; }
.declare-war-btn:hover { transform: scale(1.02); }

.family-footer { text-align: center; padding-top: 20px; }
.btn.danger { background: rgba(194, 59, 59, 0.2); border: 1px solid var(--crimson); color: var(--crimson); }
.btn.danger:hover { background: var(--crimson); color: white; }

/* Leader Settings */
.family-leader-section { margin-top: 20px; border: 1px solid var(--gold); background: rgba(212, 175, 55, 0.05); }
.leader-setting { display: flex; justify-content: space-between; align-items: center; padding: 15px; background: var(--bg-elevated); border-radius: var(--radius); margin-bottom: 15px; }
.leader-setting-info { display: flex; flex-direction: column; gap: 4px; }
.leader-setting-title { font-weight: 600; color: var(--text); }
.leader-setting-desc { font-size: 12px; color: var(--text-muted); }
.leader-toggle-btn { display: flex; align-items: center; gap: 8px; padding: 10px 20px; background: var(--bg-dark); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); cursor: pointer; transition: all 0.2s; }
.leader-toggle-btn:hover { border-color: var(--gold); }
.leader-toggle-btn.closed { background: rgba(194, 59, 59, 0.2); border-color: var(--crimson); }
.join-requests-section { margin-top: 15px; }
.join-requests-section h3 { font-size: 14px; color: var(--gold); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.join-requests-list { display: flex; flex-direction: column; gap: 10px; }
.join-request-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: var(--bg-elevated); border-radius: var(--radius); border: 1px solid var(--border); }
.join-request-info { display: flex; flex-direction: column; gap: 2px; }
.join-request-name { font-weight: 600; color: var(--text); }
.join-request-level { font-size: 12px; color: var(--text-muted); }
.join-request-actions { display: flex; gap: 8px; }
.join-request-actions button { padding: 8px 15px; border: none; border-radius: var(--radius); cursor: pointer; font-size: 12px; font-weight: 600; }
.join-accept-btn { background: var(--green); color: white; }
.join-deny-btn { background: var(--crimson); color: white; }
.no-requests { text-align: center; color: var(--text-muted); font-size: 14px; padding: 20px; }

/* Create Family Modal */
.create-family-modal { position: fixed; inset: 0; z-index: 4000; background: rgba(0,0,0,0.85); display: none; align-items: center; justify-content: center; padding: 20px; }
.create-family-modal.active { display: flex; }
.create-family-card { background: var(--bg-card); border: 1px solid var(--gold); border-radius: var(--radius-lg); padding: 30px; width: 100%; max-width: 450px; box-shadow: 0 25px 80px rgba(0,0,0,0.8); }
.create-family-card h3 { font-family: var(--font-display); font-size: 28px; letter-spacing: 3px; text-align: center; margin-bottom: 25px; color: var(--gold); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.form-group input, .form-group select { width: 100%; padding: 14px; background: var(--bg-dark); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 16px; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--gold); }
.emblem-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.emblem-option { width: 100%; aspect-ratio: 1; background: var(--bg-elevated); border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 28px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.emblem-option:hover { border-color: var(--gold); background: var(--gold-glow); transform: scale(1.05); }
.emblem-option.selected { border-color: var(--gold); background: var(--gold-glow); box-shadow: 0 0 15px var(--gold-glow); }
.create-family-actions { display: flex; gap: 10px; margin-top: 25px; }
.create-family-actions .btn { flex: 1; padding: 14px; font-size: 14px; }

/* Profile Modal */
.profile-modal { position: fixed; inset: 0; z-index: 5000; display: none; align-items: center; justify-content: center; padding: 20px; }
.profile-modal.active { display: flex; }
.profile-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); }
.profile-modal-card { position: relative; background: var(--bg-card); border: 1px solid var(--gold); border-radius: var(--radius-lg); width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 80px rgba(0,0,0,0.8); }
.profile-close-btn { position: absolute; top: 15px; right: 15px; width: 36px; height: 36px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 50%; color: var(--text-secondary); font-size: 18px; cursor: pointer; z-index: 10; transition: all 0.2s; }
.profile-close-btn:hover { background: var(--crimson); color: white; border-color: var(--crimson); }
.profile-modal-content { padding: 25px; }
.profile-modal-content .profile-header { margin-bottom: 20px; }
.profile-modal-content .profile-stats-overview { margin-bottom: 20px; }
.profile-modal-content .profile-section { margin-bottom: 15px; }

.member-item.clickable { cursor: pointer; transition: all 0.2s; }
.member-item.clickable:hover { border-color: var(--gold); background: var(--gold-glow); transform: translateX(5px); }

/* Hitlist Section */
.family-hitlist-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 25px; }
.family-hitlist-section h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; margin-bottom: 10px; color: var(--crimson); }
.hitlist-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 15px; }
.hitlist-bullets { display: inline-block; padding: 8px 16px; background: var(--bg-elevated); border: 1px solid var(--crimson); border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.hitlist-bullets strong { color: var(--crimson); font-family: var(--font-mono); }
.hitlist-container { display: flex; flex-direction: column; gap: 10px; max-height: 400px; overflow-y: auto; }

/* Bullet Shop */
.bullet-count { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 20px; background: linear-gradient(135deg, rgba(194, 59, 59, 0.15), transparent); border: 1px solid var(--crimson); border-radius: var(--radius); margin-bottom: 10px; }
.bullet-icon { font-size: 32px; }
.bullet-amount { font-family: var(--font-display); font-size: 24px; letter-spacing: 2px; color: var(--crimson); }
.bullet-item { border-color: rgba(194, 59, 59, 0.3); }
.bullet-item:hover { border-color: var(--crimson); }

/* Hitlist Cards */
.hitlist-family-card { display: flex; align-items: center; gap: 15px; padding: 15px 20px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all 0.2s; }
.hitlist-family-card:hover { border-color: var(--crimson); background: rgba(194, 59, 59, 0.1); transform: translateX(5px); }
.hitlist-card-emblem { font-size: 36px; }
.hitlist-card-info { flex: 1; }
.hitlist-card-info h4 { font-family: var(--font-display); font-size: 18px; letter-spacing: 1px; margin-bottom: 4px; }
.hitlist-card-info span { font-size: 12px; color: var(--text-muted); }
.hitlist-card-stats { display: flex; gap: 12px; font-size: 13px; }
.hitlist-card-stats .wins { color: var(--emerald); }
.hitlist-card-stats .losses { color: var(--crimson); }
.hitlist-card-arrow { font-size: 20px; color: var(--text-muted); }

/* Family View Modal */
.family-modal { position: fixed; inset: 0; z-index: 5000; display: none; align-items: center; justify-content: center; padding: 20px; }
.family-modal.active { display: flex; }
.family-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); }
.family-modal-card { position: relative; background: var(--bg-card); border: 1px solid var(--gold); border-radius: var(--radius-lg); width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 80px rgba(0,0,0,0.8); }
.family-modal-content { padding: 25px; }

.fview-header { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.fview-emblem { font-size: 64px; }
.fview-info h2 { font-family: var(--font-display); font-size: 32px; letter-spacing: 3px; margin-bottom: 8px; }
.fview-level { display: inline-block; padding: 6px 16px; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border-radius: 20px; font-family: var(--font-display); font-size: 14px; letter-spacing: 2px; color: var(--bg-dark); }

.fview-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 25px; }
.fview-stat { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; text-align: center; }
.fview-stat-value { display: block; font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.fview-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.fview-members { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.fview-members h3 { font-family: var(--font-display); font-size: 16px; letter-spacing: 2px; margin-bottom: 15px; }
.fview-members-list { display: flex; flex-direction: column; gap: 10px; }

.fview-member { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; background: var(--bg-card); border-radius: var(--radius); }
.fview-member-left { display: flex; align-items: center; gap: 12px; cursor: pointer; flex: 1; }
.fview-member-left:hover { opacity: 0.8; }
.fview-member-avatar { width: 40px; height: 40px; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.fview-member-info { display: flex; flex-direction: column; gap: 3px; }
.fview-member-name { font-weight: 600; font-size: 14px; }
.fview-member-rank { font-size: 11px; padding: 2px 8px; background: var(--bg-hover); border-radius: 10px; color: var(--text-muted); display: inline-block; width: fit-content; }
.fview-member-rank.don { background: linear-gradient(135deg, var(--gold), var(--gold-dim)); color: var(--bg-deep); }
.fview-member-rank.underboss { background: rgba(212,168,83,0.3); color: var(--gold); }
.fview-member-rank.capo { background: rgba(59,181,116,0.2); color: var(--emerald); }

.fview-member-right { display: flex; align-items: center; gap: 12px; }
.fview-member-power { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); }
.fview-hit-btn { width: 40px; height: 40px; background: linear-gradient(135deg, var(--crimson), #8a2a2a); border: none; border-radius: 50%; color: white; font-size: 16px; cursor: pointer; transition: all 0.2s; }
.fview-hit-btn:hover:not(:disabled) { transform: scale(1.1); box-shadow: 0 0 15px var(--crimson-glow); }
.fview-hit-btn:disabled { opacity: 0.4; cursor: not-allowed; background: var(--bg-hover); }

.fview-actions { text-align: center; padding-top: 10px; }
.fview-actions .btn { padding: 14px 30px; font-size: 16px; }

@media (max-width: 500px) {
  .fview-stats { grid-template-columns: repeat(2, 1fr); }
  .fview-header { flex-direction: column; text-align: center; }
  .fview-emblem { font-size: 48px; }
}

@media (max-width: 768px) {
  .family-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .bonus-list { grid-template-columns: 1fr; }
  .family-header { flex-direction: column; text-align: center; }
  .family-level { margin-left: 0; margin-top: 15px; }
}

/* PROFILE STYLES */
.profile-container { max-width: 800px; margin: 0 auto; }

.profile-header { display: flex; align-items: center; gap: 25px; padding: 30px; background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated)); border: 1px solid var(--border-gold); border-radius: var(--radius-lg); margin-bottom: 25px; }
.profile-avatar-large { position: relative; }
.avatar-ring-large { width: 120px; height: 120px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); padding: 4px; box-shadow: 0 0 30px var(--gold-glow); }
.avatar-inner-large { width: 100%; height: 100%; border-radius: 50%; background: var(--bg-card); display: flex; align-items: center; justify-content: center; font-size: 60px; }
.profile-info h1 { font-family: var(--font-display); font-size: 36px; letter-spacing: 3px; margin-bottom: 8px; }
.profile-rank-badge { display: inline-block; padding: 6px 16px; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border-radius: 20px; font-family: var(--font-display); font-size: 14px; letter-spacing: 2px; color: var(--bg-dark); margin-bottom: 8px; }
.profile-family { font-size: 14px; color: var(--text-muted); }

.profile-stats-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 25px; }
.profile-main-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 25px; text-align: center; }
.pstat-value { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--gold); margin-bottom: 5px; }
.pstat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.profile-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.profile-section h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; margin-bottom: 15px; color: var(--gold); }

.stats-list { display: flex; flex-direction: column; gap: 10px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: var(--bg-elevated); border-radius: var(--radius); }
.stat-row span { color: var(--text-secondary); font-size: 14px; }
.stat-row strong { font-family: var(--font-mono); font-size: 16px; color: var(--text-primary); }

.skills-display { display: flex; flex-direction: column; gap: 15px; }
.skill-bar-container { background: var(--bg-elevated); border-radius: var(--radius); padding: 15px; }
.skill-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.skill-header span { font-size: 14px; color: var(--text-secondary); }
.skill-header strong { font-family: var(--font-mono); font-size: 18px; }
.skill-bar { height: 12px; background: var(--bg-dark); border-radius: 6px; overflow: hidden; }
.skill-fill { height: 100%; border-radius: 6px; transition: width 0.5s ease; }
.skill-fill.str-color { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.skill-fill.stl-color { background: linear-gradient(90deg, #9b59b6, #8e44ad); }
.skill-fill.int-color { background: linear-gradient(90deg, #3498db, #2980b9); }

.achievements-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.achievement { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; text-align: center; transition: all 0.2s; }
.achievement.unlocked { border-color: var(--gold); background: var(--gold-glow); }
.achievement.locked { opacity: 0.4; }
.achievement-icon { font-size: 32px; margin-bottom: 8px; }
.achievement-name { font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.achievement-desc { font-size: 9px; color: var(--text-muted); }

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 900px) {
  .app { padding: 10px; }
  
  /* Topbar Mobile */
  .topbar { 
    flex-direction: column; 
    gap: 12px; 
    padding: 12px 16px; 
    position: sticky;
    top: 0;
  }
  .brand { width: 100%; justify-content: center; }
  .brand-text .title { font-size: 22px; letter-spacing: 2px; }
  .brand-text .subtitle { display: none; }
  .logo { width: 36px; height: 36px; }
  
  .top-stats { 
    width: 100%; 
    justify-content: space-around;
    gap: 6px;
    flex-wrap: wrap;
  }
  .top-stat { 
    flex: 1 1 auto;
    min-width: 70px;
    padding: 8px 10px; 
    justify-content: center;
    font-size: 13px;
  }
  .top-stat-icon { font-size: 14px; }
  .top-stat-value { font-size: 13px; }
  .heat-stat { 
    min-width: 90px; 
    flex: 1 1 100%;
    order: 1;
  }
  .heat-bar { height: 6px; }
  
  .top-actions { width: 100%; justify-content: center; gap: 8px; }
  .user-status { padding: 6px 12px; font-size: 13px; }
  
  /* Navigation Mobile */
  .main-nav { 
    gap: 5px; 
    padding: 8px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-radius: 0;
    margin: 0;
  }
  .nav-btn { 
    flex-direction: column; 
    padding: 8px 6px;
    gap: 4px;
    min-width: 0;
    flex: 1;
  }
  .nav-icon { font-size: 20px; }
  .nav-label { font-size: 9px; letter-spacing: 0; }
  
  /* Add padding at bottom for fixed nav */
  .main-content { padding-bottom: 80px; }
  
  /* Section Grid Mobile */
  .section-grid { grid-template-columns: 1fr; gap: 15px; }
  
  /* Player Card Mobile */
  .player-card { padding: 15px; }
  .player-info { gap: 12px; }
  .player-avatar { width: 50px; height: 50px; font-size: 24px; }
  .player-name { font-size: 20px; }
  .player-stats { gap: 15px; flex-wrap: wrap; }
  .player-stat { font-size: 18px; }
  .player-stat small { font-size: 10px; }
  
  .status-pills { flex-wrap: wrap; gap: 6px; }
  .pill { padding: 4px 10px; font-size: 11px; }
  
  /* Jobs Mobile */
  .job { padding: 12px; flex-direction: column; align-items: stretch; gap: 10px; }
  .job-info { text-align: center; }
  .job-name { font-size: 16px; }
  .job-desc { font-size: 12px; }
  .job-meta { justify-content: center; flex-wrap: wrap; }
  .badge { padding: 3px 8px; font-size: 11px; }
  .job-action { width: 100%; }
  .job-action .btn { width: 100%; padding: 12px; }
  
  /* Auto Heat Section Mobile */
  .auto-heat-section { padding: 12px; }
  .auto-heat-toggle-box { padding: 12px; flex-direction: column; gap: 12px; }
  .auto-heat-header { justify-content: center; }
  .auto-heat-stats { flex-direction: column; gap: 8px; }
  
  /* Empire Tabs Mobile */
  .buy-multiplier { 
    gap: 6px; 
    padding: 10px 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .buy-multiplier span { font-size: 12px; width: 100%; text-align: center; margin-bottom: 4px; }
  .buy-mult-btn { padding: 8px 12px; font-size: 12px; flex: 1; min-width: 45px; text-align: center; }
  
  .empire-tabs { 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    gap: 5px;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
  }
  .empire-tab { 
    padding: 10px 12px; 
    font-size: 11px; 
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  /* Shop Grid Mobile */
  .shop-grid { grid-template-columns: 1fr; gap: 10px; }
  .shop-item { padding: 12px; }
  .shop-title { font-size: 14px; }
  .shop-desc { font-size: 12px; }
  .shop-action { gap: 8px; }
  .shop-owned { font-size: 14px; }
  .shop-btn { min-width: 80px; }
  
  /* Perks Grid Mobile */
  .perks-grid { grid-template-columns: 1fr; }
  .perk-item { padding: 12px; }
  
  /* Rivals Mobile */
  .rivals-header h2 { font-size: 28px; }
  .rivals-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rival-stat-box { padding: 12px; }
  .rival-stat-value { font-size: 20px; }
  .rivals-list { grid-template-columns: 1fr; }
  .rival-card { padding: 15px; }
  .rival-header { gap: 12px; }
  .rival-avatar { font-size: 32px; }
  .rival-stats { gap: 15px; }
  .attack-btn { padding: 12px 20px; font-size: 13px; }
  
  /* Prestige Mobile */
  .prestige-header { padding: 20px; }
  .prestige-crown { font-size: 50px; }
  .prestige-header h2 { font-size: 28px; }
  .prestige-stats { padding: 20px; }
  .prestige-value { font-size: 48px; }
  .prestige-btn { padding: 15px 30px; font-size: 14px; }
  
  /* Family Mobile */
  .no-family { padding: 20px 15px; }
  .no-family-icon { font-size: 50px; }
  .no-family h2 { font-size: 24px; }
  .family-actions { flex-direction: column; gap: 10px; }
  .family-actions .btn { width: 100%; padding: 14px; }
  
  .family-list-item { flex-direction: column; text-align: center; gap: 10px; padding: 15px; }
  .family-list-stats { justify-content: center; }
  .family-list-join { width: 100%; }
  
  .family-header { padding: 20px; }
  .family-emblem { width: 70px; height: 70px; font-size: 40px; }
  .family-info h2 { font-size: 24px; }
  .family-level strong { font-size: 36px; }
  
  .family-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .family-stat-card { padding: 15px; }
  .fstat-icon { font-size: 22px; }
  .fstat-value { font-size: 18px; }
  
  .bonus-list { grid-template-columns: 1fr; gap: 8px; }
  .bonus-item { padding: 10px 12px; font-size: 14px; }
  
  .bank-input-group { flex-direction: column; gap: 8px; }
  .bank-input-group input { width: 100%; }
  .bank-input-group .btn { width: 100%; }
  
  .family-upgrades-grid { grid-template-columns: 1fr; gap: 10px; }
  .family-upgrade-item { padding: 12px; }
  .family-upgrade-icon { font-size: 24px; }
  .family-upgrade-info h4 { font-size: 13px; }
  .family-upgrade-info span { font-size: 10px; }
  
  .members-list { gap: 8px; }
  .member-item { flex-wrap: wrap; padding: 12px; gap: 10px; }
  .member-avatar { width: 40px; height: 40px; font-size: 18px; }
  .member-info h4 { font-size: 14px; }
  .member-stats { width: 100%; justify-content: flex-start; }
  .member-rank { font-size: 10px; padding: 4px 10px; }
  
  .enemy-family { flex-direction: column; text-align: center; gap: 10px; }
  .declare-war-btn { width: 100%; }
  
  .war-scores { font-size: 14px; }
  
  /* Profile Mobile */
  .profile-header { flex-direction: column; text-align: center; padding: 20px; }
  .avatar-ring-large { width: 100px; height: 100px; }
  .avatar-inner-large { font-size: 45px; }
  .profile-info h1 { font-size: 28px; }
  .profile-stats-overview { grid-template-columns: 1fr; gap: 10px; }
  .profile-main-stat { padding: 18px; }
  .pstat-value { font-size: 24px; }
  .stat-row { padding: 10px 12px; }
  .stat-row span { font-size: 13px; }
  .stat-row strong { font-size: 14px; }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .achievement { padding: 12px; }
  .achievement-icon { font-size: 26px; }
  
  /* Auth Modal Mobile */
  .auth-card { padding: 20px; margin: 15px; max-height: 90vh; overflow-y: auto; }
  .auth-logo { font-size: 40px; }
  .auth-header h2 { font-size: 20px; }
  .auth-tabs { gap: 5px; }
  .auth-tab { padding: 10px 15px; font-size: 12px; }
  .auth-field input { padding: 12px; }
  .auth-submit { padding: 14px; }
  
  /* Create Family Modal Mobile */
  .create-family-card { padding: 20px; margin: 10px; }
  .create-family-card h3 { font-size: 22px; }
  .emblem-picker { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .emblem-option { font-size: 22px; }
  .create-family-actions { flex-direction: column; }
  
  /* Jail Overlay Mobile */
  .jail-icon { font-size: 60px; }
  .jail-title { font-size: 48px; letter-spacing: 5px; }
  .jail-timer { font-size: 72px; }
  .bail-btn { padding: 15px 30px; font-size: 16px; }
  
  /* Toast Mobile */
  .toast { padding: 12px 16px; font-size: 13px; max-width: calc(100vw - 30px); }
}

/* Extra small screens */
@media (max-width: 400px) {
  .brand-text .title { font-size: 18px; letter-spacing: 1px; }
  .logo { width: 32px; height: 32px; }
  
  .top-stat { padding: 4px 6px; }
  .top-stat-icon { font-size: 12px; }
  .top-stat-value { font-size: 11px; }
  
  .nav-label { font-size: 8px; }
  .nav-icon { font-size: 16px; }
  .nav-btn { padding: 6px 4px; }
  
  .empire-tab { padding: 8px 10px; font-size: 10px; }
  
  .family-stats-grid { grid-template-columns: 1fr; }
  .rivals-stats { grid-template-columns: 1fr; }
  
  .job-name { font-size: 14px; }
  .job-desc { font-size: 11px; }
  .badge { font-size: 10px; padding: 2px 6px; }
  
  .shop-title { font-size: 13px; }
  .shop-desc { font-size: 11px; }
  .shop-price { font-size: 12px; }
  
  .player-name { font-size: 18px; }
  .player-stat { font-size: 16px; }
}

/* Improved touch targets */
@media (pointer: coarse) {
  .btn, button { min-height: 44px; }
  .shop-btn { min-height: 44px; padding: 10px 16px; }
  .nav-btn { min-height: 50px; }
  .empire-tab { min-height: 40px; }
  input, select { min-height: 44px; }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .topbar { padding: 8px 16px; position: relative; top: 0; }
  .brand-text .title { font-size: 20px; }
  .logo { width: 30px; height: 30px; }
  .main-nav { padding: 4px; }
  .nav-btn { padding: 4px; }
  .nav-icon { font-size: 16px; }
  .nav-label { display: none; }
  .main-content { padding-bottom: 50px; }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
  .topbar { 
    padding-top: max(16px, env(safe-area-inset-top)); 
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  .main-nav { 
    padding-bottom: max(8px, env(safe-area-inset-bottom)); 
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }
  .app {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
}

/* Dark mode scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--bg-hover); }

/* Smooth scrolling */
html { scroll-behavior: smooth; }
.empire-tabs { scroll-behavior: smooth; }

/* Prevent text selection on buttons */
button, .btn, .nav-btn, .empire-tab { 
  -webkit-user-select: none; 
  user-select: none; 
}

/* Better focus states for accessibility */
button:focus-visible, .btn:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}



/* Black Market */
.black-market-header { text-align: center; margin-bottom: 30px; }
.black-market-header h3 { font-family: var(--font-display); font-size: 28px; color: var(--gold); letter-spacing: 3px; margin-bottom: 10px; text-shadow: 0 2px 10px rgba(212,168,83,0.3); }
.black-market-header p { color: var(--text-muted); font-size: 14px; }

/* Black Market Row Layout */
.black-market-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1100px; margin: 0 auto; align-items: stretch; }
@media (max-width: 1000px) { .black-market-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 650px) { .black-market-row { grid-template-columns: 1fr; } }

.black-market-card { background: linear-gradient(145deg, rgba(194,59,59,0.15), rgba(212,168,83,0.08)); border: 2px solid var(--crimson); border-radius: var(--radius-lg); padding: 24px; box-shadow: 0 8px 32px rgba(194,59,59,0.15); display: flex; flex-direction: column; min-height: 320px; }

.bm-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid rgba(194,59,59,0.3); }
.bm-dealer { font-family: var(--font-display); font-size: 15px; color: var(--crimson); letter-spacing: 1px; }
.bm-timer { font-family: var(--font-mono); font-size: 13px; color: var(--gold); background: rgba(212,168,83,0.15); padding: 6px 12px; border-radius: var(--radius); border: 1px solid rgba(212,168,83,0.3); }

.bm-deal { text-align: center; margin-bottom: 20px; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.bm-amount { font-family: var(--font-display); font-size: 28px; color: var(--text-primary); margin-bottom: 10px; letter-spacing: 1px; }
.bm-price { font-family: var(--font-mono); font-size: 20px; color: var(--gold); font-weight: 700; text-shadow: 0 2px 8px rgba(212,168,83,0.3); }
.bm-per { font-size: 12px; color: var(--text-muted); margin-top: 6px; opacity: 0.8; }

.bm-buy-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, var(--crimson), #8b2525); border: 2px solid var(--crimson); border-radius: var(--radius); color: white; font-family: var(--font-display); font-size: 15px; letter-spacing: 2px; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 15px rgba(194,59,59,0.3); margin-top: auto; }
.bm-buy-btn:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(194,59,59,0.5); }
.bm-buy-btn.disabled, .bm-buy-btn:disabled { background: var(--bg-hover); border-color: var(--border); color: var(--text-muted); cursor: not-allowed; box-shadow: none; }

.bm-hint { text-align: center; margin-top: 12px; font-size: 11px; color: var(--text-muted); opacity: 0.7; }

/* Safehouse Card */
.safehouse-card { background: linear-gradient(145deg, rgba(80,80,80,0.2), rgba(40,40,40,0.15)); border: 2px solid rgba(150,150,150,0.3); border-radius: var(--radius-lg); padding: 24px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.2); display: flex; flex-direction: column; min-height: 320px; }
.safehouse-card.hiding { border-color: var(--green); background: linear-gradient(145deg, rgba(76,175,80,0.15), rgba(56,142,60,0.08)); box-shadow: 0 8px 32px rgba(76,175,80,0.2); }
.safehouse-icon { font-size: 48px; margin-bottom: 12px; }
.safehouse-title { font-family: var(--font-display); font-size: 20px; color: var(--text-primary); margin-bottom: 10px; letter-spacing: 2px; }
.safehouse-card.hiding .safehouse-title { color: var(--green); text-shadow: 0 2px 8px rgba(76,175,80,0.4); }
.safehouse-timer { font-family: var(--font-mono); font-size: 28px; color: var(--green); margin-bottom: 12px; text-shadow: 0 2px 10px rgba(76,175,80,0.4); }
.safehouse-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; flex-grow: 1; }
.safehouse-price { font-family: var(--font-mono); font-size: 20px; color: var(--gold); margin-bottom: 16px; text-shadow: 0 2px 8px rgba(212,168,83,0.3); }
.safehouse-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, #666, #444); border: 2px solid rgba(150,150,150,0.4); border-radius: var(--radius); color: white; font-family: var(--font-display); font-size: 15px; letter-spacing: 2px; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 15px rgba(0,0,0,0.2); margin-top: auto; }
.safehouse-btn:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.35); border-color: var(--gold); background: linear-gradient(135deg, #777, #555); }
.safehouse-btn.disabled, .safehouse-btn:disabled { background: var(--bg-hover); border-color: var(--border); color: var(--text-muted); cursor: not-allowed; box-shadow: none; }

.bm-safehouse-section { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); }
.bm-safehouse-section h4 { font-family: var(--font-display); font-size: 18px; color: var(--gold); margin-bottom: 15px; text-align: center; letter-spacing: 1px; }
.bm-safehouse-section .shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.bm-safehouse-section .shop-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.bm-safehouse-section .shop-item.locked { opacity: 0.6; }
.bm-safehouse-section .shop-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.bm-safehouse-section .shop-item-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.bm-safehouse-section .shop-item-owned { font-size: 11px; color: var(--gold); font-family: var(--font-mono); }
.bm-safehouse-section .shop-item-desc { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.bm-safehouse-section .shop-item-btn { width: 100%; padding: 8px; background: var(--gold); border: none; border-radius: var(--radius-sm); color: var(--bg-primary); font-size: 12px; font-weight: 600; cursor: pointer; }
.bm-safehouse-section .shop-item-btn.disabled { background: var(--bg-hover); color: var(--text-muted); cursor: not-allowed; }


.bg-cost { text-align: center; font-size: 14px; color: var(--gold); margin-bottom: 12px; font-family: var(--font-mono); }


.bg-cooldown-info { text-align: center; font-size: 12px; color: var(--gold); margin-bottom: 10px; font-family: var(--font-mono); }


/* Ad Boost Button */
.ad-stat { cursor: pointer; position: relative; }
.ad-stat:hover { background: rgba(212,168,83,0.2); }
.ad-stat.active { background: rgba(59,181,116,0.2); border-color: rgba(59,181,116,0.4); }
.ad-stat.active .top-stat-icon { animation: pulse-ad 1s infinite; }
@keyframes pulse-ad { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.ad-timer { font-size: 10px; color: var(--emerald); font-family: var(--font-mono); }

/* Language Toggle */
.lang-stat { cursor: pointer; }
.lang-stat:hover { background: rgba(212,168,83,0.2); }
.discord-stat { cursor: pointer; padding: 8px !important; color: #5865F2; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 5px; position: relative; }
.discord-stat:hover { background: rgba(88,101,242,0.2); color: #7289DA; }
.discord-stat svg { width: 18px; height: 18px; }
.discord-reward-badge { font-size: 10px; font-weight: bold; background: linear-gradient(135deg, #f59e0b, #d97706); color: white; padding: 2px 6px; border-radius: 8px; animation: badgePulse 1.5s ease-in-out infinite; white-space: nowrap; }
@keyframes badgePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.discord-reward-badge.claimed { display: none; }
.settings-stat { cursor: pointer; padding: 8px !important; }
.settings-stat:hover { background: rgba(212,168,83,0.2); }
.settings-stat .top-stat-icon { font-size: 16px; }

/* Settings Page */
.settings-page { max-width: 800px; margin: 0 auto; padding: 20px; }
.settings-header { text-align: center; margin-bottom: 30px; }
.settings-icon { font-size: 48px; margin-bottom: 10px; }
.settings-header h2 { font-family: var(--font-display); font-size: 28px; color: var(--gold); letter-spacing: 3px; margin-bottom: 8px; }
.settings-header p { color: var(--text-muted); font-size: 14px; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

.settings-card { background: linear-gradient(145deg, var(--bg-card), var(--bg-primary)); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.settings-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.settings-card-icon { font-size: 24px; }
.settings-card-header h3 { font-family: var(--font-display); font-size: 18px; color: var(--text-primary); letter-spacing: 1px; margin: 0; }
.settings-card-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }

/* Settings Toggle */
.settings-toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.settings-toggle-row span { color: var(--text-secondary); font-size: 14px; }
.settings-toggle { width: 52px; height: 28px; background: var(--bg-hover); border: 2px solid var(--border); border-radius: 14px; cursor: pointer; position: relative; transition: all 0.3s; }
.settings-toggle .toggle-slider { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: var(--text-muted); border-radius: 50%; transition: all 0.3s; }
.settings-toggle.active { background: var(--gold); border-color: var(--gold); }
.settings-toggle.active .toggle-slider { left: 26px; background: var(--bg-primary); }

/* Settings Account */
.settings-account-info { margin-bottom: 16px; }
.account-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.account-row:last-child { border-bottom: none; }
.account-row span { color: var(--text-muted); font-size: 13px; }
.account-row strong { color: var(--text-primary); font-size: 14px; }
.settings-logout-btn { width: 100%; padding: 12px; background: linear-gradient(135deg, var(--crimson), #8b2525); border: none; border-radius: 10px; color: white; font-family: var(--font-display); font-size: 14px; letter-spacing: 1px; cursor: pointer; transition: all 0.3s; }
.settings-logout-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(194,59,59,0.3); }

/* Bug Report Card */
.bug-report-card { margin-top: 16px; }
.bug-report-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.bug-report-buttons { display: flex; gap: 12px; }
.bug-report-btn { flex: 1; padding: 12px 16px; border: none; border-radius: 10px; font-family: var(--font-display); font-size: 14px; letter-spacing: 0.5px; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.bug-report-btn.discord-btn { background: linear-gradient(135deg, #5865F2, #4752C4); color: white; }
.bug-report-btn.discord-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(88,101,242,0.4); }
.bug-report-btn.ingame-btn { background: linear-gradient(135deg, var(--gold-dim), #8b7425); color: white; width: 100%; }
.bug-report-btn.ingame-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(212,175,55,0.3); }

/* Discord Card */
.discord-card { margin-top: 16px; background: linear-gradient(145deg, #5865F2, #4752C4) !important; border: none !important; }
.discord-card .settings-card-header h3 { color: white; }
.discord-card .settings-card-icon { filter: grayscale(1) brightness(10); }
.discord-desc { font-size: 14px; color: rgba(255,255,255,0.9); margin-bottom: 16px; }
.discord-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.discord-feature { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.1); padding: 8px 12px; border-radius: 8px; }
.discord-feature span:first-child { font-size: 16px; }
.discord-reward-text { text-align: center; color: #fcd34d; font-size: 14px; font-weight: 600; margin: 10px 0; padding: 8px 12px; background: rgba(245,158,11,0.2); border-radius: 8px; animation: rewardPulse 2s ease-in-out infinite; }
@keyframes rewardPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.discord-join-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px 20px; background: white; color: #5865F2; border: none; border-radius: 10px; font-family: var(--font-display); font-size: 16px; font-weight: bold; letter-spacing: 0.5px; cursor: pointer; transition: all 0.3s; text-decoration: none; }
.discord-join-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.discord-join-btn svg { width: 24px; height: 24px; }
.discord-reward-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px 20px; background: linear-gradient(135deg, #f59e0b, #d97706); color: white; border: none; border-radius: 10px; font-family: var(--font-display); font-size: 16px; font-weight: bold; letter-spacing: 0.5px; cursor: pointer; transition: all 0.3s; margin-top: 10px; }
.discord-reward-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245,158,11,0.4); }
.discord-reward-btn:disabled { background: #666; cursor: not-allowed; opacity: 0.6; transform: none; }
.discord-reward-btn .reward-amount { background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 6px; font-size: 14px; }
.discord-reward-btn.claimed { background: linear-gradient(135deg, #22c55e, #16a34a); }
.discord-reward-btn.claimed .reward-amount { display: none; }

/* Backfire Options in Settings Page */
#settingsBackfireOptions { display: flex; gap: 10px; }
#settingsBackfireOptions .backfire-btn { flex: 1; padding: 16px 12px; background: var(--bg-elevated); border: 2px solid var(--border); border-radius: 12px; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
#settingsBackfireOptions .backfire-btn:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
#settingsBackfireOptions .backfire-btn.active { border-color: var(--gold); background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05)); }
#settingsBackfireOptions .bf-icon { font-size: 24px; }
#settingsBackfireOptions .bf-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
#settingsBackfireOptions .backfire-btn.active .bf-label { color: var(--gold); }
.lang-flag { font-size: 18px; }
.heat-modifier { font-size: 10px; margin-left: 4px; font-weight: 600; display: block; }

/* Stats Page */
.stats-page { padding: 20px; max-width: 1200px; margin: 0 auto; }
.stats-header { text-align: center; margin-bottom: 32px; }
.stats-header h2 { font-size: 2rem; color: var(--gold); margin-bottom: 8px; text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3); }
.stats-subtitle { color: var(--muted); font-size: 1rem; }

.stats-highlight-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 32px; }
.stats-highlight { background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05)); border: 1px solid var(--gold-dim); border-radius: 16px; padding: 16px 12px; text-align: center; transition: transform 0.2s, box-shadow 0.2s; }
.stats-highlight:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2); }
.stats-highlight-icon { font-size: 2rem; margin-bottom: 8px; }
.stats-highlight-value { font-size: 1.5rem; font-weight: 700; color: var(--gold); font-family: var(--font-mono); margin-bottom: 4px; }
.stats-highlight-label { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.stats-grid-page { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stats-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.stats-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.stats-card.full-width { grid-column: 1 / -1; }
.stats-card-header { background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card)); padding: 16px 20px; font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.stats-card-icon { font-size: 1.3rem; }
.stats-card-content { padding: 16px 20px; }
.stats-card-content.bonuses { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 16px; padding: 24px 20px; }

.stats-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.stats-row:last-child { border-bottom: none; }
.stats-row.total { background: rgba(212, 175, 55, 0.1); margin: 12px -20px -16px; padding: 12px 20px; border-radius: 0 0 16px 16px; }
.stats-label { color: var(--muted); font-size: 0.95rem; }
.stats-value { color: var(--text); font-weight: 600; font-size: 1rem; font-family: var(--font-mono); }
.stats-value.win { color: #4ade80; }
.stats-value.loss { color: #f87171; }
.stats-value.prestige { color: var(--gold); }
.stats-value.str { color: #f87171; }
.stats-value.stl { color: #60a5fa; }
.stats-value.int { color: #a78bfa; }

.bonus-item { text-align: center; min-width: 100px; padding: 16px; background: rgba(255,255,255,0.02); border-radius: 12px; transition: background 0.2s; }
.bonus-item:hover { background: rgba(212, 175, 55, 0.1); }
.bonus-icon { font-size: 1.8rem; margin-bottom: 8px; }
.bonus-value { font-size: 1.4rem; font-weight: 700; color: var(--gold); font-family: var(--font-mono); }
.bonus-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* Professional Bonuses Grid */
.bonuses-card { background: linear-gradient(135deg, rgba(20, 22, 30, 0.95), rgba(15, 17, 23, 0.98)); }
.bonuses-grid { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 12px; 
  padding: 20px; 
}

.bonus-card {
  position: relative;
  background: linear-gradient(135deg, rgba(25, 28, 38, 0.95), rgba(18, 20, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.25s ease;
  overflow: hidden;
}

.bonus-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-color);
  opacity: 0.6;
  border-radius: 0 2px 2px 0;
}

.bonus-card:hover {
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(30, 33, 44, 0.95), rgba(22, 24, 32, 0.98));
}

/* Bonus Card Types */
.bonus-card.positive { --accent-color: #22c55e; }
.bonus-card.negative { --accent-color: #3b82f6; }
.bonus-card.combat { --accent-color: #f97316; }
.bonus-card.defense { --accent-color: #8b5cf6; }

.bonus-card-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  flex-shrink: 0;
}

.bonus-card.positive .bonus-card-icon { color: #4ade80; }
.bonus-card.negative .bonus-card-icon { color: #60a5fa; }
.bonus-card.combat .bonus-card-icon { color: #fb923c; }
.bonus-card.defense .bonus-card-icon { color: #a78bfa; }

.bonus-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bonus-card-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.bonus-card-value {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-color);
  line-height: 1;
}

.bonus-card.positive .bonus-card-value { color: #4ade80; }
.bonus-card.negative .bonus-card-value { color: #60a5fa; }
.bonus-card.combat .bonus-card-value { color: #fb923c; }
.bonus-card.defense .bonus-card-value { color: #a78bfa; }

.bonus-card-bar {
  display: none;
}

@media (max-width: 900px) {
  .bonuses-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px; }
  .bonus-card { padding: 14px 16px; }
  .bonus-card-icon { width: 38px; height: 38px; font-size: 1.1rem; }
  .bonus-card-value { font-size: 1.2rem; }
}

@media (max-width: 500px) {
  .bonuses-grid { grid-template-columns: 1fr; gap: 8px; }
  .bonus-card { padding: 12px 14px; gap: 12px; }
}

@media (max-width: 768px) {
  .stats-highlight-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stats-grid-page { grid-template-columns: 1fr; }
  .stats-highlight-value { font-size: 1rem; }
  .stats-highlight { padding: 12px 8px; }
  .stats-highlight-icon { font-size: 1.2rem; }
  .stats-highlight-label { font-size: 0.65rem; }
}

/* Leaderboard */
.leaderboard-page { padding: 20px; max-width: 900px; margin: 0 auto; }

/* ==================== LEADERBOARD PROFESSIONAL STYLES ==================== */

/* Hero Header */
.lb-hero {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.02) 100%);
  border-radius: 24px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.lb-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.lb-hero-icon {
  font-size: 56px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.4));
}

.lb-hero h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.lb-hero p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Tabs */
.lb-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.lb-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.lb-tab:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.05);
  transform: translateY(-2px);
}

.lb-tab.active {
  background: linear-gradient(135deg, var(--gold), #c9a227);
  border-color: var(--gold);
  color: #1a1a2e;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
}

.lb-tab-icon {
  font-size: 1.2rem;
}

.lb-tab-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.lb-tab.active .lb-tab-label {
  color: #1a1a2e;
}

/* Container */
.lb-container {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
}

/* List */
.lb-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Loading */
.lb-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 16px;
}

.lb-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Leaderboard Item */
.lb-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.lb-item:hover {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.03);
  transform: translateX(4px);
}

/* Top 3 Styling */
.lb-item.rank-1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 215, 0, 0.03) 100%);
  border-color: rgba(255, 215, 0, 0.4);
}

.lb-item.rank-2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.12) 0%, rgba(192, 192, 192, 0.03) 100%);
  border-color: rgba(192, 192, 192, 0.4);
}

.lb-item.rank-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.12) 0%, rgba(205, 127, 50, 0.03) 100%);
  border-color: rgba(205, 127, 50, 0.4);
}

.lb-item.is-you {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

/* Rank */
.lb-rank {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.lb-item.rank-1 .lb-rank {
  background: linear-gradient(135deg, #ffd700, #b8860b);
  border-color: #ffd700;
  color: #1a1a2e;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.lb-item.rank-2 .lb-rank {
  background: linear-gradient(135deg, #c0c0c0, #808080);
  border-color: #c0c0c0;
  color: #1a1a2e;
  box-shadow: 0 4px 15px rgba(192, 192, 192, 0.4);
}

.lb-item.rank-3 .lb-rank {
  background: linear-gradient(135deg, #cd7f32, #8b4513);
  border-color: #cd7f32;
  color: #1a1a2e;
  box-shadow: 0 4px 15px rgba(205, 127, 50, 0.4);
}

/* Avatar */
.lb-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
  border: 2px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.lb-item.rank-1 .lb-avatar { border-color: #ffd700; }
.lb-item.rank-2 .lb-avatar { border-color: #c0c0c0; }
.lb-item.rank-3 .lb-avatar { border-color: #cd7f32; }

/* Info */
.lb-info {
  flex: 1;
  min-width: 0;
}

.lb-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-you-badge {
  font-size: 0.7rem;
  background: linear-gradient(135deg, var(--gold), #c9a227);
  color: #1a1a2e;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lb-cheater-badge {
  font-size: 0.7rem;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: cheatPulse 1s ease-in-out infinite;
}

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

.lb-item.is-cheater {
  background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(185,28,28,0.1)) !important;
  border: 1px solid rgba(239,68,68,0.5) !important;
}

.lb-details {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lb-detail {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Value */
.lb-value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  text-align: right;
  min-width: 100px;
}

/* Attack Section */
.lb-attack-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-bullets-input {
  width: 60px;
  padding: 10px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  text-align: center;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.lb-bullets-input:focus {
  border-color: var(--gold);
  outline: none;
}

.lb-bullets-input:disabled {
  opacity: 0.3;
}

.lb-attack-btn {
  padding: 12px 18px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lb-attack-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.lb-attack-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.lb-attack-btn.cooldown {
  background: linear-gradient(135deg, #4b5563, #374151);
  font-size: 0.8rem;
  padding: 10px 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .lb-hero h1 {
    font-size: 2rem;
  }
  
  .lb-tabs {
    gap: 6px;
  }
  
  .lb-tab {
    padding: 10px 16px;
  }
  
  .lb-tab-label {
    display: none;
  }
  
  .lb-item {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .lb-value {
    min-width: auto;
  }
  
  .lb-attack-section {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Legacy support */
.leaderboard-tab { display: none; }
.leaderboard-list { display: none; }
.leaderboard-header { display: none; }
.leaderboard-subtitle { display: none; }
.leaderboard-loading { display: none; }

/* Attack Result Modal */
.player-attack-modal { display: none; position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; }
.player-attack-modal.active { display: flex; }
.attack-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(4px); }
.attack-modal-card { position: relative; background: linear-gradient(145deg, var(--bg-card), var(--bg-primary)); border: 2px solid var(--gold); border-radius: 20px; padding: 36px 28px; max-width: 440px; width: 92%; text-align: center; animation: modalPop 0.3s ease; box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 40px rgba(212,175,55,0.1); }
@keyframes modalPop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.attack-result { margin-bottom: 20px; text-align: center; }
.attack-result-icon { font-size: 4.5rem; margin-bottom: 16px; animation: bounceIn 0.5s ease; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4)); }
@keyframes bounceIn { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

.attack-result-title { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin-bottom: 8px; letter-spacing: 4px; text-transform: uppercase; }
.attack-result-title.win { color: #4ade80; text-shadow: 0 0 30px rgba(74,222,128,0.6), 0 2px 10px rgba(74,222,128,0.3); }
.attack-result-title.lose { color: #f87171; text-shadow: 0 0 30px rgba(248,113,113,0.6), 0 2px 10px rgba(248,113,113,0.3); }

.attack-result > p { color: var(--text-muted); margin-bottom: 20px; font-size: 1rem; }

.attack-result-details { display: flex; flex-direction: column; gap: 0; margin-top: 20px; background: var(--bg-elevated); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }

.attack-result-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.attack-result-row:last-child { border-bottom: none; }
.attack-result-row .label { color: var(--text-muted); font-size: 0.9rem; display: flex; align-items: center; gap: 6px; }
.attack-result-row .value { font-weight: 700; font-family: var(--font-mono); font-size: 1rem; }
.attack-result-row .value.positive { color: #4ade80; text-shadow: 0 0 8px rgba(74,222,128,0.3); }
.attack-result-row .value.negative { color: #f87171; text-shadow: 0 0 8px rgba(248,113,113,0.3); }

/* Bodyguard section in attack result */
.attack-result-section { background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(212,175,55,0.02)); border-bottom: 1px solid rgba(212,175,55,0.2); }
.attack-result-section .attack-result-row { padding: 10px 16px; border-bottom: none; }
.attack-result-section .attack-result-row:first-child { padding-top: 12px; padding-bottom: 8px; background: rgba(212,175,55,0.1); border-bottom: 1px solid rgba(212,175,55,0.15); }
.attack-result-section .attack-result-row:first-child .label { color: var(--gold); font-size: 0.85rem; }

.attack-close-btn { margin-top: 24px; width: 100%; padding: 16px; font-size: 1rem; letter-spacing: 2px; background: linear-gradient(135deg, var(--gold), #a17f3a); border: none; border-radius: 12px; color: var(--bg-primary); font-weight: 700; cursor: pointer; transition: all 0.3s; }
.attack-close-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(212,175,55,0.4); }

/* Backfire Settings */
.backfire-card { grid-column: 1 / -1; }
.backfire-desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }
.backfire-options { display: flex; gap: 12px; flex-wrap: wrap; }
.backfire-btn { flex: 1; min-width: 100px; padding: 16px 12px; background: var(--bg-elevated); border: 2px solid var(--border); border-radius: 12px; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.backfire-btn:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.backfire-btn.active { border-color: var(--gold); background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05)); }
.backfire-icon { font-size: 1.8rem; }
.backfire-label { color: var(--text); font-weight: 600; font-size: 0.9rem; }
.backfire-btn.active .backfire-label { color: var(--gold); }

/* Spy Card */
.spy-card { background: linear-gradient(145deg, rgba(100,100,255,0.15), rgba(60,60,180,0.08)); border: 2px solid rgba(100,100,255,0.5); border-radius: var(--radius-lg); padding: 24px; text-align: center; box-shadow: 0 8px 32px rgba(100,100,255,0.15); display: flex; flex-direction: column; min-height: 320px; }
.spy-icon { font-size: 48px; margin-bottom: 12px; }
.spy-title { font-family: var(--font-display); font-size: 20px; letter-spacing: 2px; color: #8888ff; margin-bottom: 10px; text-shadow: 0 2px 8px rgba(100,100,255,0.4); }
.spy-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; flex-grow: 1; }
.spy-price { font-size: 20px; color: var(--gold); font-weight: bold; margin-bottom: 16px; font-family: var(--font-mono); text-shadow: 0 2px 8px rgba(212,168,83,0.3); }
.spy-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, #5555ff, #4444dd); border: 2px solid rgba(100,100,255,0.5); border-radius: var(--radius); color: white; font-weight: bold; font-size: 15px; cursor: pointer; transition: all 0.3s; text-transform: uppercase; letter-spacing: 2px; font-family: var(--font-display); margin-top: auto; box-shadow: 0 4px 15px rgba(100,100,255,0.3); }
.spy-btn:hover:not(.disabled) { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(100,100,255,0.4); }
.spy-btn.disabled { background: var(--bg-hover); border-color: var(--border); color: var(--text-muted); cursor: not-allowed; box-shadow: none; }

/* Spy Modal */
.spy-modal { position: fixed; inset: 0; z-index: 6000; display: none; align-items: center; justify-content: center; padding: 20px; }
.spy-modal.active { display: flex; }
.spy-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); }
.spy-modal-card { position: relative; background: linear-gradient(180deg, #1a1a2e 0%, #12121c 100%); border: 1px solid rgba(100, 100, 255, 0.3); border-radius: 16px; width: 100%; max-width: 400px; max-height: 70vh; overflow: hidden; }
.spy-close-btn { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; color: var(--text-muted); font-size: 16px; cursor: pointer; z-index: 10; }
.spy-close-btn:hover { background: rgba(194,59,59,0.2); border-color: var(--crimson); color: var(--crimson); }
.spy-modal-header { display: flex; align-items: center; gap: 12px; padding: 20px 24px; background: linear-gradient(180deg, rgba(100,100,255,0.1) 0%, transparent 100%); border-bottom: 1px solid rgba(255,255,255,0.06); }
.spy-modal-icon { font-size: 28px; }
.spy-modal-header h2 { font-family: var(--font-display); font-size: 20px; color: var(--text-primary); margin: 0; }
.spy-targets-list { max-height: 300px; overflow-y: auto; padding: 16px; }
.spy-target { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; }
.spy-target:hover { background: rgba(100,100,255,0.1); border-color: rgba(100,100,255,0.3); transform: translateX(4px); }
.spy-target-name { font-weight: 500; color: var(--text-primary); }
.spy-target-arrow { color: var(--gold); font-size: 18px; }
.spy-empty { text-align: center; padding: 40px; color: var(--text-muted); }
.spy-cancel-btn { width: calc(100% - 32px); margin: 16px; padding: 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: var(--text-muted); cursor: pointer; }
.spy-cancel-btn:hover { background: rgba(255,255,255,0.1); }

/* Spy Report Modal - Premium Design */
.spy-report-modal { position: fixed; inset: 0; z-index: 7000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity 0.3s ease; }
.spy-report-modal.active { opacity: 1; }
.spy-report-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); }
.spy-report-container { position: relative; background: linear-gradient(180deg, #1a1a2e 0%, #0d0d1a 100%); border: 2px solid rgba(100,100,255,0.4); border-radius: 20px; width: 100%; max-width: 420px; padding: 0; overflow: hidden; box-shadow: 0 25px 80px rgba(0,0,0,0.8), 0 0 60px rgba(100,100,255,0.2), inset 0 1px 0 rgba(255,255,255,0.1); transform: scale(0.9); transition: transform 0.3s ease; }
.spy-report-modal.active .spy-report-container { transform: scale(1); }
.spy-report-glow { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(100,100,255,0.1) 0%, transparent 50%); pointer-events: none; }
.spy-report-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; color: var(--text-muted); font-size: 18px; cursor: pointer; z-index: 10; transition: all 0.2s; }
.spy-report-close:hover { background: rgba(194,59,59,0.3); border-color: var(--crimson); color: white; }

.spy-report-header { text-align: center; padding: 30px 24px 20px; background: linear-gradient(180deg, rgba(100,100,255,0.15) 0%, transparent 100%); border-bottom: 1px solid rgba(100,100,255,0.2); }
.spy-report-icon-wrapper { width: 70px; height: 70px; margin: 0 auto 16px; background: linear-gradient(135deg, rgba(100,100,255,0.3), rgba(100,100,255,0.1)); border: 2px solid rgba(100,100,255,0.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 32px rgba(100,100,255,0.3); }
.spy-report-icon { font-size: 36px; }
.spy-report-title { font-family: var(--font-display); font-size: 28px; letter-spacing: 4px; color: #8888ff; margin: 0; text-shadow: 0 2px 20px rgba(100,100,255,0.5); }
.spy-report-subtitle { font-size: 12px; color: var(--text-muted); letter-spacing: 3px; margin-top: 6px; text-transform: uppercase; }

.spy-report-target-section { padding: 20px 24px; background: rgba(0,0,0,0.3); border-bottom: 1px solid rgba(255,255,255,0.05); }
.spy-report-target-label { font-size: 10px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.spy-report-target-name { font-family: var(--font-display); font-size: 24px; color: var(--gold); letter-spacing: 2px; text-shadow: 0 2px 15px rgba(212,168,83,0.4); }

.spy-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 20px 24px; }
.spy-report-stat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; transition: all 0.2s; }
.spy-report-stat:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
.spy-report-stat.highlight { background: linear-gradient(135deg, rgba(100,100,255,0.15), rgba(100,100,255,0.05)); border-color: rgba(100,100,255,0.3); }
.spy-report-stat.gold { background: linear-gradient(135deg, rgba(212,168,83,0.15), rgba(212,168,83,0.05)); border-color: rgba(212,168,83,0.3); }
.spy-report-stat.red { background: linear-gradient(135deg, rgba(194,59,59,0.15), rgba(194,59,59,0.05)); border-color: rgba(194,59,59,0.3); }
.spy-report-stat-icon { font-size: 24px; }
.spy-report-stat-info { display: flex; flex-direction: column; gap: 2px; }
.spy-report-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.spy-report-stat-value { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--text-primary); }
.spy-report-stat.highlight .spy-report-stat-value { color: #8888ff; }
.spy-report-stat.gold .spy-report-stat-value { color: var(--gold); }
.spy-report-stat.red .spy-report-stat-value { color: var(--crimson); }

.spy-report-section { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.05); }
.spy-report-section-title { font-size: 12px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
.spy-report-row { display: flex; gap: 10px; }
.spy-report-mini { flex: 1; padding: 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; text-align: center; }
.spy-report-mini span { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.spy-report-mini strong { font-family: var(--font-mono); font-size: 18px; color: var(--text-primary); }
.spy-report-mini.green strong { color: var(--emerald); }
.spy-report-mini.red strong { color: var(--crimson); }

.spy-report-btn { width: calc(100% - 48px); margin: 20px 24px 24px; padding: 16px; background: linear-gradient(135deg, #5555ff, #4444cc); border: none; border-radius: 12px; color: white; font-family: var(--font-display); font-size: 16px; letter-spacing: 3px; cursor: pointer; transition: all 0.3s; box-shadow: 0 8px 25px rgba(100,100,255,0.3); }
.spy-report-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(100,100,255,0.4); }


/* Password Modal */
.password-modal { position: fixed; inset: 0; z-index: 8000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.password-modal.active { opacity: 1; pointer-events: all; }
.password-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); }
.password-modal-container { position: relative; background: linear-gradient(180deg, #1a2a1a 0%, #0d1a0d 100%); border: 2px solid rgba(76,175,80,0.5); border-radius: 20px; width: 100%; max-width: 420px; padding: 30px; box-shadow: 0 25px 80px rgba(0,0,0,0.8), 0 0 60px rgba(76,175,80,0.2); transform: scale(0.9); transition: transform 0.3s ease; }
.password-modal.active .password-modal-container { transform: scale(1); }
.password-modal-header { text-align: center; margin-bottom: 24px; }
.password-modal-icon { font-size: 60px; margin-bottom: 16px; }
.password-modal-header h2 { font-family: var(--font-display); font-size: 28px; color: var(--emerald); letter-spacing: 2px; margin: 0; }
.password-modal-body { text-align: center; }
.password-modal-body p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
.password-modal-body strong { color: var(--text-primary); }
.password-display { display: flex; align-items: center; justify-content: center; gap: 12px; background: rgba(0,0,0,0.4); border: 2px solid var(--emerald); border-radius: 12px; padding: 16px 20px; margin: 20px 0; }
.password-display span { font-family: var(--font-mono); font-size: 24px; color: var(--emerald); letter-spacing: 3px; font-weight: bold; }
.copy-btn { padding: 8px 16px; background: var(--emerald); border: none; border-radius: 8px; color: white; font-weight: bold; cursor: pointer; transition: all 0.2s; }
.copy-btn:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(76,175,80,0.4); }
.password-warning { background: rgba(255,193,7,0.15); border: 1px solid rgba(255,193,7,0.4); border-radius: 10px; padding: 14px; margin: 20px 0; color: #ffc107; font-size: 14px; }
.password-email { font-size: 13px; color: var(--text-muted); margin-top: 16px; }
.password-modal-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--emerald), #2e7d32); border: none; border-radius: 12px; color: white; font-family: var(--font-display); font-size: 16px; letter-spacing: 2px; cursor: pointer; transition: all 0.3s; margin-top: 20px; }
.password-modal-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(76,175,80,0.4); }

/* Backfire Custom Input */
.backfire-custom-input { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 12px; background: rgba(0,0,0,0.3); border-radius: 10px; }
.backfire-custom-input label { font-size: 13px; color: var(--text-muted); }
.backfire-custom-input input { width: 100px; padding: 8px 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: var(--text-primary); font-family: var(--font-mono); font-size: 14px; }
.backfire-custom-input input:focus { outline: none; border-color: var(--gold); }
.backfire-save-btn { padding: 8px 16px; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border: none; border-radius: 8px; color: #000; font-weight: bold; cursor: pointer; transition: all 0.2s; }
.backfire-save-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(212,168,83,0.3); }

/* Backfire Settings */
.backfire-custom-setting { display: flex; align-items: center; gap: 12px; margin-top: 15px; }
.backfire-custom-setting label { font-size: 14px; color: var(--text-secondary); }
.backfire-custom-setting input { width: 120px; padding: 10px 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: var(--text-primary); font-family: var(--font-mono); font-size: 16px; }
.backfire-custom-setting input:focus { outline: none; border-color: var(--gold); }
.backfire-hint { font-size: 12px; color: var(--text-muted); margin-top: 10px; font-style: italic; }

/* Profile Settings Card - Premium Design */
.profile-card { padding: 0; overflow: hidden; }
.profile-hero { display: flex; flex-direction: column; align-items: center; padding: 32px 24px 24px; background: linear-gradient(180deg, rgba(212,168,83,0.1) 0%, transparent 100%); border-bottom: 1px solid rgba(255,255,255,0.05); position: relative; }
.profile-avatar-large { width: 120px; height: 120px; border-radius: 50%; background: linear-gradient(135deg, #2a2a3e, #1a1a2e); border: 4px solid var(--gold); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 4px rgba(212,168,83,0.1); }
.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; display: none; }
.profile-avatar-large span { font-size: 56px; }
.avatar-edit-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; cursor: pointer; border-radius: 50%; }
.avatar-edit-overlay span { font-size: 28px; }
.profile-avatar-large:hover .avatar-edit-overlay { opacity: 1; }
.profile-details { text-align: center; margin-top: 16px; }
.profile-details h2 { font-family: var(--font-display); font-size: 26px; color: var(--text-primary); margin: 0 0 8px; letter-spacing: 1px; }
.profile-badge { display: inline-block; padding: 6px 14px; background: rgba(212,168,83,0.15); border: 1px solid rgba(212,168,83,0.3); border-radius: 20px; font-size: 12px; color: var(--gold); letter-spacing: 0.5px; }
.avatar-remove-btn { margin-top: 16px; padding: 8px 16px; background: transparent; border: 1px solid rgba(194,59,59,0.3); border-radius: 8px; color: var(--crimson); font-size: 13px; cursor: pointer; transition: all 0.2s; display: none; }
.avatar-remove-btn:hover { background: rgba(194,59,59,0.1); border-color: var(--crimson); }

.avatar-picker-section { padding: 24px; }
.picker-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.picker-title { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.picker-line { flex: 1; height: 1px; background: rgba(255,255,255,0.08); }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.avatar-item { aspect-ratio: 1; background: rgba(255,255,255,0.03); border: 2px solid rgba(255,255,255,0.06); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 28px; cursor: pointer; transition: all 0.2s; }
.avatar-item:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }
.avatar-item.selected { background: rgba(212,168,83,0.15); border-color: var(--gold); box-shadow: 0 4px 20px rgba(212,168,83,0.2); }

@media (max-width: 500px) { 
  .avatar-grid { grid-template-columns: repeat(4, 1fr); }
  .profile-avatar-large { width: 100px; height: 100px; }
  .profile-avatar-large span { font-size: 44px; }
}

/* Avatar Upload */
.avatar-upload-section { display: flex; gap: 10px; margin-top: 15px; }
.upload-btn { padding: 10px 20px; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border-radius: 10px; color: #000; font-weight: bold; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.upload-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(212,168,83,0.3); }
.remove-avatar-btn { padding: 10px 16px; background: rgba(194,59,59,0.2); border: 1px solid var(--crimson); border-radius: 10px; color: var(--crimson); font-weight: bold; cursor: pointer; transition: all 0.2s; }
.remove-avatar-btn:hover { background: rgba(194,59,59,0.3); }
.avatar-divider { width: 100%; text-align: center; margin: 15px 0; position: relative; }
.avatar-divider::before, .avatar-divider::after { content: ''; position: absolute; top: 50%; width: 35%; height: 1px; background: rgba(255,255,255,0.1); }
.avatar-divider::before { left: 0; }
.avatar-divider::after { right: 0; }
.avatar-divider span { background: var(--bg-card); padding: 0 15px; font-size: 12px; color: var(--text-muted); }
#avatarEmoji { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

/* Forgot Password */
.forgot-password-link { background: none; border: none; color: var(--gold); font-size: 13px; cursor: pointer; padding: 8px 0 0; text-decoration: underline; display: block; text-align: right; }
.forgot-password-link:hover { color: var(--text-primary); }
.forgot-password-modal { display: none; position: fixed; inset: 0; z-index: 10000; align-items: center; justify-content: center; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); }
.forgot-password-modal.active { display: flex; }
.forgot-password-card { background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated)); border: 1px solid var(--border-gold); border-radius: 16px; padding: 30px; max-width: 400px; width: 90%; animation: modalPop 0.3s ease-out; }
.forgot-password-card h3 { font-family: var(--font-display); font-size: 22px; color: var(--gold); margin-bottom: 15px; text-align: center; }
.forgot-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; text-align: center; line-height: 1.5; }
.forgot-error { color: var(--crimson); font-size: 13px; margin-top: 10px; text-align: center; display: none; }
.forgot-success { color: #4ade80; font-size: 13px; margin-top: 10px; text-align: center; display: none; }
.forgot-actions { display: flex; gap: 12px; margin-top: 20px; }
.forgot-actions .btn { flex: 1; }

/* Family Trophy System */
.family-trophy-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-top: 20px; }
.family-trophy-section h3 { font-family: var(--font-display); font-size: 18px; color: var(--gold); margin-bottom: 16px; }
.family-trophy-section h4 { font-size: 15px; color: var(--text-primary); margin: 20px 0 8px; }
.trophy-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.trophy-display { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding: 16px; background: rgba(0,0,0,0.2); border-radius: 12px; min-height: 80px; }
.no-trophies { color: var(--text-muted); font-size: 14px; width: 100%; text-align: center; padding: 20px; }
.trophy-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 16px; background: linear-gradient(135deg, rgba(212,168,83,0.2), rgba(212,168,83,0.05)); border: 2px solid var(--gold); border-radius: 12px; min-width: 90px; }
.trophy-item .trophy-icon { font-size: 32px; }
.trophy-item .trophy-name { font-size: 11px; color: var(--text-primary); text-align: center; font-weight: 600; }
.trophy-item .trophy-from { font-size: 10px; color: var(--text-muted); }
.trophy-targets { display: flex; flex-direction: column; gap: 10px; }
.trophy-target { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; transition: all 0.2s; }
.trophy-target:hover { border-color: var(--gold-dim); background: rgba(255,255,255,0.05); }
.trophy-target-info { display: flex; align-items: center; gap: 12px; }
.trophy-target-emblem { font-size: 28px; }
.trophy-target-details h5 { font-size: 14px; color: var(--text-primary); margin: 0 0 4px; }
.trophy-target-details span { font-size: 12px; color: var(--text-muted); }
.trophy-target-trophies { display: flex; align-items: center; gap: 6px; font-size: 18px; color: var(--gold); }
.trophy-attack-btn { padding: 10px 18px; background: linear-gradient(135deg, #dc2626, #991b1b); border: none; border-radius: 8px; color: white; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.trophy-attack-btn:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(220,38,38,0.4); }
.trophy-attack-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.trophy-card .fstat-value { color: var(--gold); }
.trophy-cooldown { font-size: 11px; color: var(--crimson); margin-top: 4px; }

/* Trophy Battle Result Modal */
.trophy-result-modal { display: none; position: fixed; inset: 0; z-index: 10000; align-items: center; justify-content: center; background: rgba(0,0,0,0.9); backdrop-filter: blur(8px); }
.trophy-result-modal.active { display: flex; }
.trophy-result-card { background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated)); border-radius: 20px; padding: 30px; max-width: 420px; width: 90%; text-align: center; animation: modalPop 0.4s ease-out; }
.trophy-result-icon { font-size: 72px; margin-bottom: 16px; }
.trophy-result-title { font-family: var(--font-display); font-size: 28px; margin-bottom: 12px; }
.trophy-result-title.win { color: #4ade80; }
.trophy-result-title.lose { color: var(--crimson); }
.trophy-result-desc { font-size: 15px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.trophy-result-stats { display: flex; justify-content: center; gap: 30px; margin-bottom: 24px; padding: 16px; background: rgba(0,0,0,0.2); border-radius: 12px; }
.trophy-stat { text-align: center; }
.trophy-stat-value { font-family: var(--font-mono); font-size: 22px; font-weight: bold; }
.trophy-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.trophy-result-close { padding: 12px 32px; background: linear-gradient(135deg, var(--gold), var(--gold-dim)); border: none; border-radius: 10px; color: #000; font-weight: bold; font-size: 15px; cursor: pointer; }

/* Family Ammo/Arsenal Section */
.family-ammo-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-top: 20px; }
.family-ammo-section h3 { font-family: var(--font-display); font-size: 18px; color: var(--gold); margin-bottom: 16px; }
.ammo-display { display: flex; gap: 20px; justify-content: center; margin-bottom: 16px; }
.ammo-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 24px; background: rgba(0,0,0,0.3); border-radius: 12px; min-width: 120px; }
.ammo-stat .ammo-icon { font-size: 28px; }
.ammo-stat .ammo-value { font-family: var(--font-mono); font-size: 24px; font-weight: bold; color: var(--gold); }
.ammo-stat .ammo-label { font-size: 12px; color: var(--text-muted); }
.ammo-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; text-align: center; }
.ammo-actions { display: flex; gap: 12px; justify-content: center; }
.ammo-actions input { width: 150px; padding: 10px 14px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-family: var(--font-mono); }
.ammo-actions input:focus { border-color: var(--gold); outline: none; }
.ammo-contributors { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.ammo-contributors h4 { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.contributor-list { display: flex; flex-wrap: wrap; gap: 8px; }
.contributor-item { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(255,255,255,0.05); border-radius: 20px; font-size: 13px; }
.contributor-item .contrib-name { color: var(--text-primary); }
.contributor-item .contrib-amount { color: var(--gold); font-weight: bold; }

/* ============================================

/* ============================================

/* ============================================

/* ============================================

/* ============================================
   FAMILY PAGE - PREMIUM DESIGN
   ============================================ */

/* NOT FOUNDED */
.family-not-founded {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.found-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(15,15,25,1) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.found-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.found-card-icon {
  font-size: 40px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  border: 2px solid var(--gold);
  border-radius: 16px;
}

.found-card-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-primary);
}

.found-card-body {
  padding: 28px;
}

.found-input-group {
  margin-bottom: 24px;
}

.found-input-group label {
  display: block;
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.found-input-group input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(0,0,0,0.4);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.2s ease;
}

.found-input-group input:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 4px rgba(212,175,55,0.1);
}

.emblem-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.emblem-opt {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(0,0,0,0.3);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.emblem-opt:hover {
  border-color: var(--gold-dim);
  transform: scale(1.05);
}

.emblem-opt.selected {
  border-color: var(--gold);
  background: rgba(212,175,55,0.2);
  box-shadow: 0 0 20px rgba(212,175,55,0.3);
}

.found-card-footer {
  padding: 24px 28px;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--border);
}

.found-cost {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.found-cost .cost-label {
  color: var(--text-muted);
}

.found-cost .cost-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: bold;
  color: var(--gold);
}

.found-balance-line {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.found-balance-line span {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.found-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold) 0%, #b8860b 100%);
  border: none;
  border-radius: 12px;
  color: #000;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.found-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212,175,55,0.4);
}

/* FOUNDED PAGE */
.family-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 40px;
}

/* Hero Header */
.fam-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
  border: 1px solid var(--border);
}

.fam-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212,175,55,0.1) 0%, transparent 50%);
}

.fam-hero-content {
  position: relative;
  padding: 32px;
}

.fam-hero-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.fam-emblem-wrap {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(212,175,55,0.2), rgba(212,175,55,0.05));
  border: 2px solid var(--gold);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(212,175,55,0.2);
}

.fam-emblem-icon {
  font-size: 42px;
}

.fam-hero-info h1 {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.fam-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(212,175,55,0.15);
  border: 1px solid var(--gold-dim);
  border-radius: 30px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: bold;
  color: var(--gold);
}

/* Card Container */
.fam-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.fam-card-title {
  padding: 18px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border);
}

/* Vault */
.fam-vault-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.fam-vault-box {
  padding: 24px;
  border-right: 1px solid var(--border);
}

.fam-vault-box:last-child {
  border-right: none;
}

.vault-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.vault-emoji {
  font-size: 32px;
}

.vault-info {
  flex: 1;
}

.vault-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: bold;
  color: var(--text-primary);
}

.vault-lbl {
  font-size: 12px;
  color: var(--text-muted);
}

.vault-deposit {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.vault-deposit input {
  flex: 1;
  padding: 12px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
}

.vault-deposit input:focus {
  border-color: var(--gold);
  outline: none;
}

.vault-deposit-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--gold), #b8860b);
  border: none;
  border-radius: 10px;
  color: #000;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vault-deposit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(212,175,55,0.3);
}

.vault-own {
  font-size: 12px;
  color: var(--text-muted);
}

.vault-own strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* Power Section */
.fam-power-section {
  padding: 24px;
}

.power-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.power-stat-box {
  flex: 1;
  padding: 20px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}

.power-stat-box.highlight {
  border-color: var(--gold-dim);
  background: rgba(212,175,55,0.05);
}

.power-stat-box .ps-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: bold;
  color: var(--gold);
  margin-bottom: 4px;
}

.power-stat-box .ps-lbl {
  font-size: 12px;
  color: var(--text-muted);
}

.power-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.pwr-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: linear-gradient(180deg, rgba(212,175,55,0.1) 0%, rgba(212,175,55,0.02) 100%);
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pwr-btn:hover {
  background: linear-gradient(180deg, rgba(212,175,55,0.2) 0%, rgba(212,175,55,0.05) 100%);
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212,175,55,0.2);
}

.pwr-btn-amount {
  font-size: 24px;
  font-weight: bold;
  color: var(--gold);
}

.pwr-btn-cost {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Owned Items */
.fam-owned-list {
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 60px;
}

.owned-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
  border: 1px solid rgba(16,185,129,0.4);
  border-radius: 10px;
}

.owned-item .item-icon {
  font-size: 22px;
}

.owned-item .item-name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.owned-item .item-power {
  font-size: 12px;
  color: #10b981;
  font-family: var(--font-mono);
  font-weight: bold;
}

.owned-empty {
  width: 100%;
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Shop List */
.fam-shop-list {
  max-height: 500px;
  overflow-y: auto;
}

.shop-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  transition: all 0.15s ease;
}

.shop-item:last-child {
  border-bottom: none;
}

.shop-item:hover {
  background: rgba(255,255,255,0.02);
}

.shop-item.owned {
  background: rgba(16,185,129,0.05);
}

.shop-item .item-icon {
  font-size: 30px;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212,175,55,0.1);
  border: 1px solid var(--gold-dim);
  border-radius: 12px;
  flex-shrink: 0;
}

.shop-item.owned .item-icon {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.4);
}

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

.shop-item .item-info h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.shop-item .item-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.shop-item .item-stats {
  text-align: right;
  margin-right: 12px;
}

.shop-item .item-power {
  display: block;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: bold;
  color: var(--gold);
}

.shop-item .item-cost {
  font-size: 11px;
  color: var(--text-muted);
}

.shop-item .item-cost.affordable { color: #10b981; }
.shop-item .item-cost.expensive { color: #ef4444; }

.shop-buy-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--gold), #b8860b);
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.shop-buy-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212,175,55,0.3);
}

.shop-buy-btn:disabled {
  background: rgba(255,255,255,0.1);
  color: var(--text-muted);
  cursor: not-allowed;
}

.shop-buy-btn.owned-btn {
  background: #10b981;
  color: white;
}

/* Leave Box */
.fam-leave-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
}

.fam-leave-btn {
  padding: 12px 28px;
  background: transparent;
  border: 1px solid rgba(239,68,68,0.5);
  border-radius: 10px;
  color: #ef4444;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fam-leave-btn:hover {
  background: rgba(239,68,68,0.1);
  border-color: #ef4444;
}

.fam-leave-warn {
  font-size: 12px;
  color: var(--text-muted);
}

/* Mobile */
@media (max-width: 600px) {
  .emblem-picker { grid-template-columns: repeat(4, 1fr); }
  .fam-hero-content { padding: 24px; }
  .fam-hero-left { flex-direction: column; text-align: center; }
  .fam-hero-info h1 { font-size: 26px; }
  .fam-vault-grid { grid-template-columns: 1fr; }
  .fam-vault-box { border-right: none; border-bottom: 1px solid var(--border); }
  .fam-vault-box:last-child { border-bottom: none; }
  .power-stats { flex-direction: column; }
  .power-buttons { grid-template-columns: repeat(2, 1fr); }
  .shop-item { flex-wrap: wrap; }
  .shop-item .item-stats { order: 3; width: 100%; text-align: left; margin: 8px 0 0 70px; }
  .shop-buy-btn { order: 4; width: 100%; margin-top: 12px; }
}

/* Power stat box icon */
.power-stat-box .ps-icon {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

/* Power button icon */
.pwr-btn-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

/* Family Tabs */
.family-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 20px;
  background: rgba(0,0,0,0.3);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.family-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.family-tab:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.family-tab.active {
  background: var(--gold);
  color: #000;
  font-weight: 600;
}

.family-tab-content {
  display: none;
}

.family-tab-content.active {
  display: block;
}

/* All Families */
.all-families-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.all-families-header {
  padding: 24px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.all-families-header h2 {
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.all-families-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.all-families-list {
  max-height: 600px;
  overflow-y: auto;
}

.families-loading {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}

.family-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  transition: all 0.15s ease;
}

.family-row:last-child {
  border-bottom: none;
}

.family-row:hover {
  background: rgba(255,255,255,0.02);
}

.family-row.my-family {
  background: rgba(212,175,55,0.08);
}

.family-rank {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  font-weight: bold;
  font-size: 14px;
  color: var(--text-muted);
}

.family-rank.top-1 {
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #000;
}

.family-rank.top-2 {
  background: linear-gradient(135deg, #c0c0c0, #808080);
  color: #000;
}

.family-rank.top-3 {
  background: linear-gradient(135deg, #cd7f32, #8b4513);
  color: #fff;
}

.family-row-emblem {
  font-size: 32px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212,175,55,0.1);
  border: 1px solid var(--gold-dim);
  border-radius: 12px;
}

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

.family-row-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.family-row-owner {
  font-size: 12px;
  color: var(--text-muted);
}

.family-row-stats {
  display: flex;
  gap: 20px;
  text-align: center;
}

.family-stat {
  display: flex;
  flex-direction: column;
}

.family-stat-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: bold;
  color: var(--gold);
}

.family-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.no-families {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.no-families-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

@media (max-width: 600px) {
  .family-tabs { flex-direction: column; }
  .family-row { flex-wrap: wrap; }
  .family-row-stats { width: 100%; justify-content: space-around; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
}

/* Family Profile Modal */
.family-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.family-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.family-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.family-modal-emblem {
  font-size: 48px;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  border: 2px solid var(--gold);
  border-radius: 16px;
}

.family-modal-title {
  flex: 1;
}

.family-modal-title h2 {
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.family-modal-trophies {
  font-size: 18px;
  color: var(--gold);
  font-family: var(--font-mono);
}

.family-modal-close {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.family-modal-close:hover {
  background: rgba(255,255,255,0.2);
  color: var(--text-primary);
}

.family-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.family-modal-body h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.family-members-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.family-member {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.member-rank {
  font-size: 24px;
}

.member-info {
  flex: 1;
}

.member-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.member-role {
  font-size: 12px;
  color: var(--text-muted);
}

.member-stats {
  text-align: right;
}

.member-level {
  font-size: 13px;
  color: var(--gold);
  font-family: var(--font-mono);
  background: rgba(212,175,55,0.1);
  padding: 4px 10px;
  border-radius: 6px;
}

.no-members {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
}

/* Make family rows clickable */
.family-row {
  cursor: pointer;
}

.family-row:hover {
  background: rgba(212,175,55,0.08);
}

/* Player Power Display */
.player-power {
  margin-top: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.05));
  border: 1px solid var(--gold-dim);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: bold;
  color: var(--gold);
}

/* Bonus Shop Items */
.item-bonus {
  font-size: 12px;
  color: #4ade80;
  font-weight: 600;
  background: rgba(74, 222, 128, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
}

.owned-item .item-bonus {
  font-size: 11px;
  color: var(--gold);
}

/* Familie Aanval Section */
.fam-attack-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.fam-attack-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fam-attack-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
}

/* Familie Attack List */
.family-attack-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.family-attack-target {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.family-attack-target:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
}

.target-emblem {
  font-size: 28px;
}

.target-info {
  flex: 1;
}

.target-name {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
}

.target-owner {
  font-size: 12px;
  color: var(--text-muted);
}

.target-trophies {
  font-family: var(--font-mono);
  color: var(--gold);
}

.target-arrow {
  font-size: 20px;
  color: #dc2626;
}

/* Attack Result Modal */
.attack-result-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.attack-result-modal.active {
  opacity: 1;
}

.attack-result-content {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  max-width: 350px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.attack-result-modal.active .attack-result-content {
  transform: scale(1);
}

.attack-result-content.win {
  border: 2px solid var(--gold);
  box-shadow: 0 0 60px rgba(212,175,55,0.3);
}

.attack-result-content.lose {
  border: 2px solid #dc2626;
  box-shadow: 0 0 60px rgba(220,38,38,0.3);
}

.attack-result-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.attack-result-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 12px;
}

.attack-result-content.win .attack-result-title {
  color: var(--gold);
}

.attack-result-content.lose .attack-result-title {
  color: #dc2626;
}

.attack-result-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.attack-result-trophies {
  font-size: 32px;
  font-family: var(--font-mono);
  font-weight: bold;
  margin-bottom: 24px;
}

.attack-result-content.win .attack-result-trophies {
  color: #4ade80;
}

.attack-result-content.lose .attack-result-trophies {
  color: #dc2626;
}

.attack-result-btn {
  padding: 14px 40px;
  background: var(--gold);
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.family-modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* Familie Modal Actions */
.family-modal-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.family-attack-modal-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.family-attack-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5);
}

/* Attack Result Total */
.attack-result-total {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Familie Modal Stats */
.family-modal-stats {
  display: flex;
  gap: 16px;
  margin-top: 6px;
}

.family-modal-trophies,
.family-modal-power {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
}

.family-modal-trophies {
  color: var(--gold);
}

.family-modal-power {
  color: #60a5fa;
}

/* Attack Result Details */
.attack-result-details {
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.attack-result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 16px;
  font-family: var(--font-mono);
}

.attack-result-row:first-child {
  border-bottom: 1px solid var(--border);
}

.attack-result-row.win span:last-child {
  color: #4ade80;
}

.attack-result-row.lose span:last-child {
  color: #dc2626;
}

/* ========================================
   FAMILIE ATTACK RESULT MODAL - PRO STYLE
   ======================================== */

.family-attack-result-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.family-attack-result-modal.active {
  opacity: 1;
  visibility: visible;
}

.family-attack-result-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
}

.family-attack-result-card {
  position: relative;
  width: 90%;
  max-width: 400px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 24px;
  overflow: hidden;
  transform: scale(0.8) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.family-attack-result-modal.active .family-attack-result-card {
  transform: scale(1) translateY(0);
}

/* Victory styling */
.family-attack-result-card.victory {
  border: 2px solid var(--gold);
}

.family-attack-result-card.victory .family-attack-result-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
  animation: glowPulse 2s ease-in-out infinite;
}

/* Defeat styling */
.family-attack-result-card.defeat {
  border: 2px solid #dc2626;
}

.family-attack-result-card.defeat .family-attack-result-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.15) 0%, transparent 60%);
  animation: glowPulse 2s ease-in-out infinite;
}

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

/* Header */
.family-attack-result-header {
  position: relative;
  padding: 32px 24px 24px;
  text-align: center;
}

.family-attack-result-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounceIn 0.6s ease-out 0.2s both;
}

.victory .family-attack-result-icon-wrapper {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  border: 2px solid var(--gold);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.defeat .family-attack-result-icon-wrapper {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(220, 38, 38, 0.05));
  border: 2px solid #dc2626;
  box-shadow: 0 0 30px rgba(220, 38, 38, 0.3);
}

.family-attack-result-icon {
  font-size: 40px;
}

.family-attack-result-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0 0 8px;
  animation: slideUp 0.5s ease-out 0.3s both;
}

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

.defeat .family-attack-result-title {
  color: #dc2626;
  text-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.family-attack-result-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  animation: slideUp 0.5s ease-out 0.4s both;
}

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

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

/* Stats */
.family-attack-result-stats {
  position: relative;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.family-attack-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  animation: slideUp 0.5s ease-out 0.5s both;
}

.family-attack-stat:nth-child(2) {
  animation-delay: 0.6s;
}

.family-attack-stat.gain {
  border-left: 3px solid #4ade80;
}

.family-attack-stat.loss {
  border-left: 3px solid #dc2626;
}

.family-attack-stat-icon {
  font-size: 28px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.family-attack-stat-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.family-attack-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.family-attack-stat-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.family-attack-stat.gain .family-attack-stat-value {
  color: #4ade80;
}

.family-attack-stat.loss .family-attack-stat-value {
  color: #dc2626;
}

/* Footer */
.family-attack-result-footer {
  position: relative;
  padding: 24px;
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.family-attack-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
}

.family-attack-total-label {
  font-size: 13px;
  color: var(--text-muted);
}

.family-attack-total-value {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--gold);
}

.family-attack-result-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.victory .family-attack-result-btn {
  background: linear-gradient(135deg, var(--gold), #b8860b);
  color: #000;
}

.defeat .family-attack-result-btn {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
}

.family-attack-result-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ========================================
   PROFESSIONAL FAMILY PAGE STYLES
   ======================================== */

/* Hero Header */
.family-hero {
  position: relative;
  padding: 40px 24px;
  margin: -20px -20px 24px;
  overflow: hidden;
}

.family-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  z-index: 0;
}

.family-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.family-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 24px;
}

.family-hero-emblem {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.05));
  border: 3px solid var(--gold);
  border-radius: 24px;
  box-shadow: 0 0 40px rgba(212,175,55,0.3);
}

.family-hero-info {
  flex: 1;
}

.family-hero-name {
  font-size: 32px;
  font-weight: 800;
  color: white;
  margin: 0 0 12px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.family-hero-stats {
  display: flex;
  gap: 24px;
}

.family-hero-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.fhs-icon {
  font-size: 20px;
}

.fhs-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--gold);
}

.fhs-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Quick Stats */
.family-quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.fqs-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  transition: all 0.2s ease;
}

.fqs-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.fqs-icon {
  font-size: 28px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212,175,55,0.1);
  border-radius: 12px;
}

.fqs-info {
  display: flex;
  flex-direction: column;
}

.fqs-value {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: white;
}

.fqs-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Family Grid */
.family-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Family Section */
.family-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  overflow: hidden;
}

.family-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.fsh-icon {
  font-size: 22px;
}

.family-section-header h2 {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 0;
}

.fsh-badge {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--gold);
  padding: 4px 10px;
  background: rgba(212,175,55,0.15);
  border-radius: 6px;
}

.family-section-content {
  padding: 20px;
}

/* Vault Cards */
.vault-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.vault-card {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  overflow: hidden;
}

.vault-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.vault-emoji {
  font-size: 20px;
}

.vault-title {
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.vault-card-body {
  padding: 16px;
}

.vault-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.vault-input-group input {
  flex: 1;
  padding: 12px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-family: var(--font-mono);
}

.vault-input-group input:focus {
  outline: none;
  border-color: var(--gold);
}

.vault-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--gold), #b8860b);
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vault-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212,175,55,0.4);
}

.vault-balance {
  font-size: 13px;
  color: var(--text-muted);
}

.vault-balance strong {
  color: var(--gold);
}

/* Power Grid */
.power-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.power-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.power-btn:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.power-btn.featured {
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
  border-color: var(--gold-dim);
}

.pb-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  background: var(--gold);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
}

.pb-amount {
  font-size: 24px;
  font-weight: 800;
  color: white;
}

.pb-cost {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Owned Grid */
.owned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.owned-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(74,222,128,0.1), rgba(74,222,128,0.02));
  border: 1px solid rgba(74,222,128,0.2);
  border-radius: 12px;
  text-align: center;
}

.owned-item .item-icon {
  font-size: 28px;
}

.owned-item .item-name {
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.owned-item .item-bonus {
  font-size: 11px;
  color: #4ade80;
}

.owned-empty {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Shop Grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.shop-item {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.shop-item:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.shop-item.owned {
  opacity: 0.5;
  pointer-events: none;
}

.shop-item .item-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.shop-item .item-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 0 0 4px;
}

.shop-item .item-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.shop-item .item-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.shop-item .item-bonus {
  font-size: 13px;
  color: #4ade80;
  font-weight: 600;
}

.shop-item .item-cost {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.shop-item .item-cost.affordable {
  color: var(--gold);
}

.shop-buy-btn {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--gold), #b8860b);
  border: none;
  border-radius: 8px;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shop-buy-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212,175,55,0.4);
}

.shop-buy-btn:disabled {
  background: rgba(255,255,255,0.1);
  color: var(--text-muted);
  cursor: not-allowed;
}

.shop-buy-btn.owned-btn {
  background: rgba(74,222,128,0.2);
  color: #4ade80;
}

/* Family Footer */
.family-footer {
  margin-top: 32px;
  padding: 24px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.family-leave-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(220,38,38,0.1);
  border: 1px solid rgba(220,38,38,0.3);
  border-radius: 10px;
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.family-leave-btn:hover {
  background: rgba(220,38,38,0.2);
  border-color: #dc2626;
}

.family-leave-warning {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 600px) {
  .family-hero-content {
    flex-direction: column;
    text-align: center;
  }
  
  .family-hero-stats {
    justify-content: center;
  }
  
  .family-quick-stats {
    grid-template-columns: 1fr;
  }
  
  .vault-row {
    grid-template-columns: 1fr;
  }
  
  .power-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   FAMILY PROFILE MODAL - PROFESSIONAL
   ======================================== */

.family-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.family-profile-modal.active .fpm-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.fpm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.fpm-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: #12121a;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 100px rgba(0, 0, 0, 0.8);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow-y: auto;
}

.fpm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.fpm-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

/* Header */
.fpm-header {
  position: relative;
  padding: 40px 24px 30px;
  text-align: center;
}

.fpm-header-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, transparent 100%);
}

.fpm-header-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
}

.fpm-header-content {
  position: relative;
  z-index: 1;
}

.fpm-emblem {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  border: 3px solid var(--gold);
  border-radius: 24px;
  box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
  animation: emblemPulse 3s ease-in-out infinite;
}

@keyframes emblemPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.3); }
  50% { box-shadow: 0 0 50px rgba(212, 175, 55, 0.5); }
}

.fpm-name {
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin: 0 0 20px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.fpm-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.fpm-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  min-width: 90px;
}

.fpm-stat-icon {
  font-size: 20px;
}

.fpm-stat-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--gold);
}

.fpm-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Body */
.fpm-body {
  padding: 0 24px 24px;
}

.fpm-section {
  margin-bottom: 20px;
}

.fpm-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fpm-section-icon {
  font-size: 18px;
}

.fpm-section-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Members */
.fpm-members {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fpm-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px;
  color: var(--text-muted);
}

.fpm-loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fpm-member {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.fpm-member:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.fpm-member.leader {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.02));
  border-color: rgba(212, 175, 55, 0.2);
}

.fpm-member-avatar {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

.fpm-member.leader .fpm-member-avatar {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.1));
}

.fpm-member-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fpm-member-name {
  font-size: 15px;
  font-weight: 600;
  color: white;
}

.fpm-member-role {
  font-size: 12px;
  color: var(--text-muted);
}

.fpm-member.leader .fpm-member-role {
  color: var(--gold);
}

.fpm-level-badge {
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Kick button */
.fpm-kick-btn {
  padding: 8px 12px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  opacity: 0.7;
  margin-left: 8px;
}

.fpm-kick-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.fpm-no-members {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
}

/* Actions */
.fpm-actions {
  margin-top: 24px;
}

.fpm-attack-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.fpm-attack-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fpm-attack-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(220, 38, 38, 0.4);
}

.fpm-attack-btn:hover::before {
  opacity: 1;
}

.fpm-attack-icon {
  font-size: 32px;
}

.fpm-attack-text {
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.fpm-attack-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

/* Attack Bodyguard Details */
.attack-bg-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

.bg-detail {
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  color: var(--text-muted);
}

/* ========================================
   PLAYER ATTACK MODAL - PROFESSIONAL
   ======================================== */

.player-attack-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.player-attack-modal.active {
  opacity: 1;
  visibility: visible;
}

.pam-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
}

.pam-card {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.pam-content {
  position: relative;
  background: linear-gradient(180deg, #1a1a2e 0%, #12121a 100%);
  border-radius: 24px;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.player-attack-modal.active .pam-content {
  transform: scale(1) translateY(0);
}

.pam-content.victory {
  border: 2px solid var(--gold);
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.2);
}

.pam-content.defeat {
  border: 2px solid #dc2626;
  box-shadow: 0 0 60px rgba(220, 38, 38, 0.2);
}

.pam-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  pointer-events: none;
}

.victory .pam-glow {
  background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
}

.defeat .pam-glow {
  background: radial-gradient(circle, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
}

/* Header */
.pam-header {
  position: relative;
  text-align: center;
  padding: 36px 24px 24px;
}

.pam-icon-wrap {
  width: 90px;
  height: 90px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  animation: pamIconBounce 0.6s ease-out 0.2s both;
}

.victory .pam-icon-wrap {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.05));
  border: 3px solid var(--gold);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.4);
}

.defeat .pam-icon-wrap {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(220, 38, 38, 0.05));
  border: 3px solid #dc2626;
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.4);
}

.pam-icon {
  font-size: 44px;
}

@keyframes pamIconBounce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.pam-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0 0 8px;
  animation: pamSlideUp 0.5s ease-out 0.3s both;
}

.victory .pam-title {
  color: var(--gold);
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

.defeat .pam-title {
  color: #dc2626;
  text-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
}

.pam-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  animation: pamSlideUp 0.5s ease-out 0.4s both;
}

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

/* Stats */
.pam-stats {
  padding: 0 24px;
}

.pam-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 14px;
  animation: pamSlideUp 0.5s ease-out 0.5s both;
}

.pam-stat:nth-child(2) { animation-delay: 0.55s; }
.pam-stat:nth-child(3) { animation-delay: 0.6s; }

.pam-stat.gain {
  border-left: 4px solid #4ade80;
}

.pam-stat.loss {
  border-left: 4px solid #dc2626;
}

.pam-stat.neutral {
  border-left: 4px solid #60a5fa;
}

.pam-stat-icon {
  font-size: 28px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.pam-stat-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pam-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pam-stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.pam-stat.gain .pam-stat-value {
  color: #4ade80;
}

.pam-stat.loss .pam-stat-value {
  color: #dc2626;
}

.pam-stat.neutral .pam-stat-value {
  color: #60a5fa;
}

/* Bodyguard Details */
.pam-bg-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  animation: pamSlideUp 0.5s ease-out 0.6s both;
}

.pam-bg-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pam-bg-item:last-child {
  border-bottom: none;
}

.pam-bg-icon {
  font-size: 18px;
  width: 32px;
  text-align: center;
}

.pam-bg-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
}

.pam-bg-val {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.pam-bg-val.gain {
  color: #4ade80;
}

.pam-bg-val.loss {
  color: #dc2626;
}

/* Power Comparison */
.pam-power-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 24px;
  margin: 10px 24px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  animation: pamSlideUp 0.5s ease-out 0.65s both;
}

.pam-power-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.pam-power-item.you {
  align-items: flex-start;
}

.pam-power-item.them {
  align-items: flex-end;
}

.pam-power-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pam-power-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: white;
}

.pam-power-icon {
  font-size: 16px;
}

.pam-power-vs {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-muted);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* Button */
.pam-btn {
  display: block;
  width: calc(100% - 48px);
  margin: 20px 24px 24px;
  padding: 16px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: pamSlideUp 0.5s ease-out 0.7s both;
}

.victory .pam-btn {
  background: linear-gradient(135deg, var(--gold), #b8860b);
  color: #000;
}

.defeat .pam-btn {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
}

.pam-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Familie Join Button */
.fpm-join-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.fpm-join-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fpm-join-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(34, 197, 94, 0.4);
}

.fpm-join-btn:hover::before {
  opacity: 1;
}

.fpm-join-icon {
  font-size: 32px;
}

.fpm-join-text {
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.fpm-join-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   INBOX MODAL - PROFESSIONAL REDESIGN
   ======================================== */

.inbox-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.inbox-modal.active {
  display: flex;
}

.ibx-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
}

.ibx-card {
  position: relative;
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f18 100%);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.inbox-modal.active .ibx-card {
  transform: scale(1) translateY(0);
}

.ibx-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.ibx-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ibx-close:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: #dc2626;
  color: #dc2626;
}

/* Header */
.ibx-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 24px 24px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ibx-header-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.ibx-header-info {
  flex: 1;
}

.ibx-header-info h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
  letter-spacing: 1px;
}

.ibx-count {
  font-size: 13px;
  color: var(--text-muted);
}

.ibx-clear-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.ibx-clear-btn:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
  color: #dc2626;
}

/* Messages Container */
.ibx-messages {
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ibx-messages::-webkit-scrollbar {
  width: 6px;
}

.ibx-messages::-webkit-scrollbar-track {
  background: transparent;
}

.ibx-messages::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.2);
  border-radius: 3px;
}

/* Empty State */
.ibx-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
}

.ibx-empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.ibx-empty-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.ibx-empty-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* Message Item */
.ibx-msg {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.ibx-msg:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(212, 175, 55, 0.2);
  transform: translateY(-2px);
}

.ibx-msg.unread {
  border-left: 4px solid var(--gold);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.ibx-msg.read {
  opacity: 0.6;
}

.ibx-msg.attack-lost {
  border-left-color: #dc2626;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.ibx-msg.attack-won {
  border-left-color: #22c55e;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.ibx-msg-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.ibx-msg.attack-lost .ibx-msg-icon {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(220, 38, 38, 0.05));
  border-color: rgba(220, 38, 38, 0.3);
}

.ibx-msg.attack-won .ibx-msg-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
  border-color: rgba(34, 197, 94, 0.3);
}

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

.ibx-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.ibx-msg-from {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.ibx-msg.unread .ibx-msg-from {
  color: var(--gold);
}

.ibx-msg.attack-lost .ibx-msg-from {
  color: #dc2626;
}

.ibx-msg.attack-won .ibx-msg-from {
  color: #22c55e;
}

.ibx-msg.market {
  border-left-color: #8b5cf6;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.ibx-msg.market .ibx-msg-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05));
  border-color: rgba(139, 92, 246, 0.3);
}

.ibx-msg.market .ibx-msg-from {
  color: #8b5cf6;
}

.ibx-msg-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.ibx-msg-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ibx-msg-text strong {
  color: var(--gold);
  font-weight: 600;
}

.ibx-msg-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ibx-msg:hover .ibx-msg-delete {
  opacity: 1;
}

.ibx-msg-delete:hover {
  background: rgba(220, 38, 38, 0.2);
  color: #dc2626;
}

/* Compose Section */
.ibx-compose {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.ibx-compose-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ibx-compose-form {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ibx-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
}

.ibx-input:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.ibx-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  min-height: 80px;
  resize: none;
  transition: all 0.2s;
}

.ibx-textarea:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.ibx-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--gold), #b8860b);
  border: none;
  border-radius: 12px;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.ibx-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

/* ========================================
   PLAYER PROFILE MODAL
   ======================================== */

.player-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.player-profile-modal.active {
  opacity: 1;
  visibility: visible;
}

.ppm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
}

.ppm-card {
  position: relative;
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f18 100%);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 20px;
  width: 100%;
  max-width: 360px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.player-profile-modal.active .ppm-card {
  transform: scale(1) translateY(0);
}

.ppm-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.ppm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ppm-close:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: #dc2626;
  color: #dc2626;
}

/* Header */
.ppm-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08) 0%, transparent 100%);
}

.ppm-avatar {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

.ppm-avatar.has-image {
  padding: 0;
  overflow: hidden;
}

.ppm-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.ppm-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ppm-you {
  font-size: 10px;
  background: var(--gold);
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 6px;
}

.ppm-family {
  font-size: 13px;
  color: var(--text-muted);
}

/* Stats Grid - 2x2 compact */
.ppm-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
}

.ppm-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.ppm-stat-icon {
  font-size: 18px;
}

.ppm-stat-info {
  flex: 1;
}

.ppm-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-mono);
}

.ppm-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Combat Stats - Inline */
.ppm-combat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 16px;
  margin: 0 16px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.ppm-combat-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.ppm-combat-val {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.ppm-combat-stat.win .ppm-combat-val {
  color: #22c55e;
}

.ppm-combat-stat.loss .ppm-combat-val {
  color: #dc2626;
}

.ppm-combat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.ppm-combat-vs {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

/* Actions */
.ppm-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px 16px;
}

.ppm-attack-btn {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.ppm-attack-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

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

.ppm-attack-btn.cooldown {
  background: linear-gradient(135deg, #4b5563, #374151);
}

.ppm-attack-icon {
  font-size: 16px;
}

.ppm-msg-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ppm-msg-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--gold);
}

/* Leaderboard clickable */
.leaderboard-avatar,
.leaderboard-info {
  cursor: pointer;
  transition: all 0.2s;
}

.leaderboard-avatar:hover,
.leaderboard-info:hover {
  opacity: 0.8;
}

.leaderboard-info:hover .leaderboard-name {
  color: var(--gold);
}

/* ========================================
   SHOP CARDS - PROFESSIONAL REDESIGN
   ======================================== */

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .shop-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.shop-card {
  background: linear-gradient(180deg, rgba(30, 30, 45, 0.9) 0%, rgba(20, 20, 30, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.shop-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(212, 175, 55, 0.1);
}

.shop-card.owned {
  border-color: rgba(212, 175, 55, 0.2);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08) 0%, rgba(20, 20, 30, 0.95) 100%);
}

.shop-card.locked {
  opacity: 0.7;
}

.shop-card.cant-afford:not(.owned) {
  opacity: 0.6;
}

/* Header - compacter */
.shop-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

.shop-card-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.shop-card.owned .shop-card-icon {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.1));
  border-color: rgba(212, 175, 55, 0.4);
}

.shop-card-badge {
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.shop-card.owned .shop-card-badge {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--gold);
}

/* Body - compacter */
.shop-card-body {
  flex: 1;
  padding: 0 12px 10px;
}

.shop-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-card-lock {
  margin-top: 6px;
  padding: 4px 8px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 6px;
  font-size: 10px;
  color: var(--gold);
}

/* Footer - compacter */
.shop-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.shop-card-price {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shop-card-price-icon {
  font-size: 12px;
}

.shop-card-price-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-mono);
}

.shop-card-btn {
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--gold), #b8860b);
  border: none;
  border-radius: 8px;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.shop-card-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.shop-card-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Perk styling */
.shop-card.perk .shop-card-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05));
  border-color: rgba(139, 92, 246, 0.3);
}

.shop-card.perk.owned .shop-card-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0.1));
  border-color: rgba(139, 92, 246, 0.5);
}

.shop-card.perk .shop-card-btn {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.shop-card.perk .shop-card-price-val {
  color: #a78bfa;
}

/* Empire tabs update */
.empire-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.empire-tab {
  flex: 0 0 auto;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
  white-space: nowrap;
}

.empire-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.empire-tab.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--gold);
}

/* Buy multiplier buttons */
.buy-multiplier {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.buy-mult-btn {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.buy-mult-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.buy-mult-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--gold);
}

/* Mobile responsive for empire tabs */
@media (max-width: 480px) {
  .empire-tab {
    padding: 10px 14px;
    font-size: 12px;
  }
}


/* ==================== MARKET / AUCTION STYLES ==================== */

/* Page Container */
.market-page {
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Hero Section */
.market-hero {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.02) 100%);
  border-radius: 24px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  position: relative;
  overflow: hidden;
}

.market-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.market-hero-icon {
  font-size: 48px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.3));
}

.market-hero h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.market-hero p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 24px;
}

.market-balance {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 24px;
  border-radius: 50px;
  border: 1px solid var(--border);
}

.market-balance-icon {
  font-size: 24px;
}

.market-balance-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.market-balance-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.market-balance-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
}

/* Cards */
.market-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  transition: border-color 0.3s ease;
}

.market-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
}

.market-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.market-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 12px;
  font-size: 24px;
}

.market-card-header h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.market-card-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Create Auction Form */
.market-create-card {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, rgba(212, 175, 55, 0.05) 100%);
}

.market-create-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.market-form-row label,
.market-form-group label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.market-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.market-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.market-input-prefix {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-weight: 600;
}

.market-form-group input,
.market-form-group select {
  width: 100%;
  padding: 14px 16px;
  padding-left: 36px;
  background: var(--bg-deep);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.market-form-group select {
  padding-left: 16px;
  cursor: pointer;
}

.market-form-group select option {
  background: var(--bg-deep);
  color: var(--text-primary);
  padding: 10px;
}

.market-form-group input:focus,
.market-form-group select:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.05);
}

/* Bullet Selection Buttons */
.bullet-select-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.bullet-select-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--bg-deep);
  border: 2px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.bullet-select-btn:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  transform: translateY(-2px);
}

.bullet-select-btn.active {
  background: linear-gradient(135deg, var(--gold), #c9a227);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

.bullet-select-btn .bullet-amount {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.2s;
}

.bullet-select-btn.active .bullet-amount {
  color: #1a1a2e;
}

.bullet-select-btn .bullet-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.bullet-select-btn.active .bullet-label {
  color: #1a1a2e;
}

/* Submit Button */
.market-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--gold), #c9a227);
  border: none;
  border-radius: 14px;
  color: #1a1a2e;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.market-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
}

.market-submit-btn:active {
  transform: translateY(0);
}

.market-submit-btn .btn-icon {
  font-size: 1.2rem;
}

/* Auction Lists */
.market-auctions-list,
.market-your-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.market-loading,
.market-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.market-empty::before {
  content: '📭';
  display: block;
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* Auction Items */
.auction-item {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 20px;
  align-items: center;
  transition: all 0.2s ease;
}

.auction-item:hover {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.02);
}

.auction-item.auction-your-bid {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold);
}

.auction-info {
  min-width: 0;
}

.auction-seller {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.auction-bullets {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.auction-bullets span {
  color: var(--gold);
}

.auction-highest {
  font-size: 12px;
  color: var(--emerald);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Auction Stats */
.auction-stats {
  display: flex;
  gap: 24px;
}

.auction-stat {
  text-align: center;
  min-width: 80px;
}

.auction-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.auction-stat-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--emerald);
}

.auction-stat-value.time {
  color: var(--gold);
}

.auction-timer {
  font-family: var(--font-mono);
  transition: color 0.3s ease;
}

/* Bid Section */
.auction-bid {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auction-bid input {
  width: 110px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: all 0.2s;
}

.auction-bid input:focus {
  outline: none;
  border-color: var(--gold);
}

.auction-bid-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auction-bid-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.auction-bid-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auction-cancel-btn {
  padding: 10px 16px;
  background: transparent;
  border: 2px solid var(--crimson);
  border-radius: 10px;
  color: var(--crimson);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.auction-cancel-btn:hover {
  background: rgba(220, 38, 38, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .market-hero h1 {
    font-size: 2rem;
  }
  
  .market-form-grid {
    grid-template-columns: 1fr;
  }
  
  .bullet-select-btns {
    grid-template-columns: 1fr;
  }
  
  .auction-item {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .auction-stats {
    justify-content: center;
  }
  
  .auction-bid {
    justify-content: center;
    flex-wrap: wrap;
  }
}




/* Anonymous Checkbox */
.market-checkbox-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.market-checkbox-row:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
}

.market-checkbox {
  display: none;
}

.market-checkbox-custom {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg-deep);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.market-checkbox-custom::after {
  content: '✓';
  font-size: 14px;
  color: transparent;
  font-weight: bold;
  transition: all 0.2s ease;
}

.market-checkbox:checked + .market-checkbox-custom {
  background: #8b5cf6;
  border-color: #8b5cf6;
}

.market-checkbox:checked + .market-checkbox-custom::after {
  color: white;
}

.market-checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.market-checkbox-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.market-checkbox-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Anonymous seller in auction list */
.auction-seller.anonymous {
  color: #8b5cf6;
  font-style: italic;
}


/* Auction anonymous badge */
.auction-anon-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  font-size: 11px;
  color: #8b5cf6;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}


/* Anonymous bid checkbox */
.auction-anon-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
  opacity: 0.5;
}

.auction-anon-check:hover {
  border-color: #8b5cf6;
  opacity: 0.8;
}

.auction-anon-check input {
  display: none;
}

.auction-anon-check:has(input:checked) {
  background: rgba(139, 92, 246, 0.2);
  border-color: #8b5cf6;
  opacity: 1;
}


/* Auction bidder info */
.auction-bidder-info {
  font-size: 13px;
  color: var(--emerald);
  margin-top: 4px;
}



/* Referral Link Styles */
.referral-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.referral-link-container {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.referral-link-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: monospace;
  outline: none;
}

.referral-link-input:focus {
  border-color: #8b5cf6;
}

.referral-copy-btn {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.referral-copy-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.referral-copy-btn:active {
  transform: scale(0.95);
}

.referral-copy-btn.copied {
  background: linear-gradient(135deg, #10b981, #059669);
}

.referral-stats {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.referral-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.referral-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.referral-stat strong {
  font-size: 18px;
  color: #8b5cf6;
}

/* Referral notification toast animation */
@keyframes referralPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
}

.referral-card.has-referrals {
  animation: referralPulse 2s ease-in-out infinite;
}



/* Referral bonus card styling */
.bonus-card.referral {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.1));
  border-color: rgba(139, 92, 246, 0.3);
}

.bonus-card.referral .bonus-card-icon {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.bonus-bar-fill.referral {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}



/* Topbar referral button */
.referral-stat {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.2)) !important;
  border: 1px solid rgba(139, 92, 246, 0.4) !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.referral-stat:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.referral-stat.copied {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.2)) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

.referral-bonus-display {
  font-size: 11px;
  font-weight: 700;
  color: #a78bfa;
}

.referral-stat.copied .referral-bonus-display {
  color: #34d399;
}



/* Stats Referral Banner */
.stats-referral-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stats-referral-icon {
  font-size: 28px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-referral-info {
  flex: 0 0 auto;
}

.stats-referral-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}

.stats-referral-desc {
  font-size: 13px;
  color: #a78bfa;
}

.stats-referral-link-box {
  flex: 1;
  display: flex;
  gap: 8px;
  min-width: 200px;
}

.stats-referral-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: monospace;
  outline: none;
}

.stats-referral-copy {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stats-referral-copy:hover {
  transform: scale(1.05);
}

.stats-referral-copy.copied {
  background: linear-gradient(135deg, #10b981, #059669);
}

.stats-referral-count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.stats-referral-count span {
  color: #a78bfa;
  font-weight: 600;
}

@media (max-width: 600px) {
  .stats-referral-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .stats-referral-icon {
    margin: 0 auto;
  }
  
  .stats-referral-link-box {
    width: 100%;
  }
}

