/* Rinder - Tinder-style UI for Rugby Teams */

:root {
  --color-primary: #FF6B6B;     /* Swipe energy red */
  --color-secondary: #4ECDC4;   /* Rugby pitch teal */
  --color-accent: #FFE66D;      /* Trophy gold */
  --color-bg: #F7F7F7;
  --color-card: #FFFFFF;
  --color-text: #2D2D2D;
  --color-text-light: #757575;
  --color-success: #51CF66;
  --color-danger: #FF6B6B;
  --shadow: 0 10px 40px rgba(0,0,0,0.1);
  --shadow-hover: 0 15px 50px rgba(0,0,0,0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--color-bg) 0%, #E8E8E8 100%);
  color: var(--color-text);
  min-height: 100vh;
}

#root {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* Header */
.header {
  text-align: center;
  padding: 20px 0;
  margin-bottom: 30px;
}

.header h1 {
  font-size: 2.5rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 10px;
}

.header .tagline {
  color: var(--color-text-light);
  font-size: 1rem;
}

/* Card Stack Container */
.card-stack {
  position: relative;
  width: 100%;
  height: 600px;
  perspective: 1000px;
}

/* Team Card */
.team-card {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--color-card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: grab;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
}

.team-card:active {
  cursor: grabbing;
}

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

/* Card being dragged */
.team-card.dragging {
  transition: none;
  z-index: 100;
}

/* Card swiped left (dislike) */
.team-card.swipe-left {
  transform: translateX(-150%) rotate(-30deg);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Card swiped right (like) */
.team-card.swipe-right {
  transform: translateX(150%) rotate(30deg);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Card Image */
.card-image {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-image img {
  max-width: 150px;
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

.card-image .rugby-ball {
  font-size: 5rem;
}

/* Distance Badge */
.distance-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.95);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Card Content */
.card-content {
  padding: 30px;
}

.card-header {
  margin-bottom: 20px;
}

.team-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.age-badge {
  display: inline-block;
  background: var(--color-secondary);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.age-group {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-text);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.club-name {
  color: var(--color-text-light);
  font-size: 1rem;
  margin-bottom: 15px;
}

.bio {
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

/* Recent Form */
.recent-form {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.form-stat {
  flex: 1;
  text-align: center;
  padding: 10px;
  background: var(--color-bg);
  border-radius: 10px;
}

.form-stat .label {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.form-stat .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

/* Available Dates */
.available-dates {
  margin-top: 20px;
}

.available-dates h4 {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.dates-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.date-chip {
  background: var(--color-secondary);
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.action-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.action-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.action-btn:active {
  transform: scale(0.95);
}

.btn-dislike {
  background: white;
  color: var(--color-danger);
  border: 3px solid var(--color-danger);
}

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

/* Match Animation */
.match-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.match-content {
  background: white;
  padding: 50px;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  animation: bounceIn 0.5s ease;
}

.match-content h2 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.match-content .emoji {
  font-size: 5rem;
  margin: 20px 0;
  animation: pulse 1s infinite;
}

.match-content p {
  color: var(--color-text-light);
  margin-bottom: 30px;
  line-height: 1.6;
}

.match-content button {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.match-content button:hover {
  transform: scale(1.05);
}

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

.empty-state .emoji {
  font-size: 5rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: var(--color-text);
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--color-text-light);
  line-height: 1.6;
}

/* Loading Spinner */
.loading {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border: 4px solid var(--color-bg);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Responsive */
@media (max-width: 600px) {
  #root {
    padding: 10px;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .card-stack {
    height: 500px;
  }
  
  .card-content {
    padding: 20px;
  }
}
