:root {
    --accent: #00ff41;
    --text-dim: #a0a0a0;
    --border: #333;
}

/* Base */
body {
    background: #0f1117;
    color: #fff;
    font-family: monospace;
}

/* ================= PRELOADER ================= */

#preloader {
    position: fixed;
    inset: 0;
    background: #0f1117;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hide {
    opacity: 0;
    visibility: hidden;
}


.loader {
    transform: rotateZ(45deg);
    perspective: 1000px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    color: #91ff00;
}

.loader:before,
.loader:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: inherit;
    height: inherit;
    border-radius: 50%;
    transform: rotateX(70deg);
    animation: 1s spin linear infinite;
}

.loader:after {
    color: #FF3D00;
    transform: rotateY(70deg);
    animation-delay: .4s;
}

@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotateZ(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateZ(360deg);
    }
}

@keyframes rotateccw {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

@keyframes spin {

    0%,
    100% {
        box-shadow: .2em 0px 0 0px currentcolor;
    }

    12% {
        box-shadow: .2em .2em 0 0 currentcolor;
    }

    25% {
        box-shadow: 0 .2em 0 0px currentcolor;
    }

    37% {
        box-shadow: -.2em .2em 0 0 currentcolor;
    }

    50% {
        box-shadow: -.2em 0 0 0 currentcolor;
    }

    62% {
        box-shadow: -.2em -.2em 0 0 currentcolor;
    }

    75% {
        box-shadow: 0px -.2em 0 0 currentcolor;
    }

    87% {
        box-shadow: .2em -.2em 0 0 currentcolor;
    }
}


/* --------------------------------- Footer --------------------------------- */
.footer-note {
    margin-top: 80px;
    border-top: 1px solid var(--border);
    padding: 25px 15px;
    text-align: center;
}

.footer-content p:first-child {
    color: var(--accent);
    font-family: monospace;
    font-size: 13px;
    letter-spacing: 1px;
}

.footer-content p:last-child {
    color: var(--text-dim);
    font-size: 12px;
    margin-top: 6px;
}

@media (max-width: 640px) {
    .footer-note {
        margin-top: 60px;
        padding: 20px 10px;
    }

    .footer-content p:first-child {
        font-size: 11px;
    }

    .footer-content p:last-child {
        font-size: 10px;
    }
}



/* ================= GLASS NAVBAR ================= */

.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;

    padding: 14px 20px;

    background: rgba(15, 17, 23, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ================= UIVERSE BUTTON ================= */

.btn {
    position: relative;
    font-size: 13px;
    /* smaller text */
    text-transform: uppercase;
    text-decoration: none;

    padding: 0.6em 1.4em;
    /* reduced size */
    display: inline-block;
    cursor: pointer;

    border-radius: 6em;
    border: none;

    font-family: monospace;
    font-weight: 600;

    color: black;
    background-color: white;

    transition: all 0.2s;
}

/* hover lift */
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* click effect */
.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

/* ripple glow effect */
.btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    border-radius: 6em;
    background-color: #fff;

    z-index: -1;
    transition: all 0.4s;
}

.btn:hover::after {
    transform: scaleX(1.4) scaleY(1.6);
    opacity: 0;
}

/* spacing fix for fixed navbar */
body {
    padding-top: 80px;
}



/* =========================
   REAL CERTIFICATE CARD
========================= */

.certificate-card {
    position: relative;
    overflow: hidden;

    width: 320px;
    min-height: 220px;

    padding: 22px;

    background: linear-gradient(180deg,
            #111111,
            #0a0a0a);

    border: 1px solid #222;
    transition: .45s ease;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Accent Fill Animation */
.certificate-card::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 0%;

    background: var(--accent);

    transition: .45s ease;
    z-index: 0;
}

/* Shine Effect */
.certificate-card::after {
    content: "";
    position: absolute;

    top: -120%;
    left: -40%;

    width: 50%;
    height: 300%;

    background: rgba(255, 255, 255, .08);

    transform: rotate(25deg);

    transition: .8s;
    z-index: 1;
}

/* Hover */
.certificate-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
}

.certificate-card:hover::before {
    height: 100%;
}

.certificate-card:hover::after {
    left: 120%;
}

/* All Content Above Animation */
.certificate-card * {
    position: relative;
    z-index: 2;
}

/* Text Color Change */
.certificate-card:hover * {
    color: #000 !important;
}

/* =========================
   TOP SECTION
========================= */

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

.certificate-top img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.cert-status {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;

    color: var(--accent);

    border: 1px solid rgba(255, 255, 255, .08);
    padding: 4px 8px;
}

/* =========================
   TITLE
========================= */

.cert-title {
    margin-top: 20px;

    font-size: 17px;
    font-weight: 700;

    line-height: 1.4;

    color: #fff;
}

/* =========================
   COMPANY
========================= */

.cert-company {
    margin-top: 14px;

    display: inline-flex;
    align-items: center;

    width: max-content;

    padding: 4px 10px;

    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;

    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;

    color: var(--accent);

    white-space: nowrap;

    transition: .3s;
}

.cert-company::before {
    content: "◈";
    font-size: 7px;
    margin-right: 6px;
}

/* =========================
   FOOTER
========================= */

.cert-footer {
    margin-top: 25px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 10px;
    color: #888;
}

.cert-link {
    color: #4ade80;
    padding: 6px 10px;
    border: 1px solid #22c55e;
    overflow: hidden;
    position: relative;
    transition: 0.4s ease;
}

/* =========================
   WATERMARK
========================= */

.certificate-card .watermark {
    position: absolute;

    right: -20px;
    bottom: -20px;

    font-size: 90px;
    font-weight: 700;

    opacity: .03;

    pointer-events: none;
    z-index: 0;
}

.cert-card::after {
    content: "";
    position: absolute;
    top: -120%;
    left: -40%;
    width: 50%;
    height: 300%;
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(25deg);
    transition: 0.8s;
}

.cert-card:hover::after {
    left: 120%;
}



.cert-link:hover::before {
    transform: scaleY(1);
}

/* Underline */
.cert-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 0%;
    height: 1px;
    background: #4ade80;
    transition: 0.3s ease;
    z-index: 1;
}

