/* ============================================================
   SHADOW SEARCH — MODERN STYLING
   Google Chrome Omnibox + Nicely Rounded Box Results
   ============================================================ */

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.78);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-card-hover: rgba(255, 255, 255, 0.12);
  
  --chrome-omnibox-bg: #1f232d;
  --chrome-omnibox-border: rgba(255, 255, 255, 0.14);
  --chrome-omnibox-focus-border: #6366f1;
  --chrome-omnibox-focus-glow: rgba(99, 102, 241, 0.35);

  --accent-primary: #6366f1;
  --accent-primary-light: #818cf8;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-box: 24px;
  --radius-pill: 9999px;
  --radius-card: 16px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.2);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmospheric Glows */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.glow-top {
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4), rgba(6, 182, 212, 0.2), transparent 70%);
}
.glow-bottom {
  bottom: -200px;
  right: 10%;
  width: 600px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
}

.grid-pattern {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.app-container {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   TOP BAR: Branding + Rate Limit Counter / Timer
   ============================================================ */

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
  color: #fff;
}
.brand-logo svg {
  width: 24px;
  height: 24px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  display: block;
}

/* Rate Limit / Counter Widget */
.quota-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 1. Normal State Card */
.quota-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 8px 14px;
  transition: all 0.25s ease;
}
.quota-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.quota-icon-wrap {
  width: 32px;
  height: 32px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary-light);
}
.quota-icon-wrap svg {
  width: 17px;
  height: 17px;
}

.quota-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 160px;
}

.quota-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quota-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.quota-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

.quota-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.quota-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.quota-count strong {
  color: var(--text-primary);
  font-weight: 700;
}

.quota-resets-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.quota-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 2px;
}

.quota-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #06b6d4);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

/* 2. Warning Card: Only 1 Search Left */
.quota-warning-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 158, 11, 0.14);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 16px;
  padding: 8px 16px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
  animation: pulse-border 2s infinite ease-in-out;
}
@keyframes pulse-border {
  0%, 100% { border-color: rgba(245, 158, 11, 0.5); box-shadow: 0 0 15px rgba(245, 158, 11, 0.2); }
  50% { border-color: rgba(245, 158, 11, 0.9); box-shadow: 0 0 25px rgba(245, 158, 11, 0.4); }
}

.warning-pulse-icon {
  width: 32px;
  height: 32px;
  background: rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-amber);
}
.warning-pulse-icon svg {
  width: 18px;
  height: 18px;
}

.warning-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.03em;
}
.warning-sub {
  font-size: 0.7rem;
  color: #fde68a;
  opacity: 0.9;
}

/* 3. Timer Card: Quota Exhausted (REPLACES Counter) */
.quota-timer-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(244, 63, 94, 0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(244, 63, 94, 0.45);
  border-radius: 16px;
  padding: 8px 18px;
  box-shadow: 0 0 24px rgba(244, 63, 94, 0.25);
}

.timer-icon-wrap {
  width: 36px;
  height: 36px;
  background: rgba(244, 63, 94, 0.22);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fb7185;
}
.timer-icon-wrap svg {
  width: 20px;
  height: 20px;
}
.spin-slow {
  animation: spin 10s linear infinite;
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}

.timer-title {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #fca5a5;
}

