/* Gym Rank - Design System */
:root {
  /* Cores principais */
  --primary: #12b886;
  --primary-dark: #0f9d6b;
  --primary-light: #20c997;
  --secondary: #6c757d;
  --accent: #ffd43b;
  
  /* Cores neutras */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Cores de status */
  --success: #12b886;
  --warning: #f59e0b;
  --error: #e03131;
  --info: #3b82f6;
  
  /* Tipografia */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Espaçamento */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Bordas */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.5;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--gray-900);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-sm {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-lg {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Flexbox */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* Espaçamento */
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }

.m-4 { margin: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* Componentes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  gap: var(--space-2);
}

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

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

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--gray-200);
  color: var(--gray-900);
}

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

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

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

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

/* Cards */
.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--gray-200);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--gray-200);
  background-color: var(--gray-50);
}

/* AppBar */
.app-bar {
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  color: var(--gray-600);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
}

/* FAB (Floating Action Button) */
.fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  transition: all 0.2s ease;
  z-index: 40;
}

.fab:hover {
  background-color: var(--primary-dark);
  transform: scale(1.05);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: 500;
  border-radius: var(--radius);
  gap: var(--space-1);
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-error {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background-color: #dbeafe;
  color: #1e40af;
}

/* Toasts */
.toast {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  background-color: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  max-width: 400px;
  z-index: 60;
  animation: slideIn 0.3s ease;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--error);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-info {
  border-left: 4px solid var(--info);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Formulários */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background-color: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right var(--space-3) center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: var(--space-10);
}

/* Estados de loading */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Estados vazios */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-4);
  color: var(--gray-500);
}

.empty-state-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
}

/* Responsividade */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-3);
  }
  
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    gap: var(--space-4);
  }
  
  .app-bar-content {
    flex-direction: column;
    gap: var(--space-4);
  }
  
  .fab {
    bottom: var(--space-4);
    right: var(--space-4);
  }
  
  .toast {
    top: var(--space-4);
    right: var(--space-4);
    left: var(--space-4);
    max-width: none;
  }
}

/* CSS original com padding lateral REMOVIDO */
@media (max-width: 768px) {
  .mobile-header, .mobile-search-container, .mobile-barbershop-info, .mobile-client-booking {
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
  }
}

/* REGRA DE SOBRESCRITA - Para sobrescrever CSS externo */
@media (max-width: 768px) {
  body .mobile-header, 
  body .mobile-search-container, 
  body .mobile-barbershop-info, 
  body .mobile-client-booking {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Especificidade máxima para mobile-client-booking */
  body div.mobile-client-booking#mobileClientBooking {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* REGRA FINAL - Forçar remoção de padding lateral */
@media (max-width: 768px) {
  * {
    --force-padding-left: 0 !important;
    --force-padding-right: 0 !important;
  }
  
  .mobile-client-booking,
  div.mobile-client-booking,
  #mobileClientBooking,
  [class*="mobile-client-booking"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding: 24px 0 !important;
  }
}

/* ===== ESTILOS PARA TELAS DE ONBOARDING ===== */

/* Reset para páginas de onboarding */
.welcome-page, .login-page, .choose-page, .create-challenge-page {
  margin: 0;
  padding: 0;
  background: #000000;
  color: white;
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== TELA DE BOAS-VINDAS ===== */
.welcome-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  text-align: center;
}

.welcome-logo {
  margin-bottom: 3rem;
}

.gymrat-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.rat-icon {
  width: 100%;
  height: 100%;
}

.welcome-text h1 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 4rem;
  line-height: 1.2;
}

.brand-name {
  font-weight: 700;
}

.btn-ready {
  background: #E74C3C;
  color: white;
  border: none;
  padding: 1rem 3rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 3rem;
}

.btn-ready:hover {
  background: #C0392B;
  transform: translateY(-2px);
}

.legal-links {
  font-size: 0.9rem;
  line-height: 1.4;
}

.legal-links p {
  margin-bottom: 0.5rem;
}

.legal-links-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.legal-link {
  color: #E74C3C;
  text-decoration: none;
}

.legal-link:hover {
  text-decoration: underline;
}

/* ===== TELA DE LOGIN ===== */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  text-align: center;
}

