@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(woff/19cfc7226ec3afaa-s.woff2) format("woff2");
}
@font-face {
  font-family: "Lilita One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(woff/043945717efb3a31-s.p.woff2) format("woff2");
}
:root {
  --bg: #05020D;
  --bg2: #10141F;
  --panel: rgba(20, 25, 40, 0.65);
  --panel-2: rgba(15, 20, 35, 0.7);
  --line: rgba(122, 160, 255, 0.2);
  --line-strong: rgba(130, 180, 255, 0.5);
  --text: #E0E8FF;
  --muted: #8A99B5;
  --primary: #6A8DFF;
  --primary2: #86E1FF;
  --ok: #3BFFA2;
  --warn: #FFD466;
  --danger: #FF7891;
  --glow-effect: 0 0 12px rgba(122, 160, 255, 0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(106, 141, 255, 0.2), transparent),
    radial-gradient(ellipse 50% 40% at 10% 100%, rgba(134, 225, 255, 0.15), transparent),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(90, 110, 220, 0.15), transparent),
    linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed;
}
#skipLoginBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: auto;
  padding: 4px 8px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  cursor: pointer;
  z-index: 10;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.login-wrapper { 
  min-height: 100vh; 
  display: flex; 
  flex-direction: column;
  align-items: center; 
  justify-content: center; 
  padding: 20px; 
  text-align: center;
}
.login-container, .navbar, .content-panel, .modal-content {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: var(--glow-effect), 0 12px 30px rgba(0, 0, 0, 0.4);
}
.login-container { position: relative; width: 100%; max-width: 430px; border-radius: 20px; padding: 40px 32px; }
.logo { text-align: center; margin-bottom: 28px; }
.logo h1, .navbar h1, .section-title, .phase-section h3, .modal-header h2, .round-title, .empty-state h3 {
  font-family: "Lilita One", cursive;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.4px;
  color: #e7eeff;
  -webkit-text-fill-color: initial;
  background: none;
}
.logo h1 { font-size: 42px; }
.logo p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; color: #e1d2fb; }
.form-group input, .form-group select, .form-group textarea, .search-controls input, .search-controls select, .search-box input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(15, 20, 35, 0.5); color: var(--text); font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input::placeholder, .search-controls input::placeholder, .search-box input::placeholder { color: var(--muted); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.form-group select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238A99B5'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkbox-group label {
  position: relative;
  padding-left: 32px;
  cursor: pointer;
  user-select: none;
}
.checkbox-group label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: rgba(15, 20, 35, 0.5);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: all 0.2s ease;
}
.checkbox-group input:checked + label::before {
  background: var(--primary);
  border-color: var(--primary);
}
.checkbox-group label::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 50%;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translateY(-50%) rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}
.checkbox-group input:checked + label::after {
  transform: translateY(-50%) rotate(45deg) scale(1);
}
.form-group-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
.form-group-color input[type="color"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 38px;
  height: 38px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.form-group-color input[type="color"]:hover {
  transform: scale(1.1);
  box-shadow: var(--glow-effect);
}
.form-group-color input[type="color"]::-webkit-color-swatch {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  backdrop-filter: blur(8px);
}
.form-group-color input[type="color"]::-moz-color-swatch {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  backdrop-filter: blur(8px);
}
.btn, .tab-btn, .btn-search, .btn-edit, .btn-delete, .btn-brackets, .btn-add-phase, .btn-remove-phase, .btn-logout {
  border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-family: Inter, sans-serif; font-weight: 700; transition: all 0.16s ease;
}
.btn { width: 100%; padding: 12px 14px; color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--primary2)); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 2px 5px rgba(106, 141, 255, 0.3); }
.btn:hover, .btn-search:hover, .btn-edit:hover, .btn-delete:hover, .btn-brackets:hover, .btn-add-phase:hover, .btn-remove-phase:hover, .btn-logout:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 4px 8px rgba(106, 141, 255, 0.35); }
.btn-secondary { background: rgba(18, 127, 212, 0.2); border-color: rgba(67, 192, 238, 0.38); }
.error-msg, .message-box { display: none; margin-top: 12px; padding: 11px 13px; border-radius: 10px; font-size: 13px; font-weight: 700; }
.error-msg.visible, .message-box.success, .message-box.error { display: block; }
.error-msg, .message-box.error { color: #ffb4c4; background: rgba(255, 100, 129, 0.12); border: 1px solid rgba(255, 100, 129, 0.36); }
.message-box.success { color: #9df6cb; background: rgba(45, 211, 140, 0.12); border: 1px solid rgba(45, 211, 140, 0.35); }
.main-container { display: none; max-width: 1560px; margin: 0 auto; padding: 24px 16px 32px; }
.main-container.active { display: block; }
.navbar { display: flex; align-items: center; justify-content: space-between; border-radius: 16px; padding: 17px 20px; margin-bottom: 16px; }
.navbar h1 { font-size: 30px; }
.btn-logout { padding: 9px 14px; color: #ffb4c4; background: rgba(255, 100, 129, 0.12); border-color: rgba(255, 100, 129, 0.34); }
.tabs { display: flex; gap: 10px; margin-bottom: 14px; }
.tab-btn { display: flex; align-items: center; gap: 10px; padding: 10px 15px; background: transparent; border-color: transparent; color: var(--muted); }
.icon { width: 20px; height: 20px; }
.tab-btn.active { color: var(--text); border-color: var(--line); background: linear-gradient(135deg, rgba(106, 141, 255, 0.2), rgba(134, 225, 255, 0.1)); }
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.dashboard-layout > .tabs {
  flex-direction: column;
  position: sticky;
  top: 16px;
  margin-bottom: 0;
  padding: 14px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}
.dashboard-layout > .tabs .tab-btn {
  width: 100%;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.2px;
}
.dashboard-panels {
  min-width: 0;
}
.content-panel { display: none; border-radius: 16px; padding: 26px; min-height: 560px; }
.content-panel.active { display: block; animation: fadeInUp 0.4s ease-out forwards; }
.section-title { font-size: 30px; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 20px; }
.prizes-grid .form-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.checkbox-group { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(9, 6, 22, 0.56); }
.checkbox-group input[type="checkbox"] { accent-color: var(--primary); width: 18px; height: 18px; }
.phase-section { margin-top: 14px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(13, 9, 30, 0.62); }
.phase-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.btn-add-phase { margin-top: 12px; width: 100%; padding: 11px; color: #d5f1ff; background: rgba(18, 127, 212, 0.2); border-color: rgba(67, 192, 238, 0.36); }
.btn-remove-phase { padding: 8px 12px; color: #ffb4c4; background: rgba(255, 100, 129, 0.12); border-color: rgba(255, 100, 129, 0.34); }
.search-controls, .search-box { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search-controls input, .search-controls select { flex: 1; min-width: 220px; }
.btn-search { padding: 11px 14px; white-space: nowrap; color: #def5ff; background: rgba(18, 127, 212, 0.22); border-color: rgba(67, 192, 238, 0.36); }
.tournament-list, .user-list { display: flex; flex-direction: column; gap: 11px; }
.tournament-item, .user-item {
  position: relative; display: flex; align-items: center; gap: 12px; border-radius: 13px; padding: 14px;
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
}
.tournament-item:hover, .user-item:hover { 
  transform: translateY(-3px);
  border-color: var(--line-strong); 
  box-shadow: var(--glow-effect), 0 12px 28px rgba(0, 0, 0, 0.3); 
}
.tournament-region-badge { position: absolute; top: 9px; left: 9px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; color: #d8f2ff; background: rgba(18, 127, 212, 0.24); border: 1px solid rgba(67, 192, 238, 0.44); }
.tournament-thumbnail { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.tournament-info, .user-info { flex: 1; min-width: 0; }
.tournament-title, .user-title { font-size: 17px; font-weight: 800; }
.tournament-id, .user-id { margin-top: 4px; font-size: 11px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tournament-meta, .user-stat { margin-top: 6px; font-size: 12px; color: var(--muted); }
.user-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.tournament-stats { display: flex; gap: 12px; }
.tournament-stat { text-align: center; }
.stat-label { font-size: 10px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); }
.stat-value { font-weight: 800; }
.status-badge { padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.status-open { background: rgba(45, 211, 140, 0.16); color: #98f4c7; border: 1px solid rgba(45, 211, 140, 0.35); }
.status-running { background: rgba(18, 127, 212, 0.2); color: #cfefff; border: 1px solid rgba(67, 192, 238, 0.35); }
.status-closed { background: rgba(246, 196, 87, 0.17); color: #ffe6ac; border: 1px solid rgba(246, 196, 87, 0.35); }
.status-finished { background: rgba(160, 174, 205, 0.18); color: #d5e0f8; border: 1px solid rgba(160, 174, 205, 0.34); }
.tournament-actions, .user-actions { display: flex; gap: 7px; }
.btn-edit, .btn-delete, .btn-brackets { padding: 8px 11px; font-size: 12px; font-weight: 600; }
.btn-edit { color: #d5f1ff; background: rgba(18, 127, 212, 0.16); border-color: rgba(67, 192, 238, 0.35); }
.btn-brackets { color: #ffe7ac; background: rgba(246, 196, 87, 0.16); border-color: rgba(246, 196, 87, 0.35); }
.btn-delete { color: #ffb5c3; background: rgba(255, 100, 129, 0.13); border-color: rgba(255, 100, 129, 0.35); }
.loading, .empty-state { text-align: center; padding: 40px 16px; }
.loading { color: #bee8ff; font-weight: 700; }
.empty-state { color: var(--muted); }
.modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.66); backdrop-filter: blur(8px); }
.modal.active { display: flex; }
.modal-content { width: 100%; max-width: 980px; max-height: 90vh; overflow: auto; border-radius: 16px; padding: 22px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.btn-close { width: 38px; height: 38px; border-radius: 9px; color: #ffb5c3; background: rgba(255, 100, 129, 0.14); border-color: rgba(255, 100, 129, 0.34); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; max-height: 410px; overflow: auto; background: rgba(12, 18, 30, 0.58); border: 1px solid var(--line); border-radius: 11px; padding: 10px; }
.emote-item, .map-item { padding: 9px 7px; text-align: center; border-radius: 8px; border: 1px solid var(--line); background: rgba(16, 10, 34, 0.7); cursor: pointer; font-size: 12px; font-weight: 700; }
.emote-item:hover, .map-item:hover { border-color: var(--line-strong); }
.emote-item.selected, .map-item.selected { background: rgba(18, 127, 212, 0.3); border-color: rgba(67, 192, 238, 0.72); }
#selectedEmotesDisplay { margin-top: 8px; min-height: 36px; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(12, 18, 30, 0.62); font-size: 13px; color: #cdefff; }
.bracket-round { margin-bottom: 18px; padding: 14px; border-radius: 11px; border: 1px solid var(--line); background: rgba(13, 9, 30, 0.6); }
.round-title { font-size: 24px; margin-bottom: 10px; }
.matches-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(370px, 1fr)); gap: 11px; }
.bracket-match { padding: 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(16, 10, 34, 0.72); }
.match-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.match-number { font-weight: 700; color: var(--muted); }
.match-status { padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.match-status.pending { background: rgba(246, 196, 87, 0.2); color: #ffe7ac; }
.match-status.completed { background: rgba(45, 211, 140, 0.2); color: #9ef4ca; }
.teams-container { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.team { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 9px; border: 1px solid var(--line); background: rgba(9, 6, 22, 0.72); }
.team.winner { background: rgba(45, 211, 140, 0.12); border-color: rgba(45, 211, 140, 0.45); }
.team.loser { background: rgba(255, 100, 129, 0.1); border-color: rgba(255, 100, 129, 0.35); opacity: 0.82; }
.team-id { font-size: 12px; font-weight: 800; color: #efd8ff; margin-bottom: 4px; }
.player { font-size: 12px; color: #f2eaff; }
.team-score { padding: 4px 8px; min-width: 52px; text-align: center; border-radius: 8px; font-size: 12px; font-weight: 800; }
.match-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.btn-assign-win { flex: 1; min-width: 145px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(67, 192, 238, 0.36); background: rgba(18, 127, 212, 0.22); color: #d7f2ff; font-size: 12px; font-weight: 700; cursor: pointer; }
@media (max-width: 980px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .dashboard-layout > .tabs {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .dashboard-layout > .tabs .tab-btn {
    width: auto;
    text-align: center;
    flex-grow: 1;
  }
  .prizes-grid .form-row { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .matches-container { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .main-container { padding: 16px 8px; }
  .navbar { flex-direction: column; align-items: center; gap: 12px; }
  .content-panel { padding: 16px; }
  .section-title { font-size: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .tournament-item, .user-item { flex-direction: column; align-items: stretch; }
  .tournament-actions, .user-actions { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }
  .btn-edit, .btn-delete, .btn-brackets { display: flex; align-items: center; justify-content: center; gap: 8px; }
}
.skeleton-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 13px;
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.skeleton-thumbnail {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background-color: rgba(138, 153, 181, 0.1);
}
.skeleton-info {
  flex: 1;
}
.skeleton-line {
  height: 16px;
  border-radius: 8px;
  background-color: rgba(138, 153, 181, 0.1);
  margin-bottom: 8px;
}
.skeleton-line.short {
  width: 60%;
}
.skeleton-line.medium {
  width: 80%;
}
.shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  animation: shimmer 1.5s infinite linear;
}
@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