.timer-clock {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-caption {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.timer-utc-tag {
  font-size: 0.65rem;
  color: #f43f5e;
  font-weight: 600;
}

/* Simulation Pill */
.sim-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.sim-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* ============================================================
   MAIN CONTENT & HERO
   ============================================================ */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px 0 20px;
}

.hero-section {
  text-align: center;
  margin-bottom: 32px;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 40%, #9ca3af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

/* ============================================================
   GOOGLE CHROME STYLE OMNIBOX SEARCH BAR
   ============================================================ */

.search-section {
  position: relative;
  max-width: 760px;
  width: 100%;
  margin: 0 auto 36px;
}

.chrome-search-container {
  position: relative;
  width: 100%;
}

.chrome-omnibox {
  display: flex;
  align-items: center;
  background: var(--chrome-omnibox-bg);
  border: 1px solid var(--chrome-omnibox-border);
  border-radius: var(--radius-pill); /* 9999px rounded Chrome pill */
  height: 56px;
  padding: 4px 8px 4px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 2;
}

.chrome-omnibox:focus-within {
  border-color: var(--chrome-omnibox-focus-border);
  box-shadow: 0 6px 28px var(--chrome-omnibox-focus-glow), 0 0 0 1px var(--chrome-omnibox-focus-border);
  background: #252a36;
}

.omnibox-icon-left {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-right: 12px;
  flex-shrink: 0;
}
.chrome-omnibox:focus-within .omnibox-icon-left {
  color: var(--accent-primary-light);
}
.search-svg {
  width: 20px;
  height: 20px;
}

/* Server Pill inside Searchbar */
.server-pill {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  padding: 3px 8px 3px 10px;
  gap: 5px;
  margin-right: 10px;
  flex-shrink: 0;
}
.server-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
}
.server-input {
  width: 44px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}
.server-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}
/* Chrome input number arrow remove */
.server-input::-webkit-outer-spin-button,
.server-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.omnibox-input-wrapper {
  flex: 1;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.chrome-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.chrome-input::placeholder {
  color: #64748b;
  font-size: 0.95rem;
}

/* Clear button ("x") */
.omnibox-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  margin-right: 6px;
}
.omnibox-clear-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}
.omnibox-clear-btn svg {
  width: 16px;
  height: 16px;
}

/* Chrome Search Submit Button */
.omnibox-submit-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border: none;
  color: #ffffff;
  border-radius: var(--radius-pill);
  height: 42px;
  padding: 0 18px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.omnibox-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
}
.omnibox-submit-btn:active {
  transform: translateY(0);
}
.submit-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.omnibox-submit-btn:hover .submit-arrow {
  transform: translateX(2px);
}

/* Chrome-Style Suggestions Dropdown */
.suggestions-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #1c202a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
  z-index: 10;
  backdrop-filter: blur(16px);
  animation: fadeInDown 0.2s ease-out;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.quick-samples-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.sample-chip:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}
.chip-name {
  font-weight: 600;
  color: #ffffff;
}
.chip-badge {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  opacity: 0.9;
}

.recent-searches-list {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: background 0.15s;
}
.recent-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* ============================================================
   STATUS & ERROR CARDS
   ============================================================ */

.status-card {
  max-width: 680px;
  margin: 0 auto 30px;
  padding: 24px;
  border-radius: var(--radius-box);
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
}

.loading-card {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
}

.scanner-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--accent-primary);
  border-right-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.loading-text h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.loading-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.nicely-rounded-box {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-box); /* Nicely rounded box (24px) */
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.error-box {
  max-width: 760px;
  margin: 0 auto 30px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.06);
}
.error-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(244, 63, 94, 0.18);
  color: #f43f5e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.error-icon svg {
  width: 20px;
  height: 20px;
}
.error-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fca5a5;
  margin-bottom: 4px;
}
.error-body p {
  font-size: 0.88rem;
  color: #e2e8f0;
}

