@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --blood:       #8B0000;
  --crimson:     #C0152F;
  --gold:        #FFAA00;
  --gold-light:  #FFD966;
  --dark:        #141418;
  --dark-2:      #1a1a20;
  --dark-3:      #202028;
  --dark-4:      #28282e;
  --surface:     #242430;
  --surface-2:   #2c2c3a;
  --border:      rgba(160,60,60,0.3);
  --border-hi:   rgba(192,21,47,0.6);
  --border-gold: rgba(255,170,0,0.35);
  --text:        #F0EAD8;
  --text-muted:  #A09880;
  --text-dim:    #8d8a84;
  --glow-red:    0 0 18px rgba(192,21,47,0.5);
  --glow-gold:   0 0 14px rgba(255,170,0,0.4);
  --font-px:     'Press Start 2P', monospace;
  --font-body:   'VT323', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

/* subtle pixel grid */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 4 4' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%23ffffff' opacity='0.012'/%3E%3C/svg%3E");
  background-size: 4px 4px;
  pointer-events: none; z-index: 0;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark-2); }
::-webkit-scrollbar-thumb { background: var(--blood); }

a { color: var(--crimson); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--gold); }

/* ═══════════════════════════════════════
   NAVBAR
═══════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(20,20,24,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border);
  padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1.5rem;
  height: 58px;
}

.nav-logo {
  font-family: var(--font-px);
  font-size: 0.75rem;
  color: var(--text) !important;
  text-shadow: 3px 3px 0 #4a0000, var(--glow-red);
  white-space: nowrap; line-height: 1;
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--crimson); text-shadow: 2px 2px 0 #7a3530; }

.nav-links { display: flex; align-items: center; gap: 0.2rem; flex: 1; list-style: none; }

.nav-links a {
  font-family: var(--font-px);
  font-size: 0.52rem;
  color: var(--text-muted);
  padding: 0.45rem 0.8rem;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text); border-color: var(--border); background: rgba(139,0,0,0.18);
}
.nav-links a.nav-map { color: var(--gold); border-color: var(--border-gold); }
.nav-links a.nav-map:hover { background: rgba(255,170,0,0.12); box-shadow: var(--glow-gold); }

.nav-auth { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }

.nav-user { display: flex; align-items: center; gap: 0.55rem; font-family: var(--font-px); font-size: 0.5rem; color: var(--text-muted); }

.nav-avatar { width: 28px; height: 28px; border: 2px solid var(--border); image-rendering: pixelated; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-px);
  font-size: 0.6rem;
  padding: 0.72rem 1.4rem;
  border: 2px solid transparent;
  cursor: pointer; transition: all 0.15s;
  text-decoration: none; white-space: nowrap;
  image-rendering: pixelated; line-height: 1;
}

.btn-primary { background: var(--blood); border-color: var(--crimson); color: #fff; box-shadow: 2px 2px 0 #2a0000; }
.btn-primary:hover { background: var(--crimson); color: #fff; box-shadow: var(--glow-red); transform: translateY(-1px); }

.btn-gold { background: transparent; border-color: var(--gold); color: var(--gold); box-shadow: 2px 2px 0 #5a3a00; }
.btn-gold:hover { background: var(--gold); color: #1a1000; box-shadow: var(--glow-gold); transform: translateY(-1px); }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-ghost:hover { border-color: var(--crimson); color: var(--text); }

.btn-danger { background: transparent; border-color: rgba(139,0,0,0.5); color: #e06060; font-size: 0.46rem; padding: 0.45rem 0.75rem; }
.btn-danger:hover { background: rgba(139,0,0,0.25); border-color: var(--crimson); }

.btn-sm { font-size: 0.55rem; padding: 0.52rem 1rem; }

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 80px 2rem 4rem; text-align: center;
}

.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  /* Светлее: было 0.28, стало 0.45 */
  filter: brightness(0.45) saturate(0.65);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(20,20,24,0.1) 0%,
    rgba(20,20,24,0.45) 65%,
    rgba(20,20,24,1) 100%);
}

.hero-content { position: relative; z-index: 1; max-width: 840px; }

.hero-eyebrow {
  font-family: var(--font-px); font-size: 0.5rem;
  letter-spacing: 0.25em; color: var(--gold); margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-px);
  font-size: clamp(1.6rem, 5.5vw, 3rem);
  line-height: 1.3; color: #fff;
  text-shadow: 4px 4px 0 #3a0000, 0 0 40px rgba(192,21,47,0.55);
  margin-bottom: 1rem; letter-spacing: 0.04em;
}
.hero-title em { font-style: normal; color: var(--crimson); }

