@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  background: radial-gradient(ellipse 75% 55% at 50% 15%, #132127 0%, #0C161B 60%, #070E12 100%);
  color: #EAE6DC;
  -webkit-font-smoothing: antialiased;
}

.shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}

.frame {
  width: 100%;
  max-width: 820px;
  background: rgba(10, 20, 24, 0.72);
  border: 1px solid rgba(212, 181, 108, 0.42);
  outline: 1px solid rgba(239, 236, 228, 0.1);
  outline-offset: -8px;
  padding: 28px 34px 22px 34px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 20px;
}

.brand-logo {
  height: 68px;
  width: auto;
  filter: grayscale(100%) brightness(2.6) contrast(1.08);
  margin-bottom: 4px;
}

.brand-name {
  font-size: 21px;
  font-weight: 700;
  color: #F4F1E8;
}

.brand-sub {
  font-size: 13.5px;
  color: #A4AEAF;
}

.search-card {
  margin-bottom: 22px;
}

.search-label {
  display: block;
  font-size: 14px;
  color: #C7C3B8;
  margin-bottom: 10px;
}

.search-row {
  display: flex;
  gap: 10px;
}

#cert-id {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15.5px;
  letter-spacing: 0.6px;
  text-align: left;
  color: #FFFFFF;
  background: rgba(7, 14, 18, 0.85);
  border: 1px solid rgba(212, 181, 108, 0.45);
  outline: none;
  transition: border-color 0.15s ease;
}

#cert-id:focus {
  border-color: #DFC078;
}

.btn-verify {
  height: 48px;
  padding: 0 24px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #091317;
  background: #DFC078;
  border: 1px solid #DFC078;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.btn-verify:hover {
  background: #EAD090;
}

.result-area {
  min-height: 36px;
}

.cert-card {
  border: 1px solid rgba(212, 181, 108, 0.35);
  background: rgba(15, 28, 34, 0.72);
  padding: 26px 24px;
}

.cert-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(212, 181, 108, 0.22);
}

.cert-title {
  font-size: 19px;
  font-weight: 700;
  color: #DFC078;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid rgba(212, 181, 108, 0.65);
  color: #DFC078;
  background: rgba(212, 181, 108, 0.08);
}

.status-badge.invalid {
  border-color: rgba(220, 120, 110, 0.65);
  color: #F0A39B;
  background: rgba(220, 120, 110, 0.08);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field.full {
  grid-column: 1 / -1;
}

.field-lbl {
  font-size: 12.5px;
  color: #9DA7A9;
}

.field-val {
  font-size: 15.5px;
  font-weight: 700;
  color: #F4F1E8;
  word-break: break-word;
}

.field-val.ltr {
  direction: ltr;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14.5px;
}

.field-val.muted {
  font-weight: 400;
  font-size: 13.5px;
  color: #9DA7A9;
}

.hash-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(7, 14, 18, 0.72);
  border: 1px solid rgba(212, 181, 108, 0.25);
}

.hash-val {
  font-size: 13px !important;
  color: #DFC078 !important;
  word-break: break-all;
}

.btn-copy {
  height: 30px;
  padding: 0 12px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #DFC078;
  background: transparent;
  border: 1px solid rgba(212, 181, 108, 0.55);
  cursor: pointer;
  white-space: nowrap;
}

.btn-copy:hover {
  background: rgba(212, 181, 108, 0.12);
}

.cert-actions {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(212, 181, 108, 0.2);
  display: flex;
  justify-content: flex-start;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #091317;
  background: #DFC078;
  border: 1px solid #DFC078;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.btn-download:hover {
  background: #EAD090;
}

.cert-statement {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14.5px;
  line-height: 1.95;
  color: #DCD8CE;
}

.cert-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.85;
  color: #A4AEAF;
}

.cert-note .star {
  color: #DFC078;
  font-weight: 700;
}

.cert-card.inactive {
  border-color: rgba(220, 120, 110, 0.45);
}

.status-banner.invalid {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(220, 120, 110, 0.45);
  background: rgba(220, 120, 110, 0.08);
  color: #F0B4AE;
  font-size: 14px;
  line-height: 1.85;
}

.alert-box {
  border: 1px solid rgba(220, 120, 110, 0.45);
  background: rgba(220, 120, 110, 0.07);
  padding: 18px 20px;
  font-size: 14.5px;
  color: #F0B4AE;
  line-height: 1.8;
}

.hint-box {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 14, 18, 0.5);
  padding: 16px 20px;
  font-size: 13.5px;
  color: #A4AEAF;
  line-height: 1.85;
}

.site-footer {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(212, 181, 108, 0.22);
  text-align: center;
  font-size: 13px;
  color: #9DA7A9;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.footer-links a {
  color: #DFC078;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .frame {
    padding: 26px 18px 20px 18px;
  }
  .search-row {
    flex-direction: column;
  }
  .cert-grid {
    grid-template-columns: 1fr;
  }
}
