/* Components CSS - Buttons, Cards, Forms, Animations */
/* Travel Guide Information Cards & Statistics View Components */

/* Information Cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.info-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient-2);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.info-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px dotted var(--border);
}

.info-card p {
  color: #4a5568;
  font-size: 0.95rem;
}

/* Statistics Display */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-box {
  background: var(--gradient-4);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  color: white;
  transition: transform 0.3s ease;
}

.stat-box:hover {
  transform: scale(1.05);
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.95;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Game Cards */
.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.game-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  border-color: var(--primary);
}

.game-header {
  background: var(--gradient-3);
  padding: 1.5rem;
  color: white;
  position: relative;
}

.game-header h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  background: none;
  -webkit-text-fill-color: white;
}

.game-type {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.game-body {
  padding: 1.5rem;
}

.game-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px dotted var(--border);
}

.game-stat {
  text-align: center;
}

.game-stat-value {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary);
  display: block;
}

.game-stat-label {
  font-size: 0.8rem;
  color: #718096;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  text-align: center;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102,126,234,0.3);
}

.btn-primary:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--gradient-2);
  color: white;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(240,147,251,0.3);
}

.btn-secondary:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.btn-info {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.btn-info:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Number Display */
.number-display {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.number-ball {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table thead {
  background: var(--gradient-1);
  color: white;
}

.data-table th,
.data-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
  background: rgba(102,126,234,0.05);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.02);
}

/* Alert Boxes */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 6px;
  margin: 1rem 0;
  border-left: 4px solid;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.alert-info {
  background: rgba(79,172,254,0.1);
  border-left-color: #4facfe;
  color: #2563eb;
}

.alert-success {
  background: rgba(67,233,123,0.1);
  border-left-color: #43e97b;
  color: #059669;
}

.alert-warning {
  background: rgba(250,112,154,0.1);
  border-left-color: #fa709a;
  color: #dc2626;
}

/* Progress Bars */
.progress-container {
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  height: 30px;
  margin: 1rem 0;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  transition: width 1s ease;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.8;
  }
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: bold;
  margin: 0 0.25rem;
}

.badge-new {
  background: var(--gradient-2);
  color: white;
}

.badge-hot {
  background: var(--gradient-5);
  color: white;
}

.badge-info {
  background: var(--gradient-3);
  color: white;
}

/* Loading Spinner */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

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

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tooltip:hover::after {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .info-cards,
  .game-cards {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .data-table {
    font-size: 0.9rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .number-display {
    justify-content: center;
  }
  
  .btn {
    width: 100%;
  }
}