.login-logo {
  margin-bottom: 2rem;
}

.login-text h1 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 3rem;
  line-height: 1.2;
}

.login-options {
  width: 100%;
  max-width: 400px;
  margin-bottom: 3rem;
}

.login-options h2 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 2rem;
  text-align: left;
}

.login-btn {
  width: 100%;
  background: #2C2C2C;
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.login-btn:hover {
  background: #3C3C3C;
  transform: translateY(-2px);
}

.btn-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.google-icon, .email-icon {
  width: 100%;
  height: 100%;
}

.support-link {
  font-size: 0.9rem;
}

.support-text {
  color: #E74C3C;
  text-decoration: none;
}

.support-text:hover {
  text-decoration: underline;
}

/* ===== TELA DE ESCOLHA ===== */
.choose-page {
  background: #000000;
}

.app-header {
  padding: 1rem;
  display: flex;
  align-items: center;
}

.menu-icon {
  width: 24px;
  height: 24px;
}

.hamburger-icon {
  width: 100%;
  height: 100%;
}

.choose-container {
  padding: 2rem 1rem;
  min-height: calc(100vh - 80px);
}

.choose-header {
  text-align: center;
  margin-bottom: 3rem;
}

.choose-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.choose-header p {
  font-size: 1.1rem;
  color: #CCCCCC;
}

.choose-illustration {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  position: relative;
}

.meditation-character {
  position: relative;
  width: 200px;
  height: 200px;
}

.character-svg {
  width: 100%;
  height: 100%;
}

.heart-background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}

.heart-svg {
  width: 150px;
  height: 150px;
}