.hero-splash {
  font-family: var(--font-px); font-size: 0.65rem;
  color: var(--gold);
  text-shadow: 2px 2px 0 #7a5000, var(--glow-gold);
  margin-bottom: 1.8rem; letter-spacing: 0.04em;
  animation: splashBounce 1.3s ease-in-out infinite alternate;
  display: inline-block;
}
@keyframes splashBounce {
  from { transform: scale(1) rotate(-1deg); }
  to   { transform: scale(1.07) rotate(1deg); }
}

.hero-desc { font-family: var(--font-px); font-size: 0.8rem; color: var(--text-muted); max-width: 520px; margin: 0 auto 2.5rem; }

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex; gap: 3rem; justify-content: center;
  margin-top: 3.5rem; padding-top: 2rem; border-top: 2px solid var(--border);
}
.hero-stat-num { font-family: var(--font-px); font-size: 1.8rem; color: var(--crimson); text-shadow: 3px 3px 0 #3a0000; line-height: 1; }
.hero-stat-label { font-family: var(--font-px); font-size: 0.55rem; color: var(--text-dim); letter-spacing: 0.1em; margin-top: 0.6rem; }

/* ═══════════════════════════════════════
   SECTION
═══════════════════════════════════════ */
.section { padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; }

.section-title { font-family: var(--font-px); font-size: 0.92rem; color: var(--text); margin-bottom: 0.5rem; letter-spacing: 0.03em; line-height: 1.7; }
.section-title span { color: var(--crimson); }

.section-divider { width: 60px; height: 2px; background: linear-gradient(to right, var(--crimson), transparent); margin-bottom: 2rem; }

/* ═══════════════════════════════════════
   CARDS
═══════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--border-hi); transform: translateY(-2px); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }

/* ═══════════════════════════════════════
   PLAYER CARD
═══════════════════════════════════════ */
.player-card {
  background: var(--surface); border: 2px solid var(--border);
  padding: 1.5rem 1rem; text-align: center;
  transition: all 0.2s; text-decoration: none; color: inherit; display: block;
}
.player-card:hover { border-color: var(--crimson); background: var(--surface-2); color: inherit; transform: translateY(-3px); box-shadow: 0 6px 24px rgba(139,0,0,0.3); }

.player-avatar { width: 64px; height: 64px; image-rendering: pixelated; border: 2px solid var(--border); margin-bottom: 0.8rem; }

.player-name { font-family: var(--font-px); font-size: 0.52rem; color: var(--text); line-height: 1.7; word-break: break-all; }
.player-mc   { font-family: var(--font-px); font-size: 0.5rem; color: var(--text-muted); margin-top: 0.25rem; }

.player-badge { display: inline-block; font-family: var(--font-px); font-size: 0.55rem; padding: 0.3rem 0.55rem; margin-top: 0.6rem; }
.badge-admin  { background: rgba(139,0,0,0.35); border: 1px solid var(--blood); color: var(--crimson); }
.badge-player { background: rgba(30,30,48,0.8); border: 1px solid var(--border); color: var(--text-dim); }

/* ═══════════════════════════════════════
   STATS TABLE
═══════════════════════════════════════ */
.stats-table { width: 100%; border-collapse: collapse; }

.stats-table thead tr { border-bottom: 2px solid var(--blood); }
.stats-table th { font-family: var(--font-px); font-size: 0.55rem; letter-spacing: 0.1em; color: var(--text-muted); padding: 0.8rem 1rem; text-align: left; }
.stats-table td { font-family: var(--font-body); font-size: 1.2rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--dark-4); color: var(--text); }
.stats-table tbody tr:hover { background: rgba(139,0,0,0.08); }

