/* APJ Padel - Styles */

:root {
  --bg: #0f0f0f;
  --bg-2: #1a1a1a;
  --bg-3: #252525;
  --card: rgba(255,255,255,0.03);
  --card-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --text: #ffffff;
  --text-secondary: #a1a1a1;
  --text-muted: #666666;
  --primary: #10b981;
  --primary-light: #34d399;
  --primary-dark: #059669;
  --primary-glow: rgba(16, 185, 129, 0.15);
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --stripe: #635bff;
  --stripe-glow: rgba(99, 91, 255, 0.15);
  --error: #ef4444;
  --error-glow: rgba(239, 68, 68, 0.15);
  --success: #22c55e;
  --success-glow: rgba(34, 197, 94, 0.15);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
  --header-bg: rgba(15, 15, 15, 0.95);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --max-width: 900px;
  --transition: 0.2s ease;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --bg-2: #ffffff;
    --bg-3: #f5f5f5;
    --card: rgba(255,255,255,0.8);
    --card-hover: rgba(255,255,255,1);
    --border: rgba(0,0,0,0.08);
    --border-hover: rgba(0,0,0,0.15);
    --text: #111111;
    --text-secondary: #555555;
    --text-muted: #888888;
    --primary-glow: rgba(16, 185, 129, 0.1);
    --stripe-glow: rgba(99, 91, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
    --header-bg: rgba(255, 255, 255, 0.95);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hero Header */
.hero {
  position: relative;
  padding: 72px 24px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 50%;
  height: 150%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  z-index: 10;
}

.hero-logo {
  flex-shrink: 0;
  width: 130px;
  height: 130px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(16, 185, 129, 0.3);
}

.hero-logo-text {
  color: #ffffff;
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--accent-glow);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-light);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 550px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-light);
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-cta {
  margin-top: 24px;
}

.hero-cta .btn {
  animation: pulse-glow 2s ease-in-out infinite;
}

.hero-cta .btn:hover {
  animation: none;
}

/* Hide hero CTA on desktop (it's in the header) */
@media (min-width: 601px) {
  .hero-cta {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 80px 16px 40px;
  }

  .header-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding: 0 16px;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
  }

  .header-nav .btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  #auth-buttons {
    display: flex;
    gap: 8px;
  }

  .user-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  /* Hide the big register button on mobile header */
  .user-menu .header-register-btn {
    display: none;
  }

  .user-menu-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .user-menu-row .user-name {
    display: none;
  }

  .user-menu-row .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .user-menu-row .btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }

  /* Profile button adjustments for mobile */
  .profile-btn {
    padding: 4px;
    border: none;
    background: transparent;
  }

  .profile-btn .user-name {
    display: none;
  }

  .hero-inner {
    margin-top: 0;
  }

  .hero-logo {
    width: 90px;
    height: 90px;
  }

  .hero-logo-text {
    font-size: 1.75rem;
  }

  .hero-stats {
    gap: 20px;
  }

  .hero-stat-number {
    font-size: 1.5rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }
}

/* Main Content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

section {
  margin-bottom: 56px;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}

h2::before {
  content: '';
  width: 4px;
  height: 28px;
  background: var(--primary);
  border-radius: 2px;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 20px 0 12px;
  color: var(--text);
}

p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

ul, ol {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 10px;
}

li strong {
  color: var(--text);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}

.feature-card:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

/* App Section */
.app-section {
  background: var(--primary-glow);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
}

.app-section h2 {
  justify-content: center;
}

.app-section h2::before {
  display: none;
}

.app-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 28px 0;
  text-align: left;
}

.app-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.app-feature-icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.app-feature span {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.app-feature strong {
  color: var(--text);
}

.app-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  margin-top: 8px;
}

.app-cta:hover {
  background: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Payment Section */
.payment-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
}

.payment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.payment-header h2 {
  margin: 0;
}

.stripe-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--stripe-glow);
  border: 1px solid rgba(99, 91, 255, 0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
}

.stripe-badge svg {
  height: 18px;
  width: auto;
}

.payment-intro {
  font-size: 15px;
  margin-bottom: 24px;
}

.payment-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.payment-type {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-2);
  border-radius: var(--radius-md);
}

.payment-type-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-glow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.payment-type-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.payment-type-text strong {
  display: block;
  color: var(--text);
  margin-bottom: 2px;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: var(--stripe-glow);
  border-radius: var(--radius-md);
  margin-top: 8px;
}