.floating-leaves {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.leaf {
  position: absolute;
  font-size: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

.leaf-1 { top: 20%; left: 10%; animation-delay: 0s; }
.leaf-2 { top: 30%; right: 15%; animation-delay: 0.5s; }
.leaf-3 { bottom: 30%; left: 20%; animation-delay: 1s; }
.leaf-4 { bottom: 20%; right: 10%; animation-delay: 1.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.choose-options {
  background: #1A1A1A;
  border-radius: 20px 20px 0 0;
  padding: 2rem 1.5rem;
  margin: 0 -1rem;
  min-height: 300px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.option-card:last-child {
  border-bottom: none;
}

.option-card:hover {
  background: #222;
  margin: 0 -1.5rem;
  padding: 1.5rem;
  border-radius: 12px;
}

.option-icon {
  width: 48px;
  height: 48px;
  background: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.option-svg {
  width: 24px;
  height: 24px;
}

.option-content {
  flex: 1;
  text-align: left;
}

.option-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.option-content p {
  font-size: 0.9rem;
  color: #CCCCCC;
  line-height: 1.4;
}

.option-arrow {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-svg {
  width: 100%;
  height: 100%;
}

/* ===== TELA DE CRIAÇÃO DE DESAFIO ===== */
.create-challenge-page {
  background: #000000;
}

.create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #1A1A1A;
  border-bottom: 1px solid #333;
}

.back-btn, .next-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.back-btn:hover, .next-btn:hover {
  background: #333;
}

.back-icon {
  width: 24px;
  height: 24px;
}

.create-header h1 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.next-btn {
  color: #E74C3C;
  font-weight: 600;
}

.create-container {
  padding: 2rem 1rem;
}

.banner-section {
  margin-bottom: 2rem;
}

.banner-placeholder {
  background: #1A1A1A;
  border-radius: 16px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px dashed #333;
}

.banner-placeholder p {
  color: #CCCCCC;
  font-size: 1.1rem;
}

.edit-banner-btn {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.edit-icon {
  width: 20px;
  height: 20px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.9rem;
  color: #CCCCCC;
  font-weight: 500;
}

.form-input, .form-textarea {
  background: #1A1A1A;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1rem;
  color: white;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: #E74C3C;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: #666;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.date-input-container {
  position: relative;
}

.date-input {
  padding-right: 3rem;
}

.calendar-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.duration-display {
  text-align: center;
  padding: 1rem;
  font-size: 1.1rem;
  color: #CCCCCC;
  background: #1A1A1A;
  border-radius: 12px;
  border: 1px solid #333;
}

/* Responsividade */
@media (max-width: 480px) {
  .welcome-text h1, .login-text h1 {
    font-size: 1.5rem;
  }
  
  .choose-header h1 {
    font-size: 2rem;
  }
  
  .gymrat-icon {
    width: 100px;
    height: 100px;
  }
  
  .meditation-character {
    width: 150px;
    height: 150px;
  }
  
  .heart-svg {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
  }
  
  .card-body {
    padding: var(--space-4);
  }
  
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }
}

/* Utilitários */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-primary { color: var(--primary); }

.bg-white { background-color: var(--white); }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-gray-100 { background-color: var(--gray-100); }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }

/* Animações */
.fade-in {
  animation: fadeIn 0.3s ease;
}

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

.slide-up {
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Estilos específicos para a nova interface de login */
.login-page {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.login-container {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-8);
  width: 100%;
  max-width: 450px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Opções principais */
.main-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.option-btn {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
}

.option-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.login-btn:hover {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.signup-btn:hover {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.btn-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--gray-100);
}

.login-icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.signup-icon {
  width: 24px;
  height: 24px;
  color: var(--success);
}

.btn-content h3 {
  margin: 0 0 var(--space-1) 0;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--gray-900);
}

.btn-content p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--gray-600);
}

/* Container de formulário */
.form-container {
  text-align: left;
}

.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--gray-200);
}

.form-header h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: var(--font-size-xl);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
  font-size: var(--font-size-sm);
  padding: var(--space-2);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.back-btn:hover {
  color: var(--gray-900);
  background: var(--gray-100);
}

.back-icon {
  width: 16px;
  height: 16px;
}

.login-logo {
  margin-bottom: var(--space-6);
}

.login-text h1 {
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.login-text p {
  color: var(--gray-600);
  margin-bottom: var(--space-6);
}

.login-form-container {
  text-align: left;
}

.login-form .form-group {
  margin-bottom: var(--space-4);
}

.password-input-container {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  padding: var(--space-1);
}

.password-toggle:hover {
  color: var(--gray-700);
}

.eye-icon {
  width: 20px;
  height: 20px;
}

.form-help {
  color: var(--gray-500);
  font-size: var(--font-size-sm);
  margin-top: var(--space-1);
}

.btn-login {
  width: 100%;
  margin-bottom: var(--space-4);
}

.login-options {
  text-align: center;
  margin-bottom: var(--space-4);
}

.btn-forgot {
  background: none;
  border: none;
  color: var(--gray-600);
  text-decoration: underline;
  cursor: pointer;
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}

.btn-forgot:hover {
  color: var(--gray-800);
}

.divider {
  position: relative;
  margin: var(--space-4) 0;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-300);
}

.divider span {
  background: var(--white);
  padding: 0 var(--space-2);
  color: var(--gray-500);
  font-size: var(--font-size-sm);
}

.btn-admin {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.admin-icon {
  width: 18px;
  height: 18px;
}

.signup-link {
  text-align: center;
  margin-top: var(--space-4);
}

.signup-text {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.signup-text:hover {
  text-decoration: underline;
}

/* Modal de cadastro */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-4);
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
  margin: 0;
  color: var(--gray-900);
  font-size: var(--font-size-xl);
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--font-size-2xl);
  color: var(--gray-500);
  cursor: pointer;
  padding: var(--space-1);
  line-height: 1;
}

.modal-close:hover {
  color: var(--gray-700);
}

.modal-body {
  padding: var(--space-6);
}

.modal-footer {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-6);
  border-top: 1px solid var(--gray-200);
  justify-content: flex-end;
}

.signup-form .form-group {
  margin-bottom: var(--space-4);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.radio-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  padding: var(--space-3);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all 0.2s;
  background: var(--white);
}

.radio-label:hover {
  border-color: var(--primary);
  background: var(--gray-50);
}

.radio-label input[type="radio"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.radio-label input[type="radio"]:checked + .radio-text {
  color: var(--primary);
  font-weight: 500;
}

.radio-text {
  font-size: var(--font-size-sm);
  color: var(--gray-700);
  line-height: 1.4;
}

/* Campo de código do grupo - controle de visibilidade */
#groupCodeField {
  transition: all 0.3s ease;
}

#groupCodeField[style*="display: none"] {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

