/* Lottery DB Page Styles */
.lotery-db-page {
  min-height: calc(100vh - 64px);
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  padding: 3rem 1rem;
}

.lotery-db-page .container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease-out;
}

.page-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: fadeInDown 0.6s ease-out 0.1s both;
}

.page-title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 1rem;
  letter-spacing: -0.5px;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.page-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: #94a3b8;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Token Card */
.token-card {
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid rgba(247, 147, 26, 0.3);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease-out 0.4s both;
  transition: all 0.3s ease;
}

.token-card:hover {
  border-color: rgba(247, 147, 26, 0.5);
  box-shadow: 0 8px 24px rgba(247, 147, 26, 0.15);
}

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

.token-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.token-badge {
  background: rgba(247, 147, 26, 0.15);
  color: #f7931a;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(247, 147, 26, 0.3);
}

.token-display {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.token-value {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f7931a;
  background: rgba(247, 147, 26, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(247, 147, 26, 0.3);
  display: inline-block;
  text-shadow: 0 0 10px rgba(247, 147, 26, 0.3);
}

/* API Instructions Card */
.api-instructions-card {
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease-out 0.45s both;
  transition: all 0.3s ease;
}

.api-instructions-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

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

.api-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.api-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.api-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.api-description {
  color: #94a3b8;
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

.api-endpoint,
.api-params,
.api-example,
.api-response {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.endpoint-label,
.params-label,
.example-label,
.response-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
}

.endpoint-value {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.95rem;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: inline-block;
  word-break: break-all;
}

.params-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.8;
}

.params-list code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.example-code,
.response-code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  color: #e2e8f0;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.response-code {
  color: #10b981;
}

/* Results Section */
.results-section {
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

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

.results-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.results-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.count-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: #3b82f6;
}

.count-label {
  font-size: 0.875rem;
  color: #93c5fd;
  font-weight: 500;
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.result-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease-out both;
}

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }
.result-card:nth-child(5) { animation-delay: 0.5s; }

.result-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(15, 23, 42, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.puzzle-info {
  flex: 1;
}

.puzzle-number {
  font-size: 1.125rem;
  font-weight: 600;
  color: #3b82f6;
  margin: 0 0 0.5rem;
}

.puzzle-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.creation-date {
  font-size: 0.875rem;
  color: #94a3b8;
}

.key-section {
  text-align: right;
}

.key-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
  margin: 0 0 0.5rem;
}

.key-value {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  font-weight: 500;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: inline-block;
  max-width: 200px;
  word-break: break-all;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  animation: fadeInUp 0.6s ease-out 0.6s both;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 1rem;
}

.empty-state p {
  color: #94a3b8;
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

/* Alert Card */
.alert-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(217, 119, 6, 0.15);
  border: 2px solid rgba(217, 119, 6, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.alert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.alert-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fbbf24;
  margin: 0 0 0.5rem;
}

.alert-content p {
  color: #fde68a;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
}

.alert-link {
  color: #f59e0b;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.alert-link:hover {
  color: #fbbf24;
  text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .lotery-db-page {
    padding: 2rem 1rem;
  }

  .page-header {
    margin-bottom: 2rem;
  }

  .token-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .api-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .api-instructions-card {
    padding: 1.5rem;
  }

  .example-code {
    font-size: 0.75rem;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .result-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .key-section {
    text-align: left;
  }
  
  .key-value {
    max-width: 100%;
  }
  
  .alert-card {
    flex-direction: column;
    text-align: center;
  }
  
  .alert-icon {
    margin: 0 auto 0.5rem;
  }
}

@media (max-width: 480px) {
  .token-card {
    padding: 1.5rem;
  }
  
  .token-value {
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
  }
  
  .result-card {
    padding: 1rem;
  }
  
  .empty-state {
    padding: 3rem 1rem;
  }
}
