/* Reset y Variables - RedCampeonatos Theme */
:root {
  --primary: #ff4500;
  --primary-dark: #cc3700;
  --primary-light: #ff6633;
  --secondary: #1a1a2e;
  --accent: #ff6b35;
  --bg-dark: #0a0d1f;
  --bg-card: #0f1729;
  --bg-hover: #1a2339;
  --text-primary: #ffffff;
  --text-secondary: #b8b8c8;
  --text-muted: #6b6b7b;
  --border: #1e2a47;
  --success: #10b981;
  --danger: #ef4444;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --gradient-primary: linear-gradient(135deg, #ff4500 0%, #ff6b35 100%);
  --gradient-bg: linear-gradient(180deg, #000000 0%, #0a1128 50%, #000814 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(10, 50, 120, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(15, 35, 80, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 69, 0, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeIn 0.5s ease-in;
  position: relative;
  z-index: 1;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header - Estilo RedCampeonatos */
.header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 32px;
  background: var(--gradient-primary);
  border-radius: 20px;
  margin-bottom: 32px;
  box-shadow: 0 10px 40px rgba(255, 69, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.header::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.logo {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  color: white;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 1;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  color: white;
  z-index: 1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
}

.sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  z-index: 1;
  letter-spacing: 0.5px;
}

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.search {
  flex: 1;
  min-width: 250px;
}

.search input {
  width: 100%;
  padding: 14px 20px;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 69, 0, 0.1);
  background: var(--bg-card);
}

.search input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Buttons - Estilo RedCampeonatos */
.btn {
  padding: 14px 28px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 69, 0, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 69, 0, 0.4);
}

.btn:active {
  transform: translateY(-1px);
}

.btn.secondary {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}

.btn.secondary:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
}

/* Admin Navigation */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.admin-nav .btn {
  flex: 1;
  min-width: 140px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

/* Cards - Estilo RedCampeonatos */
.card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(255, 69, 0, 0.2);
  border-color: var(--primary);
}

.card:hover::before {
  opacity: 1;
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, #000814 0%, #0f1729 100%);
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.1);
}

.card > div {
  padding: 24px;
  flex: 1;
}

.card h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

/* Forms */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.form-row label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input, textarea, select {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  font-weight: 500;
}

.input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 69, 0, 0.1);
  background: var(--bg-card);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

select {
  cursor: pointer;
}

/* Tables */
.table {
  width: 100%;
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.table thead {
  background: var(--gradient-primary);
}

.table th {
  padding: 18px;
  text-align: left;
  font-weight: 800;
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.table td {
  padding: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

.table tr:hover {
  background: var(--bg-hover);
}

.table img {
  border: 2px solid var(--primary);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

h3 {
  font-size: 28px;
  margin-top: 32px;
  margin-bottom: 24px;
  position: relative;
  padding-left: 20px;
}

h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 80%;
  background: var(--gradient-primary);
  border-radius: 3px;
}

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 10px 0;
  font-size: 15px;
}

.back-link:hover {
  color: var(--primary);
  transform: translateX(-6px);
}

/* Team Header */
.team-header {
  text-align: center;
  padding: 50px 30px;
  background: var(--bg-card);
  border-radius: 20px;
  margin-bottom: 40px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.team-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient-primary);
}

.team-header img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--primary);
  box-shadow: 0 10px 30px rgba(255, 69, 0, 0.4);
  margin-bottom: 24px;
}

.team-header h1 {
  font-size: 42px;
  margin-bottom: 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
}

.team-header h3 {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 20px;
}

.team-header h3::before {
  display: none;
}

/* Error Messages */
div[style*="color:#ffb4b4"],
div[style*="color: #ffb4b4"] {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 2px solid var(--danger) !important;
  border-radius: 12px !important;
  padding: 16px 20px !important;
  color: #ff6b6b !important;
  font-weight: 600 !important;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }
  
  .header {
    padding: 24px 20px;
    border-radius: 16px;
  }
  
  .title {
    font-size: 24px;
  }
  
  .logo {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .controls {
    flex-direction: column;
    padding: 16px;
  }
  
  .admin-nav {
    flex-direction: column;
  }
  
  .admin-nav .btn {
    width: 100%;
  }
  
  .table {
    font-size: 13px;
  }
  
  .table th, .table td {
    padding: 12px 10px;
  }
  
  h3 {
    font-size: 22px;
  }
  
  .team-header {
    padding: 30px 20px;
  }
  
  .team-header h1 {
    font-size: 32px;
  }
  
  .team-header img {
    width: 140px;
    height: 140px;
  }
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

/* Loading Animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 69, 0, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}