/* Responsividade para login */
@media (max-width: 480px) {
  .login-container {
    padding: var(--space-6);
    margin: var(--space-2);
    max-width: calc(100vw - 1rem);
  }
  
  .login-text h1 {
    font-size: var(--font-size-2xl);
  }
  
  .option-btn {
    padding: var(--space-4);
    gap: var(--space-3);
  }
  
  .btn-icon {
    width: 40px;
    height: 40px;
  }
  
  .btn-content h3 {
    font-size: var(--font-size-base);
  }
  
  .form-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  
  .back-btn {
    align-self: flex-end;
  }
}

/* Melhorias de legibilidade */
.form-label {
  color: var(--gray-700) !important;
  font-weight: 500;
  margin-bottom: var(--space-2);
  display: block;
}

.form-input {
  color: var(--gray-900) !important;
  background-color: var(--white) !important;
  border: 2px solid var(--gray-300) !important;
}

.form-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.1) !important;
}

.form-input::placeholder {
  color: var(--gray-500) !important;
}

.form-help {
  color: var(--gray-600) !important;
  font-size: var(--font-size-sm);
  margin-top: var(--space-1);
  display: block;
}

/* Botões melhorados */
.btn-admin {
  background: var(--primary) !important;
  color: var(--white) !important;
  border: 2px solid var(--primary) !important;
}

.btn-admin:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.btn-forgot {
  color: var(--gray-600) !important;
  background: none !important;
  border: none !important;
  text-decoration: underline;
  font-size: var(--font-size-sm);
}

.btn-forgot:hover {
  color: var(--gray-800) !important;
}

/* Divider melhorado */
.divider {
  position: relative;
  margin: var(--space-6) 0;
  text-align: center;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-300);
}

.divider span {
  background: var(--white);
  padding: 0 var(--space-4);
  color: var(--gray-500);
  font-size: var(--font-size-sm);
  position: relative;
  z-index: 1;
}

/* Toast notifications */
.toast {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  padding: var(--space-4);
  max-width: 400px;
  z-index: 1000;
  animation: slideInRight 0.3s ease;
  border-left: 4px solid var(--primary);
}

.toast-error {
  border-left-color: #E74C3C;
  background: #FEF2F2;
  border: 1px solid #FECACA;
}

.toast-success {
  border-left-color: #10B981;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
}

.toast-warning {
  border-left-color: #F59E0B;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
}

.toast-info {
  border-left-color: #3B82F6;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsividade do Toast */
@media (max-width: 640px) {
  .toast {
    top: var(--space-2);
    right: var(--space-2);
    left: var(--space-2);
    max-width: none;
    width: auto;
  }
}

/* Validação de formulário */
.form-error {
  color: var(--error);
  font-size: var(--font-size-sm);
  margin-top: var(--space-1);
  display: block;
}

.form-input.error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(224, 49, 49, 0.1) !important;
}

.form-input.success {
  border-color: var(--success) !important;
  box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.1) !important;
}

/* Loading states */
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== DESIGN BASEADO NA IMAGEM 2 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #0d1b2a;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

.login-page {
  background: #0d1b2a;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  width: 100vw;
}

.login-container {
  width: 100vw;
  height: 100vh;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.login-modal {
  background: #1a2332;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  min-height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  border-bottom: 1px solid #2d3748;
}

.brand-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--white);
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: var(--font-size-2xl);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.close-btn:hover {
  color: var(--white);
  background: var(--gray-700);
}

