* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f8fbff;
  color: #0f172a;
}

body {
  line-height: 1.6;
}

.site-header {
  background: linear-gradient(180deg, #f6f8ff 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 3rem 0 2rem;
}

.header-inner {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 3rem;
}

.card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

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

.search-card {
  border-radius: 30px;
  padding: 2.5rem;
}

.leaderboard-card {
  padding: 2.5rem;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(36, 91, 255, 0.12);
  color: #245bff;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 2.5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 2vw, 2rem);
}

p {
  margin: 0.75rem 0;
}

.row,
.grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
}

.top-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
}

.brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #0f172a;
  text-decoration: none;
}

.top-nav a {
  color: #334155;
  text-decoration: none;
  font-weight: 600;
}

.top-nav a:hover {
  color: #245bff;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-copy {
  font-size: 1.05rem;
  max-width: 42rem;
  line-height: 1.8;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  background: #ffffff;
  border: 1px solid rgba(36, 91, 255, 0.12);
  border-radius: 24px;
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
}

.stat-label {
  margin: 0.5rem 0 0;
  color: #64748b;
}

.hero-panel {
  background: linear-gradient(180deg, #ffffff 0%, #e9efff 100%);
  border: 1px solid rgba(36, 91, 255, 0.16);
  border-radius: 32px;
  padding: 2rem;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.featured-section,
.how-it-works-card,
.search-card,
.leaderboard-card {
  padding: 2.5rem;
}

.feature-grid article,
.small-card,
.stat-card {
  min-height: 190px;
}

.certificate-preview {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.certificate-preview .certificate-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.certificate-preview .certificate-logo {
  width: 110px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #245bff;
  border-radius: 14px;
  background: rgba(36, 91, 255, 0.08);
}

.certificate-preview .certificate-body {
  margin-top: 1.5rem;
}

.certificate-preview .certificate-body h2 {
  margin-bottom: 0.4rem;
}

.certificate-preview .certificate-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.certificate-preview .certificate-row div {
  min-width: 180px;
}

.certificate-preview .certificate-signature {
  margin-top: 1.5rem;
  border-top: 1px dashed rgba(36, 91, 255, 0.16);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.certificate-preview .signature-line {
  width: 220px;
  border-top: 1px solid rgba(15, 23, 42, 0.24);
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.profile-badge {
  border: 1px solid rgba(36, 91, 255, 0.16);
  background: #f8fbff;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-weight: 700;
  color: #245bff;
}

.qr-card,
.share-panel {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(36, 91, 255, 0.12);
  border-radius: 24px;
  background: #f8fbff;
}

.qr-card img {
  display: block;
  max-width: 150px;
  margin-bottom: 1rem;
}

.share-panel {
  display: grid;
  gap: 1rem;
}

.share-panel p {
  margin: 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 1.5rem;
  border: 1px dashed rgba(36, 91, 255, 0.2);
  border-radius: 20px;
  background: #f8fbff;
  text-align: center;
  color: #475569;
}

.profile-stats .stat {
  padding: 1rem;
}

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
}

@media (max-width: 1024px) {
  .hero-grid,
  .footer-inner,
  .profile-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header,
  .container {
    padding: 1.5rem 0;
  }

  .section-title-row,
  .hero-actions,
  .top-nav,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .search-row,
  .row {
    flex-direction: column;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  background: #245bff;
  color: white;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.button:hover,
.button:focus {
  transform: translateY(-1px);
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
select {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font: inherit;
  color: #0f172a;
  background: #ffffff;
}

.issue-form {
  display: grid;
  gap: 1rem;
}

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

.issue-form label {
  display: grid;
  gap: 0.5rem;
  font-weight: 600;
  color: #334155;
}

.form-status {
  color: #245bff;
  font-weight: 700;
  margin: 0;
}

.button.secondary {
  background: #e8eeff;
  color: #245bff;
  border: 1px solid rgba(36, 91, 255, 0.16);
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
input[type="file"] {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font: inherit;
  color: #0f172a;
  background: #ffffff;
}

.issue-form {
  display: grid;
  gap: 1rem;
}

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

.issue-form label {
  display: grid;
  gap: 0.5rem;
  font-weight: 600;
  color: #334155;
}

.form-status {
  color: #245bff;
  font-weight: 700;
  margin: 0;
}

.button.secondary {
  background: #e8eeff;
  color: #245bff;
  border: 1px solid rgba(36, 91, 255, 0.16);
}

input[type="text"] {
  width: 100%;
  min-width: 220px;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  outline: none;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus {
  border-color: #245bff;
  box-shadow: 0 0 0 4px rgba(36, 91, 255, 0.12);
}

.search-row {
  gap: 1rem;
  align-items: center;
}

.secondary {
  background: transparent;
  color: #245bff;
  border: 1px solid rgba(36, 91, 255, 0.16);
}

.card h2 {
  margin-bottom: 0.75rem;
}

.small-card {
  background: #f8fbff;
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

small {
  color: #64748b;
}

@media (max-width: 768px) {
  .site-header,
  .container {
    padding: 1.5rem 0;
  }

  .section-title-row,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search-row,
  .row {
    flex-direction: column;
  }
}

.label {
  color: #475569;
  font-size: 0.95rem;
}

.value {
  color: #0f172a;
  font-weight: 700;
}

.stat {
  background: #f0f5ff;
  padding: 1rem;
  border-radius: 18px;
}

.small-card {
  background: #f8fbff;
  border-radius: 20px;
  padding: 1rem;
}

@media (max-width: 768px) {
  .container {
    padding: 1.2rem 0;
  }

  .search-row,
  .row {
    flex-direction: column;
  }
}
