/* ============================
   KPL – Kehnu Premier League
   Flutter-inspired Design System
   ============================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --accent: #f9a825;
  --accent-dark: #e65100;
  --green: #00c853;
  --red: #e53935;
  --surface: #ffffff;
  --surface-2: #f4f6fb;
  --surface-3: #eef1f8;
  --text-primary: #0d1117;
  --text-secondary: #546e7a;
  --text-hint: #90a4ae;
  --border: #dde3ef;
  --shadow-sm: 0 2px 8px rgba(26, 115, 232, .12);
  --shadow-md: 0 8px 24px rgba(26, 115, 232, .16);
  --shadow-lg: 0 16px 48px rgba(26, 115, 232, .22);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font: 'Outfit', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--surface-2);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}



/* ---- App Shell ---- */
.app-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
}

/* ---- Hero Header (Compact App-Bar) ---- */
.hero-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a1628 0%, #0d2045 55%, #1a3a6e 100%);
}

.header-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 120% at 0% 50%, rgba(26, 115, 232, .3) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 100% 50%, rgba(249, 168, 37, .18) 0%, transparent 60%);
  animation: bgPulse 6s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  from {
    opacity: 0.7;
  }

  to {
    opacity: 1;
  }
}

/* Top bar: logo + title + badge */
.header-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.kpl-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), #ff6f00);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 0 3px rgba(249, 168, 37, .25), 0 4px 16px rgba(249, 168, 37, .3);
  flex-shrink: 0;
  animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {

  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-3px) rotate(2deg);
  }
}

.header-titles {
  min-width: 0;
}

.hero-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #f9a825, #ff6f00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
  font-weight: 400;
  white-space: nowrap;
}

.season-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  background: rgba(0, 200, 83, .15);
  border: 1px solid rgba(0, 200, 83, .35);
  color: #00e676;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.dot {
  width: 6px;
  height: 6px;
  background: #00e676;
  border-radius: 50%;
  animation: blink 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

/* Stats strip */
.header-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 20px 14px;
  gap: 0;
}

.h-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex: 1;
}

.h-stat-val {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.5px;
}

.h-stat-lbl {
  font-size: 9px;
  color: rgba(255, 255, 255, .45);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.h-stat-div {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, .12);
  flex-shrink: 0;
}

/* Rainbow bottom line */
.header-line {
  height: 3px;
  background: linear-gradient(90deg,
      #1a73e8 0%,
      #7c4dff 25%,
      #f9a825 50%,
      #00c853 75%,
      #e53935 100%);
  opacity: 0.9;
}


/* ---- Main Content ---- */
.main-content {
  flex: 1;
  padding: 0 0 24px;
}

/* ---- Section ---- */
.section {
  padding: 24px 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-badge {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---- Seasons Row ---- */
.seasons-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.season-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px 10px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
}

.season-card:active {
  transform: scale(0.96);
}

.season-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background: repeating-linear-gradient(45deg,
      rgba(255, 255, 255, .08) 0px,
      rgba(255, 255, 255, .08) 1px,
      transparent 1px,
      transparent 8px);
}

/* Season 1 */
.season1 {
  background: linear-gradient(160deg, #1a237e 0%, #283593 50%, #3949ab 100%);
}

/* Season 2 */
.season2 {
  background: linear-gradient(160deg, #4a148c 0%, #6a1b9a 50%, #8e24aa 100%);
}

/* Season 3 */
.season3 {
  background: linear-gradient(160deg, #b71c1c 0%, #c62828 50%, #e53935 100%);
}

.season-card.featured {
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(142, 36, 170, .5), 0 0 0 2px rgba(255, 255, 255, .2);
}

.season-card.featured:active {
  transform: scale(1.00);
}

.season-card-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  filter: blur(20px);
}

.season-trophy {
  font-size: 28px;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  animation: floatTrophy 2.5s ease-in-out infinite;
}

@keyframes floatTrophy {

  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }

  50% {
    transform: translateY(-4px) rotate(5deg);
  }
}

.season-year {
  font-size: 10px;
  color: rgba(255, 255, 255, .55);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.season-number {
  font-size: 10px;
  color: rgba(255, 255, 255, .8);
  text-align: center;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.season-number strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
}

.season-tag {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.season-tag.winner {
  background: rgba(249, 168, 37, .25);
  color: #ffca28;
}

.season-tag.epic {
  background: rgba(255, 255, 255, .15);
  color: #e1bee7;
}

.season-tag.live-tag {
  background: rgba(0, 200, 83, .25);
  color: #69f0ae;
}

.season-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .5));
  padding: 12px 8px 8px;
  text-align: center;
}

.season-teams {
  font-size: 9px;
  color: rgba(255, 255, 255, .7);
  font-weight: 600;
}

.featured-badge {
  position: absolute;
  top: 8px;
  right: 0;
  background: linear-gradient(135deg, #f9a825, #ff6f00);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 3px 8px 3px 6px;
  border-radius: 999px 0 0 999px;
  letter-spacing: 0.3px;
  z-index: 2;
}

.live-badge {
  position: absolute;
  top: 8px;
  right: 0;
  background: var(--green);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 3px 8px 3px 6px;
  border-radius: 999px 0 0 999px;
  letter-spacing: 0.3px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
}

.live-dot {
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  animation: blink 1s infinite;
}

.cricket-ball {
  position: absolute;
  font-size: 20px;
  opacity: 0.12;
  z-index: 0;
}

.s1-ball {
  bottom: 20px;
  right: 6px;
  transform: rotate(20deg);
}

.s2-ball {
  bottom: 22px;
  left: 6px;
  transform: rotate(-15deg);
}

.s3-ball {
  top: 16px;
  left: 6px;
  transform: rotate(30deg);
}

/* ---- Stats ---- */
.stats-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.stat-chip {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.stat-icon {
  font-size: 20px;
}

.stat-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-lbl {
  font-size: 10px;
  color: var(--text-hint);
  font-weight: 500;
  margin-top: 1px;
}

/* ---- Divider ---- */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  margin: 4px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.divider-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

/* ---- Form Card ---- */
.form-section {
  padding: 0;
  margin: 0;
}

.form-card {
  background: var(--surface);
  width: 100%;
  border-radius: 0;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(26, 115, 232, .1);
  border: none;
  border-top: 4px solid;
  border-image: linear-gradient(90deg, var(--primary), var(--accent), var(--green)) 1;
  position: relative;
  box-sizing: border-box;
}

.form-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.form-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(26, 115, 232, .15);
}

.form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.form-subtitle {
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
  margin-top: 3px;
}

/* ---- Inputs ---- */
.input-group {
  margin-bottom: 22px;
  position: relative;
}

.input-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.label-icon {
  font-size: 15px;
}

.input-wrapper {
  position: relative;
}

.app-input {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface-2);
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.app-input::placeholder {
  color: var(--text-hint);
  font-weight: 400;
}

.app-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .1);
}