.tab-navigation {
  display: flex;
  border-bottom: 1px solid #2d3748;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: var(--space-4);
  color: var(--gray-400);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.tab-btn.active {
  color: #10b981;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #10b981;
}

.tab-content {
  padding: var(--space-6);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.form-group label {
  color: var(--white);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.form-input {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: var(--space-4);
  color: var(--gray-900);
  font-size: var(--font-size-base);
  transition: all 0.2s ease;
  min-height: 48px;
}

.form-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder {
  color: var(--gray-500);
}

.btn-primary {
  background: #10b981;
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: var(--space-4);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: var(--space-6);
  margin-bottom: var(--space-8);
}

.btn-primary:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.social-login {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid #2d3748;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-900);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.social-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.google-btn {
  background: #4285F4;
  color: var(--white);
  border-color: #4285F4;
}

.google-btn:hover {
  background: #3367d6;
  border-color: #3367d6;
}

.apple-btn {
  background: var(--white);
  color: var(--gray-900);
  border-color: #e2e8f0;
}

.apple-btn:hover {
  background: var(--gray-100);
}

.radio-group {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.radio-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  color: var(--white);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  padding: var(--space-2);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.radio-label:hover {
  background: rgba(255, 255, 255, 0.05);
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #4a5568;
  border-radius: 50%;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.radio-label input[type="radio"]:checked + .radio-custom {
  border-color: #10b981;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
}

/* Responsividade para mobile */
@media (max-width: 640px) {
  .login-container {
    max-width: 100%;
    margin: 0;
  }
  
  .login-modal {
    border-radius: 0;
    min-height: 100vh;
    width: 100%;
  }
  
  .modal-header {
    padding: var(--space-4);
  }
  
  .tab-content {
    padding: var(--space-4);
  }
  
  .radio-group {
    flex-direction: column;
    gap: var(--space-3);
  }
  
  .radio-label {
    padding: var(--space-3);
    border: 1px solid #4a5568;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
  }
  
  .radio-label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #6b7280;
  }
}

/* ===== DASHBOARD PAGE ===== */
.dashboard-page {
  background: #0d1b2a;
  min-height: 100vh;
  color: var(--white);
}

.dashboard-header {
  background: #1a2332;
  border-bottom: 1px solid #2d3748;
  padding: var(--space-4) 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo h1 {
  color: var(--white);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.user-name {
  font-weight: var(--font-weight-semibold);
  color: var(--white);
}

.user-role {
  background: #10b981;
  color: var(--white);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.logout-btn {
  background: #E74C3C;
  color: var(--white);
  border: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: var(--font-weight-medium);
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: #c0392b;
}

.dashboard-main {
  padding: var(--space-8) 0;
}

.welcome-section {
  text-align: center;
  margin-bottom: var(--space-8);
}

.welcome-section h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--white);
  margin-bottom: var(--space-2);
}

.welcome-section p {
  color: var(--gray-400);
  font-size: var(--font-size-lg);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.dashboard-card {
  background: #1a2332;
  border: 1px solid #2d3748;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  transition: all 0.2s ease;
}

.dashboard-card:hover {
  border-color: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.1);
}

.card-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
}

.dashboard-card h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--white);
  margin-bottom: var(--space-2);
}

.dashboard-card p {
  color: var(--gray-400);
  margin-bottom: var(--space-4);
}

.card-btn {
  background: #10b981;
  color: var(--white);
  border: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: var(--font-weight-semibold);
  transition: all 0.2s ease;
  width: 100%;
}

.card-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

.admin-only {
  border-color: #F59E0B;
}

.admin-only:hover {
  border-color: #F59E0B;
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.1);
}

/* Responsividade do Dashboard */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: var(--space-4);
  }
  
  .user-info {
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .dashboard-card {
    padding: var(--space-4);
  }
}

/* ===== APP STYLES ===== */

/* App Page */
.app-page {
  background: #0d1b2a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family);
}

/* App Header */
.app-header {
  background: transparent;
  padding: var(--space-4) var(--space-6);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  padding: 0 60px;
}

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: all 0.3s ease;
  position: absolute;
  left: 16px;
  z-index: 10;
}

.menu-btn:hover {
  color: #3B82F6;
}

.page-title {
  color: var(--white);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0;
  text-align: center;
}

/* App Main */
.app-main {
  flex: 1;
  padding: var(--space-8) var(--space-6);
  padding-bottom: 100px; /* Espaço para navegação inferior */
}

.tab-content {
  display: none;
}

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

/* Ranking Container */
.ranking-container {
  max-width: 600px;
  margin: 0 auto;
  background: transparent;
}

.ranking-podium {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5rem;
  margin-bottom: 2rem;
  padding: 2rem 0;
}

.podium-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.podium-place.first {
  order: 2;
}

.podium-place.second {
  order: 1;
}

.podium-place.third {
  order: 3;
}

.athlete-avatar {
  position: relative;
  margin-bottom: 1rem;
}

