/* Count Me In - Modern Football Theme */

html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 80px; /* Increased for bottom nav */
  background-color: #FAFAFA;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Modern Green Color Palette */
:root {
  --primary-green: #146B3A;
  --secondary-green: #1A8449;
  --accent-gold: #F0B429;
  --light-green: #E8F5E9;
  --dark-green: #0A3D22;
  --bg-color: #FAFAFA;
  --white: #ffffff;
  --text-dark: #212529;
  --text-muted: #6c757d;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --transition-speed: 250ms;
}

/* Navbar Customization */
.navbar-brand {
  font-size: 1.5rem;
}

/* Button Focus States */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-green);
}

/* Player Card Styles */
.player-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
}

.player-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-green);
}

/* Invitation Card Styles (Greyed Out) */
.player-card.invitation-card {
  background: #f8f9fa;
  opacity: 0.85;
  border: 2px solid #dee2e6;
  cursor: default;
}

.player-card.invitation-card:hover {
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-color: #dee2e6;
}

.player-card.invitation-card .player-name,
.player-card.invitation-card .player-email {
  color: #6c757d;
}

.player-card.invitation-card .player-photo {
  background-color: #e9ecef !important;
  border-color: #adb5bd;
}

.player-card .player-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-green);
  margin-bottom: 0;
}

.player-card .player-actions {
  display: flex;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
}

.player-card .player-actions .btn {
  flex: 1;
}

.player-card .player-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.player-card .player-email {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .player-card {
    padding: 1rem;
  }
  
  .player-card .player-photo {
    width: 60px;
    height: 60px;
  }
}

/* Success/Green buttons */
.btn-success {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
}

.btn-success:hover {
  background-color: var(--dark-green);
  border-color: var(--dark-green);
}

/* Cards */
.card {
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.card-header {
  background-color: var(--primary-green);
  color: white;
  border-radius: 8px 8px 0 0 !important;
}

/* Footer */
.footer {
  background-color: var(--light-green);
  border-top: 2px solid var(--primary-green);
}

/* Loading States */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3em;
}

/* Form Validation */
.field-validation-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.input-validation-error {
  border-color: #dc3545;
}

/* Responsive Tables */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.875rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

  .table th,
  .table td {
    padding: 0.5rem;
    white-space: nowrap;
  }
}

/* Alert Improvements */
.alert {
  border-radius: 8px;
  border: none;
}

.alert-dismissible .btn-close {
  padding: 0.75rem 1rem;
}

/* Modal Improvements */
.modal-content {
  border-radius: 8px;
  border: none;
}

.modal-header {
  background-color: var(--primary-green);
  color: white;
  border-radius: 8px 8px 0 0;
}

.modal-header .btn-close {
  filter: invert(1);
}

/* Button Improvements */
.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Card Improvements */
.card {
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Badge Improvements */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
}

/* Form Improvements */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Pagination */
.pagination .page-link {
  color: var(--primary-green);
  border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
}

.pagination .page-link:hover {
  color: var(--dark-green);
  background-color: var(--light-green);
  border-color: #dee2e6;
}

/* ============================
   MODERN UI REDESIGN STYLES
   ============================ */

/* Minimal Header */
.minimal-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.minimal-header .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.minimal-header .logo:hover {
  color: var(--secondary-green);
}

/* Header Navigation (Desktop Only) */
.header-nav {
  margin-left: 2rem;
}

.header-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all var(--transition-speed);
}

.header-nav-link:hover {
  color: var(--primary-green);
  background-color: var(--light-green);
}

.header-nav-link.active {
  color: var(--primary-green);
  background-color: var(--light-green);
}

@media (max-width: 767px) {
  body {
    margin-bottom: 70px; /* Space for bottom nav */
  }
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
}

@media (max-width: 767px) {
  .bottom-nav {
    display: block;
  }
}

.bottom-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
  max-width: 100%;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all var(--transition-speed);
  min-width: 60px;
  flex: 1;
  max-width: 80px;
}

.bottom-nav-item:hover {
  background-color: var(--light-green);
  color: var(--primary-green);
}

.bottom-nav-item.active {
  color: var(--primary-green);
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
  margin-bottom: 0.25rem;
}

.bottom-nav-item span {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Hero Section (Landing Page) */
.hero-section {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-hero {
  background-color: var(--accent-gold);
  color: var(--dark-green);
  border: none;
  padding: 0.875rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all var(--transition-speed);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-hero:hover {
  background-color: #FFB800;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: var(--dark-green);
}

@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
}

/* Features Section */
.features-section {
  padding: 4rem 0;
  background-color: var(--white);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 3rem;
}

.feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background-color: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-speed);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-green);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background-color: var(--light-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--primary-green);
}

.feature-icon svg {
  width: 32px;
  height: 32px;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.feature-description {
  color: var(--text-muted);
  line-height: 1.6;
}

/* How It Works Section */
.how-it-works {
  padding: 4rem 0;
  background-color: var(--light-green);
}

.step-card {
  text-align: center;
  padding: 2rem 1rem;
}

.step-number {
  width: 48px;
  height: 48px;
  background-color: var(--primary-green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.step-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.step-description {
  color: var(--text-muted);
}

/* CTA Section */
.cta-section {
  padding: 4rem 0;
  background-color: var(--white);
  text-align: center;
}

.cta-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Dashboard Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.dashboard-card {
  background-color: var(--white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-speed);
  text-decoration: none;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
  transform: scaleX(0);
  transition: transform var(--transition-speed);
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--text-dark);
}

.dashboard-card:hover::before {
  transform: scaleX(1);
}

.dashboard-card-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(20, 107, 58, 0.3);
}

.dashboard-card-icon svg {
  width: 32px;
  height: 32px;
}

.dashboard-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.dashboard-card-description {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  flex-grow: 1;
}

.dashboard-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--accent-gold);
  color: var(--dark-green);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Welcome Section */
.welcome-section {
  background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
  color: var(--white);
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.welcome-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.welcome-subtitle {
  font-size: 1rem;
  opacity: 0.9;
}

/* Info Card */
.info-card {
  background-color: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-top: 1rem;
}

.info-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.info-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green);
}

/* Updated Button Styles */
.btn-success {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  font-weight: 600;
}

.btn-success:hover {
  background-color: var(--secondary-green);
  border-color: var(--secondary-green);
}

.btn-outline-success {
  color: var(--primary-green);
  border-color: var(--primary-green);
  font-weight: 600;
}

.btn-outline-success:hover {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: var(--white);
}

/* Form Focus States */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 0.2rem rgba(20, 107, 58, 0.25);
}

/* Updated Card Styles */
.card-header {
  background-color: var(--primary-green);
  color: var(--white);
  border-radius: 8px 8px 0 0 !important;
  font-weight: 600;
}

/* Progress Indicator (for lifecycle) */
.progress-mini {
  height: 4px;
  background-color: var(--light-green);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-mini-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
  transition: width var(--transition-speed);
}

/* Touch Improvements for Mobile */
@media (max-width: 767px) {
  .btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
  }
  
  .dashboard-card {
    padding: 1.5rem;
  }
  
  .dashboard-card-icon {
    width: 56px;
    height: 56px;
  }
  
  .dashboard-card-icon svg {
    width: 28px;
    height: 28px;
  }
}

/* Footer */
.app-footer {
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 767px) {
  .app-footer {
    margin-bottom: 70px; /* Space for bottom nav */
  }
}