.stats-table .rank { font-family: var(--font-px); font-size: 0.52rem; color: var(--text-dim); }
.rank-1 { color: var(--gold) !important; text-shadow: 1px 1px 0 #7a5000; }
.rank-2 { color: #C8C8C8 !important; }
.rank-3 { color: #CD7F32 !important; }

.stat-num    { font-family: var(--font-px); font-size: 0.65rem; }
.stat-hours  { color: var(--gold-light); }
.stat-deaths { color: #e06060; }

.player-cell { display: flex; align-items: center; gap: 0.75rem; }
.table-avatar { width: 30px; height: 30px; image-rendering: pixelated; border: 1px solid var(--border); }

/* ═══════════════════════════════════════
   SEASON TABS
═══════════════════════════════════════ */
.season-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }

.season-tab {
  font-family: var(--font-px); font-size: 0.5rem;
  padding: 0.58rem 1.1rem; border: 2px solid var(--border);
  color: var(--text-muted); background: transparent;
  cursor: pointer; transition: all 0.15s; text-decoration: none; line-height: 1;
}
.season-tab:hover  { border-color: var(--crimson); color: var(--text); }
.season-tab.active { background: var(--blood); border-color: var(--crimson); color: #fff; }

/* ═══════════════════════════════════════
   PROFILE
═══════════════════════════════════════ */
.profile-header {
  display: flex; gap: 2rem; align-items: flex-start;
  padding: 3rem 0 2rem; border-bottom: 2px solid var(--border); margin-bottom: 2.5rem;
}
.profile-body-img { width: 80px; image-rendering: pixelated; border: 2px solid var(--border); flex-shrink: 0; }

.profile-name { font-family: var(--font-px); font-size: 0.95rem; color: var(--text); line-height: 1.55; word-break: break-all; }
.profile-mc   { font-family: var(--font-px); font-size: 0.8rem; color: var(--text-muted); margin: 0.3rem 0; }
.profile-bio  { font-family: var(--font-px); color: var(--text-muted); font-style: italic; margin-top: 0.75rem; max-width: 500px; font-size: 0.8rem; }

/* Totals bar */
.profile-totals {
  display: flex; gap: 2rem; flex-wrap: wrap;
  padding: 1.2rem 1.5rem;
  background: var(--surface-2);
  border: 2px solid var(--border);
  margin-bottom: 2rem;
}
.profile-total-item { text-align: center; }
.profile-total-num   { font-family: var(--font-px); font-size: 1.1rem; line-height: 1; }
.profile-total-label { font-family: var(--font-px); font-size: 0.6rem; color: var(--text-dim); letter-spacing: 0.1em; margin-top: 0.45rem; }

.profile-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1.5rem; }

.season-stat-card { background: var(--surface); border: 2px solid var(--border); padding: 1.2rem 1.5rem; transition: border-color 0.2s; position: relative; overflow: hidden; }
.season-stat-card:hover { border-color: var(--crimson); }

.season-stat-card h4 { font-family: var(--font-px); font-size: 0.5rem; color: var(--text-muted); letter-spacing: 0.06em; margin-bottom: 1rem; line-height: 1.7; }
.season-stat-card h4 span { color: var(--crimson); }

.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 0.35rem 0; border-bottom: 1px solid var(--dark-4); font-family: var(--font-px); font-size: 0.75rem; }
.stat-row:last-child { border-bottom: none; }
.stat-row .label { color: var(--text); }
.stat-row .value  { font-family: var(--font-px); font-size: 0.57rem; }

/* ═══════════════════════════════════════
   FORMS
═══════════════════════════════════════ */
.form-container { max-width: 580px; margin: 0 auto; padding: 100px 2rem 4rem; }

.form-title    { font-family: var(--font-px); font-size: 0.88rem; color: var(--text); margin-bottom: 0.5rem; line-height: 1.65; }
.form-subtitle { font-family: var(--font-body); color: var(--text-muted); margin-bottom: 2rem; font-size: 1.2rem; }

.form-card { background: var(--surface); border: 2px solid var(--border); padding: 2rem; }

.form-group { margin-bottom: 1.3rem; }

.form-label {
  display: block; font-family: var(--font-px); font-size: 0.45rem;
  letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.5rem; line-height: 1.9;
}

.form-input {
  width: 100%; background: var(--dark-3); border: 2px solid var(--border);
  color: var(--text); font-family: var(--font-body); font-size: 1.2rem;
  padding: 0.65rem 1rem; outline: none; transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--crimson); box-shadow: 0 0 0 2px rgba(192,21,47,0.15); }
.form-input[type="file"] { padding: 0.5rem; cursor: pointer; }
.form-color { height: 46px; padding: 2px 4px; cursor: pointer; }

.form-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1.75rem; }