.athlete-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid transparent;
  transition: all 0.3s ease;
}

.athlete-avatar .avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #4a5568;
  border: 4px solid #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}

.athlete-avatar .avatar-placeholder::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: rotate(-45deg);
}

.podium-place.first .athlete-avatar img,
.podium-place.first .avatar-placeholder {
  border-color: #FFD700;
  transform: scale(1.4);
  background: #4a5568;
  width: 120px;
  height: 120px;
}

.podium-place.second .athlete-avatar img,
.podium-place.second .avatar-placeholder {
  border-color: #9CA3AF;
  background: #4a5568;
}

.podium-place.third .athlete-avatar img,
.podium-place.third .avatar-placeholder {
  border-color: #F97316;
  background: #4a5568;
}

.rank-badge {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4a5568;
  border: 2px solid #6b7280;
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rank-badge.gold {
  background: #FFD700;
  border-color: #FFA500;
  color: #000;
}

.rank-badge.silver {
  background: #9CA3AF;
  border-color: #6B7280;
  color: #000;
}

.rank-badge.bronze {
  background: #F97316;
  border-color: #EA580C;
  color: #fff;
}

.athlete-info h3 {
  color: var(--white);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-1) 0;
}

.athlete-info p {
  color: #a0aec0;
  font-size: var(--font-size-sm);
  margin: 0;
}

/* Join Group Section */
.join-group-section {
  text-align: center;
  padding: var(--space-6);
  background: #1a2332;
  border-radius: var(--radius-lg);
  border: 1px solid #2d3748;
}

.join-group-section h2 {
  color: var(--white);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-3) 0;
}

.join-group-section p {
  color: #a0aec0;
  font-size: var(--font-size-base);
  margin: 0 0 var(--space-6) 0;
  line-height: 1.5;
}

.join-group-btn {
  background: #3B82F6;
  color: var(--white);
  border: none;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 300px;
}

.join-group-btn:hover {
  background: #2563EB;
  transform: translateY(-2px);
}

/* Recent Workouts */
.recent-workouts {
  margin-top: var(--space-8);
}

.recent-workouts h2 {
  color: var(--white);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-4) 0;
}

.workout-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.workout-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: #1a2332;
  border-radius: var(--radius);
  border: 1px solid #2d3748;
}

.workout-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.workout-info {
  flex: 1;
}

.workout-info h4 {
  color: var(--white);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-1) 0;
}

.workout-info p {
  color: #a0aec0;
  font-size: var(--font-size-sm);
  margin: 0 0 var(--space-1) 0;
}

.workout-time {
  color: #718096;
  font-size: var(--font-size-xs);
}