.security-note svg {
  width: 20px;
  height: 20px;
  color: var(--stripe);
  flex-shrink: 0;
  margin-top: 2px;
}

.security-note p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Refund Policy */
.refund-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.refund-section h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

.refund-section ul {
  margin-bottom: 0;
}

/* Contact Section */
.contact-section {
  text-align: center;
}

.contact-section h2 {
  justify-content: center;
}

.contact-section h2::before {
  display: none;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 15px;
  transition: all var(--transition);
}

.contact-link:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
  text-decoration: none;
}

.contact-link svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.copyright {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================
   AUTH HEADER
   ========================================== */

.header-nav {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100;
}

.header-nav .btn {
  padding: 10px 20px;
  font-size: 14px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-initials {
  line-height: 1;
}

.user-menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-register-btn {
  animation: pulse-glow 2s ease-in-out infinite;
  box-shadow: 0 0 20px var(--primary-glow);
}

.header-register-btn:hover {
  animation: none;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 15px var(--primary-glow);
  }
  50% {
    box-shadow: 0 0 25px var(--primary), 0 0 40px var(--primary-glow);
  }
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--card-hover);
  border-color: var(--border-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-stripe {
  background: var(--stripe);
  color: #ffffff;
}

.btn-stripe:hover:not(:disabled) {
  background: #4f46e5;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* ==========================================
   FORMS
   ========================================== */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.form-label .required {
  color: var(--error);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  transition: all var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input.error {
  border-color: var(--error);
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px var(--error-glow);
}

.form-error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: var(--error);
}

.form-group.has-error .form-error {
  display: block;
}

.form-hint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 44px;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 500px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Phone Input with Country Code */
.phone-input-group {
  display: flex;
  gap: 8px;
}

.country-code-select {
  width: auto;
  min-width: 110px;
  flex-shrink: 0;
}

.phone-number-input {
  flex: 1;
}

/* ==========================================
   MODALS
   ========================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 24px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: all 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--card);
  color: var(--text);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  max-width: 400px;
  transform: translateX(120%);
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 14px;
  color: var(--text-secondary);
}

.toast-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.toast.success {
  border-color: var(--success);
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error {
  border-color: var(--error);
}

.toast.error .toast-icon {
  color: var(--error);
}

/* ==========================================
   LOADING SPINNER
   ========================================== */

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-content {
  text-align: center;
  color: var(--text);
}

.loading-content .spinner {
  width: 48px;
  height: 48px;
  border-width: 3px;
  margin: 0 auto 16px;
}

/* ==========================================
   REGISTRATION PAGE
   ========================================== */

.registration-page {
  min-height: 100vh;
  background: var(--bg);
}

.registration-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (max-width: 600px) {
  .registration-header {
    padding: 12px 16px;
  }

  .registration-header .header-nav {
    position: static;
    height: auto;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
  }

  .registration-header .user-menu .header-register-btn {
    display: none;
  }

  .registration-logo-text {
    display: none;
  }

  .registration-logo-icon {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }
}

.registration-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.registration-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.registration-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: white;
}

.registration-logo-text {
  font-weight: 700;
  font-size: 1.1rem;
}

.registration-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Steps */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}

.step.active .step-number {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step.completed .step-number {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step-label {
  font-size: 14px;
  color: var(--text-muted);
  display: none;
}

@media (min-width: 600px) {
  .step-label {
    display: block;
  }
}

.step.active .step-label {
  color: var(--text);
  font-weight: 500;
}

.step-divider {
  width: 40px;
  height: 2px;
  background: var(--border);
}

.step.completed + .step-divider {
  background: var(--primary);
}

/* Step Content */
.step-content {
  display: none;
}

.step-content.active {
  display: block;
}

.step-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.step-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Category Cards */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.category-info p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.category-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-light);
}

/* Category Sections (grouped like Android) */
.category-section {
  margin-bottom: 24px;
}

.category-section:last-child {
  margin-bottom: 0;
}

.category-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding-left: 4px;
}

.category-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
  background: var(--surface);
}

.category-card:last-child {
  margin-bottom: 0;
}

.category-card:hover:not(.disabled):not(.non-clickable) {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.category-card.non-clickable {
  cursor: default;
}

.category-card.clicked {
  transform: scale(0.98);
  border-color: var(--primary);
  background: var(--primary-glow);
}

.category-card.disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.category-card.available:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.15);
}

