*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  background: #ffffff;
}

/* ══════════════════════════════════════════════════
   LOADER
══════════════════════════════════════════════════ */

#loader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#loaderCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.loader-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-logo {
  margin-bottom: 4px;
}

.loader-logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.loader-logo-placeholder {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.18em;
  color: #111111;
  display: none;
  align-items: center;
  justify-content: center;
}

.loader-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  line-height: 0.92;
  text-align: center;
}

.loader-t1 {
  font-size: 48px;
  color: #111111;
  letter-spacing: 0.03em;
}

.loader-t2 {
  font-size: 48px;
  color: #ED1C24;
  letter-spacing: 0.03em;
}

.loader-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 220px;
  margin-top: 8px;
}

.loader-bar-track {
  width: 100%;
  height: 2px;
  background: #e8e8e8;
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: #ED1C24;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.loader-bar-label {
  font-size: 10px;
  color: #bbbbbb;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.loader-enter {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #111111;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid #dddddd;
  padding: 10px 28px;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.15s, background 0.15s;
  animation: pulse-border 1.8s ease-in-out infinite;
}

.loader-enter:hover {
  border-color: #ED1C24;
  background: #fff5f5;
  animation: none;
}

@keyframes pulse-border {
  0%, 100% { border-color: #dddddd; }
  50%       { border-color: #aaaaaa; }
}

/* ══════════════════════════════════════════════════
   MAIN SCREEN
══════════════════════════════════════════════════ */

.screen {
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

.screen.visible {
  visibility: visible !important;
  opacity: 1 !important;
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#f0f0f0 1px, transparent 1px),
    linear-gradient(90deg, #f0f0f0 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.top-bar {
  height: 3px;
  background: #ED1C24;
  width: 100%;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 40px;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid #ebebeb;
  flex-shrink: 0;
  background: #ffffff;
}

.nav-right {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.logo-placeholder {
  width: 130px;
  height: 40px;
  border: 1.5px dashed #cccccc;
  border-radius: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #bbbbbb;
  letter-spacing: 0.08em;
}

.body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 72px;
  padding: 40px 80px;
  position: relative;
  z-index: 2;
  min-height: 0;
}

.left {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.eyebrow {
  font-size: 11px;
  color: #ED1C24;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.eyebrow-line {
  width: 18px;
  height: 1.5px;
  background: #ED1C24;
  display: inline-block;
  flex-shrink: 0;
}

.title {
  display: flex;
  flex-direction: column;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  line-height: 0.95;
}

.t1 { font-size: 64px; color: #111111; letter-spacing: 0.01em; }
.t2 { font-size: 64px; color: #ED1C24; letter-spacing: 0.01em; }

.t3 {
  font-size: 26px;
  color: #004C97;
  letter-spacing: 0.04em;
  margin-top: 8px;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #004C97;
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 0.9s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.divider {
  width: 40px;
  height: 2px;
  background: #e8e8e8;
  margin: 22px 0 14px;
}

.division {
  font-size: 12px;
  color: #999999;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sep {
  width: 1px;
  background: #e8e8e8;
  align-self: stretch;
  flex-shrink: 0;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 280px;
  flex-shrink: 0;
}

.menu-label {
  font-size: 10px;
  color: #bbbbbb;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-left: 2px;
}

.btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #e8e8e8;
  background: #ffffff;
  cursor: pointer;
  border-radius: 3px;
  width: 100%;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  font-family: 'Inter', sans-serif;
}

.btn::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.15s;
}

.btn:focus-visible {
  outline: 2px solid #004C97;
  outline-offset: 2px;
}

.btn:hover {
  background: #fafafa;
  transform: translateX(4px);
}

.btn:active {
  transform: translateX(4px) scale(0.99);
}

.btn-play:hover    { border-color: #ED1C24; }
.btn-play:hover::after    { background: #ED1C24; }

.btn-stats:hover   { border-color: #004C97; }
.btn-stats:hover::after   { background: #004C97; }

.btn-settings:hover { border-color: #444444; }
.btn-settings:hover::after { background: #444444; }

.btn-credits:hover  { border-color: #888888; }
.btn-credits:hover::after  { background: #888888; }

.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.btn-play .btn-icon     { background: #fff0f0; color: #ED1C24; }
.btn-stats .btn-icon    { background: #eef4ff; color: #004C97; }
.btn-settings .btn-icon { background: #f5f5f5; color: #555555; }
.btn-credits .btn-icon  { background: #f5f5f5; color: #888888; }

.btn-play:hover .btn-icon     { background: #ED1C24; color: #ffffff; }
.btn-stats:hover .btn-icon    { background: #004C97; color: #ffffff; }
.btn-settings:hover .btn-icon { background: #333333; color: #ffffff; }
.btn-credits:hover .btn-icon  { background: #888888; color: #ffffff; }

.btn-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #111111;
  letter-spacing: 0.02em;
}

.btn-arrow {
  color: #cccccc;
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}

.btn:hover .btn-arrow {
  color: #888888;
  transform: translateX(3px);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 40px;
  border-top: 1px solid #ebebeb;
  position: relative;
  z-index: 2;
  background: #ffffff;
  flex-shrink: 0;
}

.footer-left,
.footer-right {
  font-size: 10px;
  color: #cccccc;
  letter-spacing: 0.08em;
}

.bottom-bar {
  height: 3px;
  background: linear-gradient(90deg, #ED1C24 0%, #004C97 55%, #e8e8e8 100%);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

@media (max-width: 780px) {
  .body {
    flex-direction: column;
    gap: 32px;
    padding: 32px 24px;
    justify-content: flex-start;
    overflow-y: auto;
  }
  .sep { display: none; }
  .t1, .t2 { font-size: 44px; }
  .t3 { font-size: 20px; }
  .menu { width: 100%; }
}