.view-workout-btn {
  background: #3B82F6;
  color: var(--white);
  border: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-workout-btn:hover {
  background: #2563EB;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a2332;
  border-top: 1px solid #2d3748;
  display: flex;
  padding: var(--space-2) 0;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #a0aec0;
}

.nav-item.active {
  color: #3B82F6;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.nav-icon svg {
  width: 24px;
  height: 24px;
}

.nav-item span {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

/* Tab Placeholder */
.tab-placeholder {
  text-align: center;
  padding: var(--space-8);
  color: #a0aec0;
}

.tab-placeholder h2 {
  color: var(--white);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-3) 0;
}

/* Admin Profile Styles */
.admin-header {
  margin-bottom: 2rem;
}

.admin-header h2 {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.admin-section {
  margin-bottom: 2rem;
}

.section-header {
  margin-bottom: 1rem;
}

.section-header h3 {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.groups-list, .workouts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.group-item, .workout-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  padding: 0.75rem;
  transition: all 0.3s ease;
}

.group-item:hover, .workout-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.group-info, .workout-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.group-icon, .workout-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background: rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3B82F6;
  font-size: 1.5rem;
}

.workout-avatar {
  border-radius: 50%;
  background: #4a5568;
  overflow: hidden;
}

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

.group-details, .workout-details {
  flex: 1;
}

.group-details h4, .workout-details h4 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

.group-details p, .workout-details p {
  color: #a0aec0;
  font-size: 0.875rem;
  margin: 0;
}

.group-actions, .workout-actions {
  display: flex;
  gap: 0.5rem;
}

.edit-btn, .approve-btn, .reject-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.edit-btn {
  background: rgba(156, 163, 175, 0.2);
  color: #9CA3AF;
}

.edit-btn:hover {
  background: rgba(156, 163, 175, 0.3);
  color: #3B82F6;
}

.approve-btn {
  background: rgba(34, 197, 94, 0.2);
  color: #22C55E;
}

.approve-btn:hover {
  background: rgba(34, 197, 94, 0.3);
}

.reject-btn {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
}

.reject-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

.create-group-btn-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.create-group-btn {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  background: #3B82F6 !important;
  color: white !important;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

.create-group-btn:hover {
  background: #2563EB;
}

.create-group-btn:active {
  background: #1D4ED8;
  transform: translateY(1px);
}

.btn-icon {
  font-size: 1rem;
}

/* User Profile Styles */
.user-profile {
  padding: 1rem 0;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
}

.profile-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  overflow: hidden;
  background: #4a5568;
}

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

.profile-info h3 {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

.profile-info p {
  color: #a0aec0;
  font-size: 0.875rem;
  margin: 0 0 0.25rem 0;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  border: none;
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.profile-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.logout-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Icon styles for SVG elements */
.group-icon svg,
.edit-btn svg,
.approve-btn svg,
.reject-btn svg,
.btn-icon svg,
.copy-code-btn svg {
  width: 100%;
  height: 100%;
}

/* Create Group Modal */
.create-group-modal {
  max-width: 500px;
  width: 90%;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: var(--white);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3B82F6;
  background: rgba(255, 255, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.code-display {
  display: flex;
  gap: 0.5rem;
}

.code-display input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  font-family: monospace;
  font-weight: 600;
  text-align: center;
}

.copy-code-btn {
  background: #3B82F6;
  color: var(--white);
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-code-btn:hover {
  background: #2563EB;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.cancel-btn, .create-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.create-btn {
  background: #3B82F6;
  color: var(--white);
}

.create-btn:hover {
  background: #2563EB;
}

/* Responsive adjustments for mobile */
@media (max-width: 640px) {
  .podium-place.first .athlete-avatar img, 
  .podium-place.first .avatar-placeholder {
    width: 90px;
    height: 90px;
    margin: 0px 32px;
  }
  
  .athlete-avatar img, 
  .athlete-avatar .avatar-placeholder {
    width: 70px;
    height: 70px;
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal.show {
  display: flex !important;
}

/* Ensure modal is always visible when shown */
#createGroupModal[style*="display: flex"] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 9999 !important;
}

/* Force admin profile visibility */
#adminProfileContent {
  display: block !important;
}

/* Force create group button visibility */
.create-group-btn {
  display: flex !important;
  background: #3B82F6 !important;
  color: white !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Toast animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.modal-content {
  background: #1a2332;
  border-radius: var(--radius-lg);
  border: 1px solid #2d3748;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  border-bottom: 1px solid #2d3748;
}

.modal-header h2 {
  color: var(--white);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: #a0aec0;
  font-size: var(--font-size-xl);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: #2d3748;
  color: var(--white);
}

.modal-body {
  padding: var(--space-6);
}

.modal-body p {
  color: #a0aec0;
  margin: 0 0 var(--space-4) 0;
}

.group-code-input {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid #2d3748;
  border-radius: var(--radius);
  background: #0d1b2a;
  color: var(--white);
  font-size: var(--font-size-base);
  margin-bottom: var(--space-4);
}

.group-code-input:focus {
  outline: none;
  border-color: #3B82F6;
}

.join-btn {
  width: 100%;
  background: #3B82F6;
  color: var(--white);
  border: none;
  padding: var(--space-4);
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: all 0.3s ease;
}

.join-btn:hover {
  background: #2563EB;
}

/* Responsive */
@media (max-width: 640px) {
  .app-main {
    padding: var(--space-4);
    padding-bottom: 100px;
  }
  
  .ranking-podium {
    gap: var(--space-2);
  }
  
  .athlete-avatar img,
  .athlete-avatar .avatar-placeholder {
    width: 60px;
    height: 60px;
  }
  
  
  .join-group-section {
    padding: var(--space-4);
  }
  
  .workout-item {
    padding: var(--space-3);
  }
}