.category-card.actionable {
  cursor: pointer;
}

.category-card.actionable:hover {
  box-shadow: 0 4px 12px rgba(99, 91, 255, 0.2);
}

.category-card.fully-paid {
  background: var(--success-glow);
  border-color: var(--success);
}

.category-card.waiting-partner {
  background: var(--stripe-glow);
  border-color: var(--stripe);
}

.category-card.pending-payment {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.category-card.needs-payment {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.category-description {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 8px 0;
}

.category-status-row {
  margin-top: 8px;
}

.category-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
}

.category-status svg {
  flex-shrink: 0;
}

.category-status.paid {
  background: var(--success-glow);
  color: var(--success);
}

.category-status.pending {
  background: var(--accent-glow);
  color: var(--accent);
}

.category-status.waiting-partner {
  background: var(--stripe-glow);
  color: var(--stripe);
}

.category-status.needs-payment {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}

.category-partner {
  font-size: 12px;
  color: var(--text-muted);
  margin: 6px 0 0 0;
}

.category-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.category-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  transition: color 0.2s;
}

.category-card:hover:not(.disabled):not(.non-clickable) .category-cta {
  color: var(--primary-light);
}

.category-cta.disabled {
  color: var(--text-muted);
  font-weight: 400;
}

.category-card.needs-payment .category-cta {
  color: var(--accent);
}

.category-card.needs-payment:hover .category-cta {
  color: var(--accent);
  filter: brightness(1.2);
}

/* Partner Search */
.search-input-wrapper {
  position: relative;
}

.search-input-wrapper .form-input {
  padding-left: 44px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.search-results {
  margin-top: 16px;
  max-height: 300px;
  overflow-y: auto;
}

.search-results:not(:empty) {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result:hover {
  background: var(--card-hover);
}

.search-result.selected {
  background: var(--primary-glow);
}

.search-result-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}

.search-result-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-name {
  font-weight: 500;
  color: var(--text);
}

.search-result-email {
  font-size: 13px;
  color: var(--text-muted);
}

.selected-partner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--primary-glow);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.selected-partner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.remove-partner {
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.remove-partner:hover {
  color: var(--error);
}

/* Payment Options */
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}

.payment-option:hover {
  border-color: var(--border-hover);
}