/* 409 Conflict Disambiguation Box */
.conflict-box {
  max-width: 760px;
  margin: 0 auto 30px;
  padding: 24px;
  border-color: rgba(245, 158, 11, 0.4);
}
.conflict-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.conflict-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.conflict-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.conflict-item-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.conflict-item-btn:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: var(--accent-primary);
}
.conflict-item-name {
  font-weight: 700;
  font-size: 0.95rem;
}
.conflict-item-meta {
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

/* ============================================================
   THE NICELY ROUNDED BOX: RESULTS CARD
   ============================================================ */

.results-container {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  animation: scaleInCard 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes scaleInCard {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.player-profile-box {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  background: linear-gradient(180deg, rgba(23, 30, 48, 0.9) 0%, rgba(13, 17, 28, 0.96) 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.12);
}

/* Card Top Bar (Cache Pill + Last Seen Tag) */
.profile-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cached-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.cached-pill.cached-active {
  background: rgba(6, 182, 212, 0.14);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

.last-seen-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Hero Section */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

/* Avatar Frame Wrap */
.avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.avatar-frame-wrap {
  position: relative;
  width: 96px;
  height: 96px;
}

.player-avatar {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  object-fit: cover;
  background: #1f2937;
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: block;
}

.player-frame {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 116px;
  height: 116px;
  pointer-events: none;
  z-index: 2;
}

.online-indicator-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.online-indicator-pill.online {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.online-indicator-pill.offline {
  background: rgba(107, 114, 128, 0.16);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.35);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.online .status-dot {
  box-shadow: 0 0 8px #10b981;
}

/* Identity Column */
.player-identity {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.player-nick {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.vip-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.2));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.sanctuary-badge {
  background: rgba(99, 102, 241, 0.16);
  color: var(--accent-primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.server-badge {
  background: rgba(6, 182, 212, 0.16);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.uid-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.uid-label {
  color: var(--text-muted);
}
.uid-value {
  color: #cbd5e1;
  font-weight: 500;
}
.copy-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  position: relative;
  transition: all 0.15s;
  display: flex;
  align-items: center;
}
.copy-action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.copy-tooltip {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.copy-action-btn:hover .copy-tooltip {
  opacity: 1;
}

/* Alliance Header Pill */
.alliance-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 6px 12px;
  margin-top: 4px;
  width: fit-content;
}

.alliance-badge-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.alliance-pill-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.alliance-tag {
  font-weight: 700;
  color: #a5b4fc;
  font-size: 0.85rem;
}

.alliance-full-name {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.alliance-rank-chip {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

/* ============================================================
   KEY STATS GRID
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
}
.stat-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.stat-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon-wrap svg {
  width: 20px;
  height: 20px;
}

.power-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.kills-icon {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}
.coords-icon {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}
.skin-icon {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.stat-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stat-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  word-break: break-word;
}
.highlight-power {
  color: #fde047;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.coords-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mini-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
}
.mini-copy-btn:hover {
  color: #fff;
}

/* Secondary Attributes Bar */
.secondary-attributes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 24px;
}

.attr-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}
.attr-icon {
  font-size: 0.95rem;
}
.attr-name {
  color: var(--text-muted);
}
.attr-value {
  color: var(--text-primary);
}

.attr-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   ACCORDIONS (History & Raw JSON)
   ============================================================ */

.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rounded-accordion {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s;
}
.rounded-accordion[open] {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.accordion-summary {
  list-style: none;
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
}
.accordion-summary::-webkit-details-marker {
  display: none;
}
.accordion-summary:hover {
  color: #fff;
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.accordion-count {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  color: var(--accent-cyan);
}

.chevron-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}
.rounded-accordion[open] .chevron-arrow {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 18px 18px;
}

.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}
.history-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.history-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.history-power-change {
  font-weight: 700;
  color: #fde047;
}

.raw-json-block {
  background: #080b12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #93c5fd;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.json-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.json-copy-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.json-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ============================================================
   FOOTER
   ============================================================ */

.app-footer {
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.footer-inner {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.footer-dot {
  opacity: 0.4;
}

/* ============================================================
   MODAL (Simulation / Testing)
   ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #171b26;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
}
.modal-intro {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.sim-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sim-choice-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sim-choice-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}
.sim-choice-btn strong {
  font-size: 0.88rem;
}
.sim-choice-btn span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.warning-choice {
  border-color: rgba(245, 158, 11, 0.3);
}
.warning-choice:hover {
  background: rgba(245, 158, 11, 0.12);
}
.timer-choice {
  border-color: rgba(244, 63, 94, 0.3);
}
.timer-choice:hover {
  background: rgba(244, 63, 94, 0.12);
}
.live-choice {
  border-color: rgba(99, 102, 241, 0.3);
}
.live-choice:hover {
  background: rgba(99, 102, 241, 0.12);
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .top-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .quota-wrapper {
    justify-content: space-between;
  }
  .profile-hero {
    flex-direction: column;
    text-align: center;
  }
  .player-identity {
    align-items: center;
  }
  .name-row {
    justify-content: center;
  }
  .alliance-header-pill {
    margin: 0 auto;
  }
}
