/* ==========================================================================
   Modern Professional Design System
   Theme: E-Sport Tournament (Deep Blue, Slate, & Orange Accent)
   Fonts: Outfit (Headings), Inter (Body)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  /* Colors */
  --primary: #3b82f6;
  /* Royal Blue */
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  /* Slate */
  --accent: #f97316;
  /* Orange */

  --bg-dark: #0f172a;
  /* Deep Slate Background */
  --bg-card: rgba(255, 255, 255, 0.95);
  /* Glass-like White */

  --text-main: #1e293b;
  /* Dark text for inside cards */
  --text-muted: #64748b;
  --text-light: #f8fafc;
  /* Light text for dark backgrounds */

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Spacing & Layout */
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
}

/* ============================================ */
/* RESET & BASE */
/* ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(to bottom, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95)),
    url('/images/free-fire-header.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-light);
  /* GLOBAL TEXT: LIGHT */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  color: inherit;
  /* Inherit color from context */
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

ul {
  list-style: none;
}

/* ============================================ */
/* COMPONENT: BUTTONS */
/* ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 8px 15px rgba(37, 99, 235, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--primary-dark);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* ============================================ */
/* LAYOUT: CONTAINER & CARDS */
/* ============================================ */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  color: var(--text-main);
  /* Force dark text in cards */
}

/* Decorative top border for cards */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.8;
}

/* Info Cards (Homepage) */
.info-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  color: var(--text-main);
  /* Force dark text in info cards */
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.info-card h3 {
  color: #2563eb;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.info-card p {
  color: #64748b;
  line-height: 1.6;
}


/* ============================================ */
/* FORMS */
/* ============================================ */
.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

label.required::after {
  content: " *";
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.form-control:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.form-control:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 10px 15px -3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* ============================================ */
/* TYPOGRAPHY UTILITIES */
/* ============================================ */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  /* Explicitly white for dark backgrounds */
  margin: 30px 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f5f9;
}

.section-title span.icon {
  font-size: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.text-center {
  text-align: center;
}

/* ============================================ */
/* ALERTS & STATUS */
/* ============================================ */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  border-left: 4px solid transparent;
  font-size: 0.95rem;
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border-color: var(--primary);
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: var(--danger);
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: var(--success);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-approved {
  background: #dcfce7;
  color: #166534;
}

.badge-pending {
  background: #fef9c3;
  color: #854d0e;
}

.badge-rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* ============================================ */
/* DASHBOARD SPECIFIC */
/* ============================================ */
.dashboard-header {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.dashboard-header h1 {
  color: white;
  margin: 0;
  font-size: 1.8rem;
}

.dashboard-header p {
  color: #94a3b8;
  margin: 5px 0 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.info-item {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.info-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 5px;
}

/* Player Cards */
.player-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  transition: transform 0.2s;
}

.player-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.player-card h3 {
  font-size: 1.1rem;
  color: var(--primary);
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

/* ============================================ */
/* MODALS */
/* ============================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  padding: 20px;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 600px;
  border-radius: var(--radius-md);
  padding: 30px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
  color: var(--text-main);
  /* Force dark text in modals */
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================ */
/* FOOTER */
/* ============================================ */
.footer {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer p {
  margin-bottom: 8px;
}

/* ============================================ */
/* MOBILE RESPONSIVE OPTIMIZATIONS */
/* ============================================ */
@media (max-width: 768px) {
  :root {
    --container-width: 100%;
  }

  .container {
    padding: 15px;
  }

  .card {
    padding: 25px 20px;
    border-radius: var(--radius-md);
  }

  /* Typography Scaling */
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  /* Stack Grids */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Dashboard Header */
  .dashboard-header {
    flex-direction: column;
    text-align: center;
    padding: 25px;
    gap: 20px;
  }

  .dashboard-header .btn {
    width: 100%;
  }

  /* Buttons - Larger Touch Targets */
  .btn {
    width: 100%;
    padding: 14px 20px;
    /* Larger tap area */
    font-size: 1rem;
  }

  /* Forms */
  .form-control {
    font-size: 16px;
    /* Prevents iOS zoom */
    padding: 14px;
    margin-bottom: 5px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  /* Modal Mobile */
  .modal {
    padding: 10px;
    align-items: flex-end;
  }

  .modal-content {
    max-height: 85vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 25px;
  }
}