.payment-option.selected {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.payment-option input {
  display: none;
}

.payment-option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-option.selected .payment-option-radio {
  border-color: var(--primary);
  background: var(--primary);
}

.payment-option.selected .payment-option-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.payment-option-label {
  font-weight: 500;
  color: var(--text);
}

/* Discount Code */
.discount-section {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.discount-row {
  display: flex;
  gap: 12px;
}

.discount-row .form-input {
  flex: 1;
}

.discount-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--success-glow);
  border: 1px solid var(--success);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

.discount-applied-text {
  color: var(--success);
  font-weight: 500;
}

.discount-remove {
  color: var(--text-muted);
  cursor: pointer;
}

/* Price Summary */
.price-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.price-row:last-child {
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}

.price-row.discount {
  color: var(--success);
}

/* Stripe Elements */
#stripe-payment-element {
  padding: 20px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

/* Registration Code */
.code-input-section {
  text-align: center;
  padding: 40px 20px;
}

.code-input-section .form-input {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  max-width: 300px;
  margin: 0 auto 20px;
}

/* Success State */
.success-state {
  text-align: center;
  padding: 60px 20px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.success-icon svg {
  width: 40px;
  height: 40px;
  color: var(--success);
}

.success-state h2 {
  justify-content: center;
}

.success-state h2::before {
  display: none;
}

/* Navigation Buttons */
.step-navigation {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.step-navigation .btn {
  flex: 1;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Auth divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

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

.auth-divider span {
  font-size: 14px;
  color: var(--text-muted);
}

/* Auth switch */
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-switch a {
  font-weight: 500;
}

/* Forgot password link */
.forgot-password-link {
  text-align: center;
  margin-top: 12px;
}

.forgot-password-link a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

.forgot-password-link a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Forgot password modal */
.forgot-password-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.forgot-password-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  margin-bottom: 20px;
}

.forgot-password-warning svg {
  flex-shrink: 0;
  color: #ef4444;
}

.forgot-password-warning strong {
  display: block;
  color: #ef4444;
  font-size: 14px;
  margin-bottom: 4px;
}

.forgot-password-warning p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.forgot-password-warning #forgot-password-countdown {
  font-family: monospace;
  font-weight: 600;
}

/* ==========================================
   PROFILE MODAL STYLES
   ========================================== */

.profile-modal {
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.profile-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.profile-loading p {
  color: var(--text-secondary);
  margin: 0;
}

/* Profile completeness indicator */
.profile-completeness {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.profile-completeness-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.profile-completeness-header span:last-child {
  font-weight: 600;
  color: var(--primary);
}

.profile-completeness-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.profile-completeness-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Profile sections */
.profile-section {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.profile-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.profile-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 20px 0;
}

/* Form hint */
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Profile button in header */
.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

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

/* ==========================================
   PROFILE PAGE STYLES
   ========================================== */

.profile-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.profile-header {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (max-width: 600px) {
  .profile-header {
    padding: 12px 16px;
  }

  .profile-header .header-nav {
    position: static;
    height: auto;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
  }

  .profile-header .user-menu .header-register-btn {
    display: none;
  }

  .profile-logo-text {
    display: none;
  }

  .profile-logo-icon {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }
}

.profile-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.profile-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
}

.profile-logo-text {
  font-weight: 600;
  font-size: 18px;
}

.profile-container {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}

.profile-loading-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
}

.profile-loading-page p {
  color: var(--text-secondary);
  margin: 0;
}

.profile-page-header {
  margin-bottom: 32px;
}

.profile-page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.profile-page-header p {
  color: var(--text-secondary);
  margin: 0;
}

.profile-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.profile-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.profile-card-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.profile-card-body {
  padding: 24px;
}

/* Profile Photo Section */
.profile-photo-section {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.profile-photo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-photo-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

.profile-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  background: var(--surface);
}

.profile-photo.hidden {
  display: none;
}

.profile-photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.profile-photo-placeholder.hidden {
  display: none;
}

.profile-photo-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo-loading.hidden {
  display: none;
}

.profile-photo-loading .spinner {
  width: 32px;
  height: 32px;
}

.profile-photo-edit-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.profile-photo-edit-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.profile-photo-status {
  font-size: 13px;
  color: var(--text-muted);
  min-height: 20px;
}

/* Profile completeness on page */
.profile-content .profile-completeness {
  max-width: 400px;
  margin-bottom: 32px;
}

/* Adjust profile button link style */
a.profile-btn {
  text-decoration: none;
  color: inherit;
}

/* ==========================================
   TOURNAMENTS PAGE
   ========================================== */

.tournaments-page {
  min-height: 100vh;
  background: var(--bg);
}

.tournaments-header {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.tournaments-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tournaments-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.tournaments-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
}

.tournaments-logo-text {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.tournaments-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.tournaments-page-header {
  text-align: center;
  margin-bottom: 40px;
}

.tournaments-page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.tournaments-page-header p {
  color: var(--text-secondary);
}

/* Loading State */
.tournaments-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.tournaments-loading p {
  color: var(--text-muted);
  margin-top: 16px;
}

/* Empty/Error States */
.tournaments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.tournaments-empty svg {
  margin-bottom: 24px;
  opacity: 0.5;
}

.tournaments-empty h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.tournaments-empty p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Tournaments List - Grid on desktop, list on mobile */
.tournaments-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Tournament Card - Vertical layout for grid */
.tournament-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tournament-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.tournament-card.clicked {
  transform: scale(0.97);
}

/* Tournament Card Image */
.tournament-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tournament-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tournament-card-image img[src*="apj_logo"] {
  object-fit: contain;
  padding: 20px;
  background: white;
}

.tournament-card:hover .tournament-card-image img {
  transform: scale(1.05);
}

/* Badges positioned on image */
.tournament-card-image .tournament-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

/* Tournament Badge - Base (for use outside cards) */
.tournament-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.tournament-badge.lightning {
  background: var(--accent);
  color: #000;
}

.tournament-card-image .tournament-status {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  text-align: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

/* Tournament Status Badges - Base */
.tournament-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.tournament-status.registration-open {
  background: rgba(16, 185, 129, 0.9);
  color: white;
}

.tournament-status.registration-closed {
  background: rgba(59, 130, 246, 0.85);
  color: white;
}

.tournament-status.finalized {
  background: rgba(239, 68, 68, 0.85);
  color: white;
}

/* Tournament Card Content */
.tournament-card-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tournament-card-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tournament-card-points {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.tournament-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.tournament-card-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.tournament-card-row svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

/* CTA Button */
.tournament-card-btn {
  margin-top: auto;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tournament-card-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.tournament-card:hover .tournament-card-btn {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

/* Tablet - 2 columns */
@media (max-width: 900px) {
  .tournaments-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Mobile - Single column list */
@media (max-width: 600px) {
  .tournaments-header {
    padding: 12px 16px;
  }

  .tournaments-header .header-nav {
    position: static;
    height: auto;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
  }

  .tournaments-header .user-menu .header-register-btn {
    display: none;
  }

  .tournaments-logo-text {
    display: none;
  }

  .tournaments-logo-icon {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }

  .tournaments-container {
    padding: 24px 16px 60px;
  }

  .tournaments-page-header h1 {
    font-size: 1.5rem;
  }

  .tournaments-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tournament-card {
    flex-direction: row;
    height: auto;
  }

  .tournament-card-image {
    width: 120px;
    min-width: 120px;
    aspect-ratio: auto;
    height: 160px;
  }

  .tournament-card-image .tournament-status {
    bottom: 8px;
    left: 8px;
    right: 8px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .tournament-card-image .tournament-badge {
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    font-size: 9px;
  }

  .tournament-card-content {
    padding: 12px;
  }

  .tournament-card-name {
    font-size: 0.95rem;
  }

  .tournament-card-row {
    font-size: 11px;
  }

  .tournament-card-btn {
    padding: 10px 12px;
    font-size: 12px;
  }
}

/* ===========================================
   Tournament Detail Page
   =========================================== */

/* Back link */
.detail-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.detail-back-link:hover {
  color: var(--text-primary);
}

/* Detail Header Card */
.detail-header-card {
  margin-bottom: 24px;
}

.detail-header-content {
  display: flex;
  gap: 20px;
  padding: 20px;
}

.detail-flyer {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.detail-flyer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-flyer img[src*="apj_logo"] {
  object-fit: contain;
  background: white;
  padding: 12px;
}

.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.detail-meta-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.detail-cta {
  margin-top: 8px;
}

.detail-description {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.detail-flyer-large {
  width: 100%;
  border-radius: 8px;
}

/* Detail Tabs */
.detail-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.detail-tab {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.detail-tab:hover {
  color: var(--text-primary);
}

.detail-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Tab Content */
.tab-content {
  animation: fadeIn 0.2s ease;
}

.tab-content.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Draw Cards - reuse profile-card style */
.draw-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.draw-card:hover {
  border-color: var(--primary);
}

.draw-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 122, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.draw-card-content {
  flex: 1;
  min-width: 0;
}

.draw-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.draw-card-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.draw-badge {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.draw-card-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
}

/* Mobile Responsive - Tournament Detail */
@media (max-width: 768px) {
  .detail-header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .detail-flyer {
    width: 140px;
    height: 140px;
  }

  .detail-info {
    align-items: center;
  }

  .detail-meta-item {
    justify-content: center;
  }

  .detail-tab {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
  }
}

/* ========================================
   Download Page Styles
   ======================================== */

.download-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.download-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.download-hero {
  text-align: center;
}

.download-app-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  background: var(--bg-2);
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--shadow-md);
}

.download-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.download-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.download-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.download-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.download-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.download-android-icon {
  width: 48px;
  height: 48px;
  color: #3DDC84;
}

.download-card-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.download-version {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1rem;
  padding: 16px 24px;
}

.download-size {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 12px;
}

.download-instructions {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.download-instructions h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.download-instructions ol {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.download-instructions li {
  counter-increment: steps;
  display: flex;
  gap: 16px;
}

.download-instructions li::before {
  content: counter(steps);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.download-instructions li strong {
  display: block;
  margin-bottom: 4px;
}

.download-instructions li p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.download-features {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.download-features h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-3);
  border-radius: var(--radius-md);
}

.feature-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.feature-item span {
  font-size: 0.875rem;
  font-weight: 500;
}

.download-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--primary-glow);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
}

.download-note svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.download-note p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .download-container {
    padding: 24px 16px 60px;
  }

  .download-hero h1 {
    font-size: 1.5rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .download-instructions li {
    flex-direction: column;
    gap: 8px;
  }

  .download-instructions li::before {
    align-self: flex-start;
  }
}
