﻿/**
 * Quest4You - Smart Match Styles
 * Estilos para a página de compatibilidade
 */

/* ================================
   LAYOUT
   ================================ */

.smart-match-container {
  min-height: calc(100vh - 140px);
  padding-bottom: 2rem;
}

/* ================================
   HERO SECTION
   ================================ */

.match-hero {
  background: linear-gradient(135deg, #e53935 0%, #c2185b 50%, #ff9800 100%);
  padding: 3rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.match-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.match-hero-content {
  position: relative;
  z-index: 1;
}

.match-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.match-icon {
  font-size: 2.5rem;
  animation: heartbeat 1.5s ease-in-out infinite;
}

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

.match-hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

/* ================================
   LOGIN REQUIRED
   ================================ */

.login-required,
.no-quizzes,
.profile-setup {
  max-width: 500px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.login-required-card,
.no-quizzes-card,
.profile-setup-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-required-icon,
.no-quizzes-icon,
.profile-setup-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.login-required-card h2,
.no-quizzes-card h2,
.profile-setup-card h2 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 0.75rem;
}

.login-required-card p,
.no-quizzes-card p,
.profile-setup-card > p {
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ================================
   PROFILE SETUP FORM
   ================================ */

.profile-setup-form {
  text-align: left;
  margin-top: 1.5rem;
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkbox-group {
  margin-top: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: #444;
}

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

.checkbox-custom {
  width: 22px;
  height: 22px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: linear-gradient(135deg, #e53935, #c2185b);
  border-color: #e53935;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  color: white;
  font-size: 0.8rem;
  font-weight: bold;
}

.btn-full {
  width: 100%;
  margin-top: 1rem;
}

/* ================================
   MATCH MAIN SECTION
   ================================ */

.match-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ================================
   FILTERS
   ================================ */

.match-filters {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.filters-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.85rem;
  color: #666;
  white-space: nowrap;
}

.filter-group select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

.filter-group input[type="range"] {
  width: 100px;
  accent-color: #e53935;
}

.filter-group #compatLabel {
  font-size: 0.85rem;
  font-weight: 500;
  color: #e53935;
  min-width: 35px;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ================================
   YOUR PROFILE CARD
   ================================ */

.your-profile-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.your-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.your-profile-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.your-profile-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.your-profile-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e53935, #c2185b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
}

.your-profile-info h3 {
  font-size: 1.25rem;
  color: #333;
  margin: 0 0 0.25rem 0;
}

.your-profile-info p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

.your-quizzes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #444;
}

.quiz-badge-score {
  font-weight: 600;
  color: #e53935;
}

/* ================================
   MATCHES SECTION
   ================================ */

.matches-section {
  margin-top: 2rem;
}

.matches-title {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.match-count {
  font-size: 1rem;
  font-weight: 400;
  color: #666;
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ================================
   MATCH CARD
   ================================ */

.match-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.match-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.match-card-header {
  background: linear-gradient(135deg, #e53935 0%, #c2185b 100%);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.match-avatar {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.match-info {
  flex: 1;
}

.match-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin: 0 0 0.25rem 0;
}

.match-details {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  margin: 0;
}

.match-compat {
  background: white;
  color: #e53935;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
}

.match-card-body {
  padding: 1.25rem;
}

.match-quizzes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.match-quiz-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.6rem;
  background: #f5f5f5;
  border-radius: 15px;
  font-size: 0.75rem;
  color: #666;
}

.match-card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}

.match-card-footer .btn {
  width: 100%;
}

/* ================================
   NO MATCHES
   ================================ */

.no-matches {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.no-matches-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ================================
   LOADING
   ================================ */

.loading-matches {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top-color: #e53935;
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 1s linear infinite;
}

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

/* ================================
   MATCH MODAL
   ================================ */

.match-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.match-modal-content {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

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

.match-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.match-modal-close:hover {
  background: rgba(255,255,255,0.3);
}

.match-modal-header {
  background: linear-gradient(135deg, #e53935 0%, #c2185b 100%);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

.match-modal-avatar {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1rem;
  color: white;
}

.match-modal-name {
  font-size: 1.5rem;
  color: white;
  margin: 0 0 0.5rem;
}

.match-modal-details {
  color: rgba(255,255,255,0.9);
  margin: 0;
  font-size: 0.95rem;
}

.match-modal-compat {
  text-align: center;
  padding: 1.5rem;
  margin-top: -30px;
}

.compat-circle {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.compat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #e53935;
}

.compat-label {
  font-size: 1rem;
  color: #e53935;
}

.compat-text {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.match-modal-breakdown {
  padding: 0 1.5rem 1.5rem;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-icon {
  font-size: 1.25rem;
}

.breakdown-info {
  flex: 1;
}

.breakdown-name {
  font-size: 0.9rem;
  color: #333;
  margin: 0;
}

.breakdown-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  margin-top: 0.35rem;
  overflow: hidden;
}

.breakdown-fill {
  height: 100%;
  background: linear-gradient(90deg, #e53935, #fdd835, #4caf50);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.breakdown-match {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e53935;
}

.match-modal-actions {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  border-top: 1px solid #f0f0f0;
}

.match-modal-actions .btn {
  flex: 1;
}

/* ================================
   FOOTER
   ================================ */

.footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 768px) {
  .match-hero-title {
    font-size: 1.75rem;
  }

  .match-icon {
    font-size: 1.75rem;
  }

  .match-filters {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .filter-group {
    width: 100%;
    justify-content: space-between;
  }

  .filter-group input[type="range"] {
    flex: 1;
  }

  .matches-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .match-modal-actions {
    flex-direction: column;
  }
}
