/* ===================================================
   Million Dollar Pixel - Estilos principales
   =================================================== */

/* --- Reset y base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0f0f1a;
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: #64b5f6;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #90caf9;
  text-decoration: underline;
}

/* --- Header --- */
.site-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-bottom: 3px solid #e94560;
  padding: 1.5rem 2rem;
  text-align: center;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
}

.site-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, #e94560, #f5a623, #e94560);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  margin-bottom: 0.3rem;
  letter-spacing: 1px;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.site-tagline {
  font-size: 1.1rem;
  color: #b0bec5;
  margin-bottom: 1rem;
  font-weight: 300;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-link {
  color: #b0bec5;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background-color: rgba(233, 69, 96, 0.3);
  text-decoration: none;
}

.nav-link.active {
  background-color: rgba(233, 69, 96, 0.5);
}

/* --- Stats bar --- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 1rem 2rem;
  background-color: #1a1a2e;
  border-bottom: 1px solid #2a2a4a;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f5a623;
}

.stat-label {
  font-size: 0.8rem;
  color: #8888aa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Grid wrapper --- */
.grid-wrapper {
  display: flex;
  justify-content: center;
  padding: 2rem;
  overflow: auto;
  background-color: #12121f;
}

.grid-container {
  position: relative;
  border: 2px solid #2a2a4a;
  box-shadow: 0 0 40px rgba(233, 69, 96, 0.15), 0 0 80px rgba(15, 52, 96, 0.2);
  background-color: #e8e8e8;
}

.grid-canvas {
  display: block;
}

/* --- Bloques de píxeles vendidos --- */
.pixel-block {
  position: absolute;
  display: block;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, z-index 0s;
  z-index: 1;
  image-rendering: auto;
}

.pixel-block:hover {
  transform: scale(1.8);
  box-shadow: 0 0 15px rgba(233, 69, 96, 0.6), 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 100;
  border-color: #e94560;
}

/* --- Tooltip --- */
.pixel-tooltip {
  display: none;
  position: absolute;
  z-index: 1000;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid #e94560;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #e0e0e0;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  max-width: 280px;
  line-height: 1.5;
}

.pixel-tooltip strong {
  color: #f5a623;
  font-size: 0.95rem;
}

.tooltip-owner {
  color: #b0bec5;
}

.tooltip-size {
  color: #8888aa;
  font-size: 0.8rem;
}

.tooltip-url {
  color: #64b5f6;
  font-size: 0.75rem;
  word-break: break-all;
}

/* --- FAQ Section --- */
.faq-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.faq-section h2 {
  text-align: center;
  font-size: 2rem;
  color: #f5a623;
  margin-bottom: 2rem;
  position: relative;
}

.faq-section h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: #e94560;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.faq-item {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid #2a2a4a;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: #e94560;
}

.faq-item h3 {
  color: #64b5f6;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.faq-item p {
  color: #b0bec5;
  font-size: 0.95rem;
}

/* --- Pixel List Section --- */
.pixel-list-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
}

.pixel-list-section h2 {
  text-align: center;
  font-size: 2rem;
  color: #f5a623;
  margin-bottom: 2rem;
  position: relative;
}

.pixel-list-section h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: #e94560;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.pixel-table {
  width: 100%;
  border-collapse: collapse;
  background: #1a1a2e;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2a2a4a;
}

.pixel-table thead {
  background: linear-gradient(135deg, #16213e, #0f3460);
}

.pixel-table th {
  padding: 0.8rem 1rem;
  text-align: left;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #f5a623;
  border-bottom: 2px solid #e94560;
}

.pixel-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #2a2a4a;
  font-size: 0.9rem;
  color: #b0bec5;
}

.pixel-table tbody tr:hover {
  background-color: rgba(233, 69, 96, 0.08);
}

.pixel-table td a {
  color: #64b5f6;
  font-weight: 500;
}

.pixel-table td a:hover {
  color: #e94560;
}

.color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.no-pixels {
  text-align: center;
  color: #8888aa;
  font-size: 1.1rem;
  padding: 2rem;
}

/* --- Footer --- */
.site-footer {
  background: #0a0a15;
  border-top: 1px solid #2a2a4a;
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #8888aa;
}

.site-footer .disclaimer {
  font-size: 0.75rem;
  color: #555577;
  margin-top: 0.5rem;
}

/* --- Buy page styles --- */
.buy-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.buy-page h2 {
  color: #f5a623;
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.buy-page h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: #e94560;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.buy-info {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid #2a2a4a;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.buy-info h3 {
  color: #64b5f6;
  margin-bottom: 0.8rem;
}

.buy-info ul {
  list-style: none;
  padding: 0;
}

.buy-info ul li {
  padding: 0.3rem 0;
  color: #b0bec5;
  position: relative;
  padding-left: 1.5rem;
}

.buy-info ul li::before {
  content: '\2713';
  color: #e94560;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.buy-form {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid #2a2a4a;
  border-radius: 8px;
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: #b0bec5;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  background: #0f0f1a;
  border: 1px solid #2a2a4a;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #e94560;
  box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #555577;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-help {
  font-size: 0.8rem;
  color: #555577;
  margin-top: 0.3rem;
}

.btn-submit {
  display: inline-block;
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.8rem 2.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
  width: 100%;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #f55a75, #d94060);
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
}

.price-preview {
  background: #0a0a15;
  border: 1px solid #2a2a4a;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.price-preview .price-value {
  font-size: 2rem;
  font-weight: 700;
  color: #f5a623;
}

.price-preview .price-label {
  color: #8888aa;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Modal de confirmación --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid #e94560;
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.modal-content h3 {
  color: #f5a623;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.modal-content p {
  color: #b0bec5;
  margin-bottom: 1.5rem;
}

.modal-content .btn-close {
  background: #2a2a4a;
  color: #e0e0e0;
  border: none;
  padding: 0.6rem 2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease;
}

.modal-content .btn-close:hover {
  background: #3a3a5a;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .site-title {
    font-size: 1.6rem;
  }

  .site-tagline {
    font-size: 0.9rem;
  }

  .stats-bar {
    gap: 1.5rem;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .grid-wrapper {
    padding: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .pixel-table {
    font-size: 0.8rem;
  }

  .pixel-table th,
  .pixel-table td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 1.3rem;
  }

  .site-nav {
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
  }
}
