/* Scoped styles for competitive-programming-contest-tracker (prefix: cpct-) */

.cpct-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
}

.cpct-header {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cpct-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: #0f172a;
}

.cpct-subtitle {
  margin: 0;
  font-size: 1rem;
  color: #64748b;
  line-height: 1.5;
}

.cpct-hero-countdown {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cpct-hero-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cpct-hero-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #2563eb;
  color: #ffffff;
  width: fit-content;
}

.cpct-hero-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}

.cpct-hero-time {
  font-size: 0.9rem;
  color: #94a3b8;
}

.cpct-timer-grid {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.cpct-timer-unit {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  text-align: center;
  min-width: 60px;
}

.cpct-timer-num {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: monospace;
  color: #38bdf8;
  display: block;
}

.cpct-timer-lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
}

.cpct-search-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cpct-input-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cpct-input {
  flex: 1 1 260px;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  background: #f8fafc;
  color: #0f172a;
}

.cpct-select {
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
}

.cpct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.cpct-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.cpct-btn-primary:hover {
  background: #1d4ed8;
}

.cpct-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.cpct-btn-secondary:hover {
  background: #e2e8f0;
}

.cpct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.cpct-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cpct-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cpct-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.cpct-platform-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cpct-tag-cf { background: #fee2e2; color: #b91c1c; }
.cpct-tag-lc { background: #fef3c7; color: #b45309; }
.cpct-tag-ac { background: #e0e7ff; color: #3730a3; }
.cpct-tag-cc { background: #dcfce7; color: #15803d; }
.cpct-tag-hr { background: #f3e8ff; color: #6b21a8; }

.cpct-card-title {
  margin: 0.5rem 0 0.25rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
}

.cpct-card-time {
  font-size: 0.85rem;
  color: #2563eb;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cpct-card-details {
  font-size: 0.85rem;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cpct-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
  gap: 0.5rem;
}

.cpct-link {
  color: #2563eb;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.cpct-link:hover {
  text-decoration: underline;
}

.cpct-ad-slot {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.cpct-hidden {
  display: none !important;
}

.cpct-copied {
  color: #10b981 !important;
}

@media (max-width: 768px) {
  .cpct-hero-countdown {
    flex-direction: column;
    align-items: flex-start;
  }
  .cpct-grid {
    grid-template-columns: 1fr;
  }
  .cpct-input-row {
    flex-direction: column;
  }
}
