/* History Page Styles */

.history-page {
  padding-top: 80px;
}

/* Hero Section */
.history-hero {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.history-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.history-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Advanced Search */
.advanced-search {
  padding: 4rem 0;
  background: #f8fafc;
}

.search-card {
  background: white;
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.search-card h2 {
  color: #1e40af;
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 700;
  text-align: center;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.search-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.search-group {
  display: flex;
  flex-direction: column;
}

.search-group label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-group input,
.search-group select {
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.search-group input:focus,
.search-group select:focus {
  outline: none;
  border-color: #1e40af;
}

.search-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn-outline {
  background: transparent;
  color: #1e40af;
  border: 2px solid #1e40af;
}

.btn-outline:hover {
  background: #1e40af;
  color: white;
}

/* Quick Search */
.quick-search {
  padding: 2rem 0;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.quick-search-card {
  text-align: center;
}

.quick-search-card h3 {
  color: #1e40af;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.quick-search-options {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.quick-btn {
  padding: 0.75rem 1.5rem;
  background: #f1f5f9;
  color: #64748b;
  border: 2px solid #e2e8f0;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.quick-btn:hover,
.quick-btn.active {
  background: #1e40af;
  color: white;
  border-color: #1e40af;
  transform: translateY(-2px);
}

/* Results Section */
.results-section {
  padding: 4rem 0;
  background: white;
  min-height: 60vh;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-header h2 {
  color: #1e40af;
  font-size: 2rem;
  font-weight: 700;
}

.results-info {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.results-count {
  color: #64748b;
  font-weight: 500;
}

.view-options {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
  background: #1e40af;
  color: white;
  border-color: #1e40af;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 4rem 0;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #1e40af;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.result-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #1e40af;
}

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

.result-type {
  background: #1e40af;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.result-type.toto {
  background: #1e40af;
}

.result-type.four-d {
  background: #d97706;
}

.result-date {
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
}

.result-country {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
}

.result-numbers {
  margin-bottom: 1.5rem;
}

.result-numbers h4 {
  color: #374151;
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.numbers-display {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.mini-number {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.mini-number.additional {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.four-d-numbers {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.four-d-prize {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.four-d-label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
}

.four-d-number {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e40af;
  font-family: "Courier New", monospace;
}

.result-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.view-details-btn {
  background: #1e40af;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.view-details-btn:hover {
  background: #1e3a8a;
}

/* Results List/Table */
.results-list {
  margin-bottom: 3rem;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.results-table th {
  background: #f8fafc;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e2e8f0;
}

.results-table td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.results-table tr:hover {
  background: #f8fafc;
}

.table-numbers {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.table-number {
  background: #1e40af;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.table-number.additional {
  background: #dc2626;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 0;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.no-results h3 {
  color: #374151;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.no-results p {
  color: #64748b;
  margin-bottom: 2rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination button {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination button:hover,
.pagination button.active {
  background: #1e40af;
  color: white;
  border-color: #1e40af;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination button:disabled:hover {
  background: white;
  color: #64748b;
  border-color: #e2e8f0;
}

/* Statistics */
.history-stats {
  padding: 4rem 0;
  background: #f8fafc;
}

.history-stats h2 {
  text-align: center;
  color: #1e40af;
  font-size: 2rem;
  margin-bottom: 3rem;
  font-weight: 700;
}

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

.stat-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.stat-info {
  text-align: left;
}

.stat-info h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 0.5rem;
}

.stat-info p {
  color: #64748b;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .history-hero h1 {
    font-size: 2rem;
  }

  .search-card {
    padding: 2rem;
  }

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

  .search-actions {
    flex-direction: column;
    align-items: center;
  }

  .search-actions .btn {
    width: 200px;
  }

  .quick-search-options {
    flex-direction: column;
    align-items: center;
  }

  .quick-btn {
    width: 200px;
  }

  .results-header {
    flex-direction: column;
    text-align: center;
  }

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

  .results-table {
    font-size: 0.9rem;
  }

  .results-table th,
  .results-table td {
    padding: 0.75rem 0.5rem;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
  }

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

@media (max-width: 480px) {
  .search-card {
    padding: 1.5rem;
  }

  .result-card {
    padding: 1.5rem;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .pagination button {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}