.form-error       { font-family: var(--font-px); font-size: 0.4rem; color: #e06060; margin-top: 0.35rem; line-height: 1.9; }
.form-errors-list { background: rgba(100,0,0,0.2); border: 2px solid rgba(139,0,0,0.5); padding: 0.75rem 1rem; margin-bottom: 1rem; font-family: var(--font-px); font-size: 0.42rem; color: #e06060; line-height: 2; }

/* ═══════════════════════════════════════
   MESSAGES
═══════════════════════════════════════ */
.messages-container { position: fixed; top: 68px; right: 1.5rem; z-index: 200; display: flex; flex-direction: column; gap: 0.5rem; }
.message { padding: 0.75rem 1.2rem; font-family: var(--font-px); font-size: 0.44rem; letter-spacing: 0.04em; animation: slideIn 0.25s ease; max-width: 340px; line-height: 1.9; border: 2px solid; }
@keyframes slideIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.message-success { background: rgba(0,55,0,0.92); border-color: #2A6A2A; color: #7ADA7A; }
.message-error   { background: rgba(80,0,0,0.92); border-color: var(--blood); color: #e06060; }
.message-info    { background: rgba(10,25,65,0.92); border-color: #2A4080; color: #7AAAE0; }

/* ═══════════════════════════════════════
   ADMIN PANEL
═══════════════════════════════════════ */
.admin-layout { display: grid; grid-template-columns: 215px 1fr; min-height: calc(100vh - 58px); margin-top: 58px; }

.admin-sidebar { background: var(--dark-2); border-right: 2px solid var(--border); padding: 1.5rem 0; }

.admin-sidebar-title { font-family: var(--font-px); font-size: 0.4rem; letter-spacing: 0.15em; color: var(--text-dim); padding: 0 1.2rem; margin-bottom: 0.5rem; margin-top: 1.3rem; line-height: 2; }
.admin-sidebar-title:first-child { margin-top: 0; }

.admin-nav-link { display: flex; align-items: center; gap: 0.5rem; padding: 0.58rem 1.2rem; font-family: var(--font-px); font-size: 0.44rem; color: var(--text-muted); transition: all 0.15s; letter-spacing: 0.03em; line-height: 1.9; }
.admin-nav-link:hover, .admin-nav-link.active { background: rgba(139,0,0,0.18); color: var(--text); border-left: 3px solid var(--crimson); padding-left: calc(1.2rem - 3px); }

.admin-main { padding: 2rem; overflow: auto; }

.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px solid var(--border); }

.admin-page-title { font-family: var(--font-px); font-size: 0.8rem; color: var(--text); line-height: 1.65; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { font-family: var(--font-px); font-size: 0.4rem; letter-spacing: 0.1em; color: var(--text-muted); padding: 0.7rem 1rem; text-align: left; border-bottom: 2px solid var(--border); line-height: 1.9; }
.admin-table td { font-family: var(--font-body); font-size: 1.1rem; padding: 0.65rem 1rem; border-bottom: 1px solid var(--dark-4); color: var(--text); vertical-align: middle; }
.admin-table tr:hover td { background: rgba(139,0,0,0.06); }
.admin-actions { display: flex; gap: 0.4rem; }

/* ═══════════════════════════════════════
   PAGE WRAPPER
═══════════════════════════════════════ */
.page-wrapper { padding-top: 58px; min-height: 100vh; }

.page-header { background: var(--dark-2); border-bottom: 2px solid var(--border); padding: 2rem; }
.page-header-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-end; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.footer { border-top: 2px solid var(--border); padding: 1.5rem 2rem; text-align: center; font-family: var(--font-px); font-size: 0.62rem; color: var(--text-dim); letter-spacing: 0.08em; line-height: 2; }
.footer span { color: var(--crimson); }

/* ═══════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════ */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-dim); }
.empty-state-icon { font-size: 2.8rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state p { font-family: var(--font-px); font-size: 0.52rem; line-height: 2; }

/* ═══════════════════════════════════════
   CHECKBOX
═══════════════════════════════════════ */
.form-checkbox { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-family: var(--font-px); font-size: 0.46rem; color: var(--text-muted); line-height: 1.9; }
.form-checkbox input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--crimson); cursor: pointer; }

/* ═══════════════════════════════════════
   DOWNLOAD BLOCK
═══════════════════════════════════════ */
.download-block { background: var(--surface); border: 2px solid var(--border); border-left: 4px solid var(--crimson); padding: 1.5rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.download-info h3 { font-family: var(--font-px); font-size: 0.62rem; color: var(--text); line-height: 1.65; }
.download-info p  { font-family: var(--font-body); color: var(--text-muted); font-size: 1.1rem; margin-top: 0.3rem; }

/* ═══════════════════════════════════════
   UTILITY / ANIMATION
═══════════════════════════════════════ */
.text-muted { color: var(--text-muted); }
.text-gold  { color: var(--gold); }
.text-red   { color: var(--crimson); }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-up { animation: fadeUp 0.45s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
}
@media (max-width: 768px) {
  .hero-stats { gap: 1.5rem; }
  .profile-header { flex-direction: column; }
  .nav-links { display: none; }
  .download-block { flex-direction: column; align-items: flex-start; }
  .hero-title { font-size: 1.1rem; }
  .profile-totals { gap: 1.2rem; }
}

/* -- ChechboxSelectMultiple (achievements) -- */
.form-group u1 {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.4rem;
  margin: 0; padding: 0;
}
.form-group ul li label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-muted);
  padding: 0.4rem 0.5rem;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.form-group ul li label:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(139,0,0,0.1);
}
.form-group ul li input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--crimson);
  flex-shrink: 0;
  cursor: point;
}