.cert-link:hover::after {
    width: 100%;
}

.cert-link span,
.cert-link {
    position: relative;
    z-index: 2;
}
  .center-back-btn {
      width: 100%;
      display: flex;
      justify-content: center;
      margin-top: 40px;
  }

  .center-back-link {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 22px;
      border: 1px solid var(--accent);
      color: var(--accent);
      font-family: monospace;
      font-size: 12px;
      text-decoration: none;
      transition: 0.3s;
  }

  .center-back-link:hover {
      background: var(--accent);
      color: black;
  }
/* ==========================================
   LIGHT THEME (Sync with index.html)
========================================== */

body.theme-light {
    background: #f7f8fb;
    color: #111827;
}

/* Navbar */
body.theme-light .top-navbar {
    background: rgba(255,255,255,.75);
    border-bottom: 1px solid rgba(0,0,0,.08);
}

/* Go Back Button */
body.theme-light .btn {
    background: #111827;
    color: #fff;
}

body.theme-light .btn::after{
    background:#111827;
}

/* Preloader */
body.theme-light #preloader{
    background:#f7f8fb;
}

/* Certificate Card */
body.theme-light .certificate-card{
    background: linear-gradient(180deg,#ffffff,#f5f5f5);
    border:1px solid #dcdcdc;
    color:#111827;
}

/* Card Text */
body.theme-light .cert-title{
    color:#111827;
}

body.theme-light .cert-footer{
    color:#555;
}

body.theme-light .cert-company{
    background:#f3f4f6;
    border:1px solid #d1d5db;
}

/* Footer */
body.theme-light .footer-note{
    border-top:1px solid #d1d5db;
}

/* Watermark */
body.theme-light .watermark{
    opacity:.06;
}

/* Hover same rahega */
body.theme-light .certificate-card:hover *{
    color:#000 !important;
}