.app-input.error {
  border-color: var(--red);
  background: #fff5f5;
}

.app-input.valid {
  border-color: var(--green);
  background: #f0fff4;
}

.input-underline {
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--primary);
  border-radius: 999px;
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.app-input:focus~.input-underline {
  transform: scaleX(1);
}

.error-msg {
  display: none;
  font-size: 11px;
  color: var(--red);
  font-weight: 500;
  margin-top: 5px;
  padding-left: 4px;
}

.input-group.has-error .error-msg {
  display: block;
}

.input-group.has-error .app-input {
  border-color: var(--red);
}

/* ---- Register Button ---- */
.register-btn {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  font-family: var(--font);
  background: transparent;
  transition: transform var(--transition), box-shadow var(--transition);
}

.register-btn:active {
  transform: scale(0.98);
}

.btn-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: var(--radius-sm);
  transition: filter var(--transition);
}

.register-btn:hover .btn-bg {
  filter: brightness(1.08);
}

.btn-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  height: 100%;
}

.btn-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.whatsapp-icon,
.arrow-icon {
  flex-shrink: 0;
}

.arrow-icon {
  transition: transform var(--transition);
}

.register-btn:hover .arrow-icon {
  transform: translateX(4px);
}

.btn-ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, .4);
  border-radius: 50%;
  transform: scale(0);
  animation: none;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(20);
    opacity: 0;
  }
}

.form-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-hint);
  margin-top: 16px;
  line-height: 1.5;
  padding: 0 4px;
}

/* ---- Footer ---- */
.app-footer {
  text-align: center;
  padding: 24px 16px 32px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.footer-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-sub {
  font-size: 11px;
  color: var(--text-hint);
  margin-top: 2px;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e1e2e;
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s;
  opacity: 0;
  z-index: 9999;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 16px;
}

/* ============================
   TABLET (600px+)
   ============================ */
@media (min-width: 600px) {
  .section {
    padding: 28px 32px;
  }

  .form-card {
    padding: 32px 28px;
  }

  .section-divider {
    padding: 0 32px;
  }

  .season-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  }

  .season-card.featured:hover {
    transform: scale(1.06) translateY(-4px);
  }
}

/* ============================
   LAPTOP / DESKTOP (900px+)
   ============================ */
@media (min-width: 900px) {
  .main-content {
    max-width: 100%;
    width: 100%;
    margin: 0;
  }

  .hero-title {
    font-size: 40px;
  }

  .seasons-row {
    gap: 20px;
  }

  .season-number strong {
    font-size: 30px;
  }

  .season-trophy {
    font-size: 36px;
  }

  .stats-row {
    gap: 16px;
  }

  .stat-chip {
    padding: 16px 20px;
  }

  .stat-val {
    font-size: 20px;
  }

  .form-section {
    padding: 0;
    margin: 0;
  }

  .form-card {
    padding: 36px 28px;
  }

  .app-input {
    height: 56px;
    font-size: 16px;
  }

  .register-btn {
    height: 60px;
  }

  .btn-text {
    font-size: 17px;
  }
}

/* ============================
   WIDE SCREENS (1200px+)
   ============================ */
@media (min-width: 1200px) {
  .main-content {
    max-width: 100%;
    width: 100%;
    margin: 0;
  }

  .form-section {
    padding: 0;
    margin: 0;
  }

  .form-card {
    padding: 40px 32px;
  }
}

/* ---- Scrollbar (desktop) ---- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(26, 115, 232, .4);
  border-radius: 99px;
}

/* ---- Accessibility ---- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}