@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&display=swap');
@import url('theme.css');

/* =========================================================
   Tournament Site — Auth Pages Stylesheet
   Design tokens are defined once as CSS variables below so
   the palette/type can be tuned in one place later.
   ========================================================= */

:root {
  /* Color */
  --bg-void: #0A0C10;
  --panel: #12151C;
  --panel-raised: #171B24;
  --border: #232733;
  --crimson: #E8283F;
  --crimson-dim: #B31F31;
  --cyan: #3FE0D0;
  --text-primary: #ECEEF2;
  --text-muted: #7A8090;

  /* Type */
  --font-display: 'Chakra Petch', 'Hind Siliguri', sans-serif;
  --font-body: 'Inter', 'Hind Siliguri', 'Segoe UI', sans-serif;

  /* Layout */
  --radius-clip: 4px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh; /* accounts for mobile browser address bar */
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Page shell: split screen ---------- */

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Left brand panel ---------- */

.brand-panel {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  border-right: 1px solid var(--border);
}

.brand-panel::before {
  /* angled stripe motif */
  content: "";
  position: absolute;
  top: -20%;
  left: 55%;
  width: 260px;
  height: 160%;
  background: var(--crimson);
  opacity: 0.08;
  transform: rotate(18deg);
}

.brand-panel::after {
  content: "";
  position: absolute;
  top: -20%;
  left: 68%;
  width: 90px;
  height: 160%;
  background: var(--cyan);
  opacity: 0.06;
  transform: rotate(18deg);
}

.brand-mark {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Brand logo (zor-logo.png). Every page's header, footer, and the login /
   signup brand panel use this one element, so the logo only needs to be
   changed here. The image already carries its own clipped corner and
   transparent edge, so no clip-path or background color is needed. */
.brand-mark__glyph {
  width: 40px;
  height: 40px;
  flex: none;
  background: url("zor-logo.png") center / contain no-repeat;
}

.brand-panel .brand-mark__glyph {
  width: 48px;
  height: 48px;
}

.brand-mark__titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.15;
}

.brand-mark__name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-mark__tagline {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #9aa3b5);
  line-height: 1.25;
}

.brand-copy {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.brand-copy h1 {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1.1;
  margin: 0 0 16px;
  font-weight: 600;
}

.brand-copy p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.brand-foot {
  position: relative;
  z-index: 1;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Right form panel ---------- */

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.form-card {
  width: 100%;
  max-width: 380px;
}

.form-card__header {
  margin-bottom: 32px;
}

.form-card__header h2 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0 0 6px;
  font-weight: 600;
  color: #f4f6fb;
  text-shadow:
    0 0 10px rgba(100, 200, 255, 0.45),
    0 0 22px rgba(80, 160, 255, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.85);
}

/* Subtitle under Log in / Create account — readable over busy background */
.form-card__header p {
  font-size: 14px;
  line-height: 1.5;
  color: #e8ecf6;
  margin: 0;
  font-weight: 500;
  text-shadow:
    0 0 8px rgba(90, 180, 255, 0.4),
    0 0 18px rgba(60, 140, 255, 0.22),
    0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Field group: underline style, not boxed */

.field-group {
  margin-bottom: 22px;
}

/* Labels (Email, Password, Username, …) — strong glow so they never blend in */
.field-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f0f4ff;
  margin-bottom: 8px;
  text-shadow:
    0 0 6px rgba(100, 200, 255, 0.55),
    0 0 14px rgba(70, 160, 255, 0.35),
    0 0 24px rgba(50, 120, 255, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.95);
}

.field-group input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(160, 190, 255, 0.35);
  color: #f7f9ff;
  font-family: var(--font-body);
  font-size: 16px; /* 16px+ prevents iOS Safari from auto-zooming on focus */
  font-weight: 500;
  padding: 12px 2px;
  outline: none;
  transition: border-color 0.15s ease, text-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  text-shadow:
    0 0 6px rgba(80, 170, 255, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.75);
}

.field-group input::placeholder {
  color: rgba(180, 195, 220, 0.45);
  text-shadow: none;
}

.field-group input:focus {
  border-bottom-color: var(--cyan);
  text-shadow:
    0 0 8px rgba(80, 220, 255, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Primary action button — clipped corner */

.btn-primary {
  width: 100%;
  min-height: 48px;
  background: var(--crimson);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  padding: 14px 20px;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary:hover {
  background: var(--crimson-dim);
}

/* Divider */

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Secondary / Google button */

.btn-secondary {
  width: 100%;
  min-height: 48px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border-radius: var(--radius-clip);
  transition: border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-secondary:hover {
  border-color: var(--cyan);
}

.btn-secondary svg {
  width: 16px;
  height: 16px;
}

/* Footer switch link */

.form-switch {
  margin-top: 28px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.form-switch a {
  color: var(--cyan);
  padding: 6px 2px;
  display: inline-block;
}

.form-switch a:hover {
  text-decoration: underline;
}

/* Auth Verification & Notification Notices */
.auth-verify-notice {
  background: rgba(0, 158, 184, 0.08);
  border: 1px solid rgba(0, 158, 184, 0.35);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  color: #ECEEF2;
  font-size: 13.5px;
  line-height: 1.5;
}

.auth-success-notice {
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.35);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  color: #00E676;
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 500;
}

.auth-error-msg {
  background: rgba(232, 40, 63, 0.12);
  border: 1px solid rgba(232, 40, 63, 0.45);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  color: #ff5252;
  font-size: 13.5px;
  line-height: 1.55;
  box-shadow: 0 4px 16px rgba(232, 40, 63, 0.15);
  animation: authShake 0.35s ease;
}

.auth-error-msg a {
  color: #00e5ff;
  text-decoration: underline;
  font-weight: 600;
}

.auth-error-msg a:hover {
  color: #ffffff;
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.btn-resend-verify {
  display: inline-block;
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-resend-verify:hover {
  background: rgba(0, 158, 184, 0.15);
  transform: translateY(-1px);
}

.btn-resend-verify:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Responsive ---------- */

/* Tablet and below: stack the split screen */
@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 32px;
    padding-top: max(32px, env(safe-area-inset-top));
  }

  .brand-copy h1 {
    font-size: 30px;
  }

  .brand-copy p {
    font-size: 14px;
  }

  .form-panel {
    padding: 40px 24px;
    padding-bottom: max(40px, env(safe-area-inset-bottom));
  }
}

/* Phones: tighten spacing further and simplify the brand panel
   so the form is reachable without much scrolling */
@media (max-width: 480px) {
  .brand-panel {
    min-height: 160px;
    padding: 24px 20px;
    padding-top: max(24px, env(safe-area-inset-top));
  }

  .brand-mark__name {
    font-size: 17px;
  }

  .brand-copy h1 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  /* The supporting line is the first thing to cut on small screens
     to keep the brand panel compact and the form within easy reach */
  .brand-copy p {
    display: none;
  }

  .brand-foot {
    font-size: 11px;
  }

  .form-panel {
    padding: 32px 20px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .form-card__header {
    margin-bottom: 24px;
  }

  .form-card__header h2 {
    font-size: 22px;
  }

  .field-group {
    margin-bottom: 18px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---------- Auth-provider-conditional UI ----------
   Managed dynamically via JavaScript so options remain visible with
   helpful context tags rather than disappearing silently. */
/* body[data-auth-provider="google"] [data-auth-only="email"] handled dynamically */

/* ---------- Avatar fill utility ----------
   Used inside any circular avatar container (.avatar, .profile-avatar-lg).
   profile-sync.js fills this with either initials or an uploaded photo. */
.avatar-fill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.avatar-fill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ---------- Eyebrow / YouTube SVG Sizing Safeguards ----------
   Guarantees SVG icons never expand during navigation or FOUC */
.live-platform__icon,
.tutorial-eyebrow__icon {
  width: 26px !important;
  height: 19px !important;
  max-width: 26px !important;
  max-height: 19px !important;
  flex: none !important;
}

.live-platform,
.tutorial-eyebrow {
  display: inline-flex !important;
  align-items: center !important;
}

/* ---------- Show Password Toggle Checkbox ---------- */
.show-password-wrap {
  display: flex;
  align-items: center;
  margin: -10px 0 18px 0;
}

.show-password-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  font-size: 13px;
  font-weight: 500;
  color: #9aa8be;
  transition: color 0.15s ease;
}

.show-password-label:hover {
  color: #f0f4ff;
}

.show-password-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--cyan, #00f0ff);
  border-radius: 4px;
}

/* =========================================================
   Fail-safe Celestial Particle Layer & 3D Red S / Blue X Glyphs
   Guarantees absolute overlay & hidden initial state on all devices
   ========================================================= */
.bar-celestial-particles,
.profile-header__particles {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: 1 !important;
  border-radius: inherit;
  contain: paint;
}

.ph-glyph {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  font-family: var(--font-display, "Chakra Petch", sans-serif);
  font-weight: 800;
  pointer-events: none !important;
  user-select: none !important;
  opacity: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 1 !important;
}

.ph-glyph__inner {
  display: inline-block;
  will-change: transform;
}



