/**
 * cards.css
 * Styles for Country, Game, and Prediction Cards.
 */

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

/* Country Card */
.country-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.country-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.country-card-flag {
  font-size: 3rem;
  line-height: 1;
}

.country-card-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.country-card-games {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Game Card */
.game-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid transparent;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-secondary);
}

.game-card-title {
  font-size: 1.5rem;
  color: var(--color-primary-dark);
}

.game-card-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.game-card-result {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 2px;
  background: var(--color-bg);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.game-card-nodata {
  color: var(--color-text-muted);
  font-style: italic;
}

.game-card-link {
  text-align: right;
  color: var(--color-primary);
  font-weight: 600;
}

/* Prediction Card */
.prediction-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--color-primary);
  border-top: 1px solid transparent;
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.prediction-card.clickable {
  cursor: pointer;
}

.prediction-card.clickable:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
  border-left-color: var(--color-primary);
}

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

.prediction-status {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-pending { background: #fef08a; color: #854d0e; }
.status-checked { background: #bfdbfe; color: #1e40af; }
.status-new { background: #dbeafe; color: #1e40af; }
.status-old { background: #f1f5f9; color: #64748b; }

.prediction-dates {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.prediction-numbers {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 1px;
}

/* 3-tier Borders & Badges */
.prediction-card.status-card-perfect {
  border-left: 5px solid #eab308;
}
.prediction-card.status-card-ambiguous {
  border-left: 5px solid #3b82f6;
}
.prediction-card.status-card-failure {
  border-left: 5px solid #ef4444;
}

.status-perfect { background: #fef9c3; color: #a16207; }
.status-ambiguous { background: #dbeafe; color: #1d4ed8; }
.status-failure { background: #fee2e2; color: #b91c1c; }

/* Prediction Balls Container */
.prediction-balls-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.prediction-ball {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}

/* Matching Highlight States */
.prediction-ball.match-main {
  background: radial-gradient(circle at 30% 30%, #fef08a, #ca8a04);
  color: #000;
  border-color: #a16207;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.6);
}

.prediction-ball.match-bonus {
  background: radial-gradient(circle at 30% 30%, #bfdbfe, #2563eb);
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

.prediction-ball.match-special {
  background: radial-gradient(circle at 30% 30%, #fbcfe8, #db2777);
  color: #fff;
  border-color: #be185d;
  box-shadow: 0 0 8px rgba(219, 39, 119, 0.6);
}

/* Analysis Hits Report */
.prediction-hits-report {
  font-size: 0.825rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--color-border);
}

.prediction-hits-report .alert-red {
  color: #ef4444;
  font-weight: 600;
}

.prediction-hits-report .success-green {
  color: #22c55e;
  font-weight: 600;
}

/* Statistics Dashboard */
.stats-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

@media (max-width: 768px) {
  .stats-dashboard {
    grid-template-columns: 1fr;
  }
}

.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-section:first-child {
  border-right: 1px solid var(--color-border);
  padding-right: 1.5rem;
}

@media (max-width: 768px) {
  .dashboard-section:first-child {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.5rem;
  }
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0;
}

.stats-grid-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
}

.stats-item {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
  border: 1px solid var(--color-border);
}

.stats-item .label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.stats-item .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.text-success { color: #22c55e !important; }
.text-danger { color: #ef4444 !important; }
.text-primary { color: #3b82f6 !important; }
.text-info { color: #06b6d4 !important; }

/* Filter Bar */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--color-text-muted);
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

