@import url('https://fonts.googleapis.com/css2?family=Anton&family=Cinzel:wght@500;700;900&family=JetBrains+Mono:wght@400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --red: #E30613;
  --ease: cubic-bezier(.16,.84,.44,1);
  --mono: 'JetBrains Mono', monospace;
}

body {
      margin: 0; padding: 40px 20px; background: #0c0c0e; font-family: 'Montserrat', sans-serif; color: #333;
      display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh;
    }
    .actions {
      margin-bottom: 25px; display: flex; gap: 15px;
    }
    .btn {
      padding: 12px 24px; border-radius: 50px; font-weight: 700; text-decoration: none; cursor: pointer;
      font-size: 0.95rem; display: inline-flex; align-items: center; gap: 8px; border: none; transition: 0.3s;
    }
    .btn-print { background: #ffd700; color: #000; box-shadow: 0 4px 15px rgba(255,215,0,0.3); }
    .btn-print:hover { background: #e6c200; transform: translateY(-2px); }
    .btn-back { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
    .btn-back:hover { background: rgba(255,255,255,0.2); }
    
    .cert-frame {
      width: 100%; max-width: 850px; background: #fffcf5; padding: 50px; box-sizing: border-box;
      border: 15px solid #1a1a1d; outline: 4px solid #d4af37; outline-offset: -10px;
      box-shadow: 0 20px 50px rgba(0,0,0,0.7); position: relative; text-align: center;
    }
    .cert-inner {
      border: 2px dashed #c5a059; padding: 40px; position: relative;
    }
    .seal {
      width: 90px; height: 90px; background: radial-gradient(circle, #ffd700, #b8860b);
      border-radius: 50%; display: flex; align-items: center; justify-content: center;
      margin: 0 auto 20px; color: #000; font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.2rem;
      box-shadow: 0 4px 15px rgba(184,134,11,0.5); border: 3px solid #fff;
    }
    h1 { font-family: 'Cinzel', serif; font-size: 2.6rem; color: #1a1a1d; margin: 0 0 10px; letter-spacing: 3px; }
    .subtitle { font-size: 1.1rem; color: #b8860b; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 30px; }
    .presented { font-size: 1rem; color: #666; margin-bottom: 10px; }
    .company { font-family: 'Cinzel', serif; font-size: 2.2rem; font-weight: 900; color: #e30613; margin: 10px 0 20px; border-bottom: 2px solid #d4af37; display: inline-block; padding-bottom: 5px; }
    .desc { font-size: 1.05rem; line-height: 1.7; color: #444; max-width: 650px; margin: 0 auto 35px; }
    .meta-grid { display: flex; justify-content: space-around; align-items: flex-end; margin-top: 40px; border-top: 1px solid #ddd; padding-top: 25px; }
    .meta-col { text-align: center; }
    .meta-col b { display: block; font-size: 0.9rem; color: #111; margin-bottom: 5px; }
    .meta-col span { font-size: 0.85rem; color: #666; }
    .sig { font-family: 'Cinzel', serif; font-style: italic; font-size: 1.3rem; color: #1a1a1d; border-bottom: 1px solid #333; padding-bottom: 5px; margin-bottom: 5px; }
    @media (max-width: 768px) {
      body { padding: 20px 10px; }
      .cert-frame { padding: 25px 15px; border-width: 8px; outline-offset: -5px; }
      .cert-inner { padding: 25px 15px; }
      h1 { font-size: 1.7rem; letter-spacing: 1px; }
      .company { font-size: 1.5rem; }
      .desc { font-size: 0.95rem; line-height: 1.5; margin-bottom: 25px; }
      .meta-grid { flex-direction: column; gap: 24px; align-items: center; }
      .actions { flex-direction: column; width: 100%; max-width: 320px; }
      .btn { width: 100%; justify-content: center; box-sizing: border-box; }
    }
    @media (max-width: 480px) {
      body { padding: 12px 6px; }
      .cert-frame { padding: 16px 10px; border-width: 6px; outline-offset: -4px; }
      .cert-inner { padding: 20px 10px; border-width: 1px; }
      h1 { font-size: 1.3rem; letter-spacing: 0.5px; }
      .subtitle { font-size: 0.85rem; letter-spacing: 1px; margin-bottom: 20px; }
      .company { font-size: 1.25rem; margin: 8px 0 16px; }
      .desc { font-size: 0.88rem; }
      .seal { width: 70px !important; height: 70px !important; }
      .seal img { width: 70px !important; height: 70px !important; }
    }
    @media print {
      body { background: #fff; padding: 0; }
      .actions { display: none; }
      .cert-frame { box-shadow: none; max-width: 100%; border-width: 10px; }
      .wolf-loader { display: none !important; }
    }

    /* ============ Universal Page Loader ============ */
    .wolf-loader {
      position: fixed;
      inset: 0;
      background: #09090b;
      z-index: 9999;
      display: -webkit-flex; display: flex;
      -webkit-align-items: center; align-items: center;
      -webkit-justify-content: center; justify-content: center;
      -webkit-transition: -webkit-transform 0.45s var(--ease), opacity 0.45s var(--ease), visibility 0.45s;
      transition: transform 0.45s var(--ease), opacity 0.45s var(--ease), visibility 0.45s;
      overflow: hidden;
    }
    .wolf-loader.loaded {
      -webkit-transform: scale(1.04); transform: scale(1.04);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }
    .loader-inner {
      width: 100%;
      max-width: 80%;
      display: -webkit-flex; display: flex;
      -webkit-flex-direction: column; flex-direction: column;
      -webkit-align-items: center; align-items: center;
      gap: 16px;
    }
    @media (min-width: 768px) {
      .loader-inner { max-width: 55%; }
    }
    .loader-text-wrap {
      width: 100%;
      position: relative;
      padding-bottom: 22%;
      height: 0;
    }
    @supports (aspect-ratio: 1000/220) {
      .loader-text-wrap {
        padding-bottom: 0;
        height: auto;
        aspect-ratio: 1000/220;
      }
    }
    .loader-text-wrap svg {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
    }
    .loader-counter {
      width: 100%;
      display: -webkit-flex; display: flex;
      -webkit-justify-content: space-between; justify-content: space-between;
      -webkit-align-items: center; align-items: center;
      font-family: var(--mono);
      font-size: 0.74rem;
      letter-spacing: 0.1em;
      color: rgba(255, 255, 255, 0.45);
      margin-top: 8px;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      padding-top: 12px;
    }
    .loader-pct {
      font-weight: 700;
      color: var(--red);
      font-size: 0.84rem;
    }