
:root {
  /* Light Theme Color Palette */
  --bg-main:linear-gradient(135deg, #1a1a1a, #434343);
  --accent-color-css2: #27ae60;
  --card-bg: #ffffff;
  --accent-blue: #2563eb;
  --accent-cyan: #0284c7;
  --accent-purple: #7c3aed;
  
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  
  --success-green: #16a34a;
  --gold-badge: #d97706;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif
}

body {
  background: var(--bg-main);
  color: var(--text-dark);
  min-height: 100vh;
}

* --- NAVBAR UPDATED --- */
.navbar {
    background: var(--primary-gradient);
    position: static;
    top: 0;
    z-index: 1100;
    width: 100%;
}

.nav-top {
    display: flex;
    justify-content: center; /* Desktop par logo center rahega */
    align-items: center;
    padding: 20px 5%;
    position: relative;
}

.logo {
    color: white;
    font-size: 2.2rem;
    letter-spacing: 1px;
    text-align: center;
}
/* --- Desktop Nav Links --- */

.nav-links {
    display: flex;
    list-style: none;
    background: rgba(0,0,0,0.1);
    width: 100%;
    justify-content: center;
    padding: 15px 0;
    margin: 10;
    transition: 0.4s ease;
}

.nav-links li { margin: 0 1px; }

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    padding: 8px 18px;
    margin: 0 10px;
    transition: 0.3s;
    display: block;
}

.nav-links a:hover, .nav-links a.active {
    background: var(--accent-color-css2);
    color: white !important;
    border-radius: 5px;
}

.sidebar-header { display:none; } /* Mobile Only */

/* --- Mobile Styling (Responsive) --- */
@media (max-width: 900px) {
.hamburger-menu {
    display: flex; /* Desktop par hide rahega */
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    cursor: pointer;
    position: absolute;
    left: 25px; /* Logo ke left side mein position karne ke liye */
    z-index: 1300;
}
    .logo { font-size: 1.4rem; padding-left: 40px; } /* Adjust logo size */
    .bar {
    width: 100%;
    height: 3px;
    background-color: white; /* Line ka color */
    border-radius: 10px;
    transition: 0.3s;
}

    .nav-links {
        position: fixed;
        left: -100%; /* Hide Sidebar */
        top: 0;
        width: 200px;
        height: 100vh;
        background: #1a1a1a;
        flex-direction: column;
        justify-content: flex-start;
        padding: 90px 0;
        z-index: 1200;
        box-shadow: 10px 0 30px rgba(0,0,0,0);
    }

    .nav-links.active { left: 0; } /* Show Sidebar */

    .nav-links li { width: 100%; margin: 10px 0; }

    .sidebar-header {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }

    #closeMenu {
        color: white;
        font-size: 3rem;
        cursor: pointer;
        line-height: 1;
    }

    /* Background Overlay */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.7);
        z-index: 1150;
    }
    .menu-overlay.active { display: block; }
}

/* --- LIGHT GRADIENT MESH WRAPPER --- */
.gradient-wrapper {
  width: 100%;
  min-height: 100vh;
  padding-top: 100px;
  padding-bottom: 50px;
  
  /* Vibrant & Clean Light Mesh Gradient Background */
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(219, 234, 254, 0.8) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(237, 233, 254, 0.8) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(224, 242, 254, 0.6) 0px, transparent 50%);
}

.content-container {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- LIGHT SEARCH CARD --- */
.search-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 35px;
  position: relative;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-light);
}

.glowing-border::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  z-index: -1;
  opacity: 0.15;
  filter: blur(6px);
}

.card-header { text-align: center; margin-bottom: 25px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  color: var(--accent-blue);
  border: 1px solid #bfdbfe;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.input-box { position: relative; }

.icon-field {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-blue);
}

.input-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.input-box input:focus {
  background: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Button Styling */
.premium-gradient-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
  transition: all 0.3s ease;
}

.premium-gradient-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
}

.hidden { display: none !important; }

.loader-box { text-align: center; margin-top: 20px; color: var(--text-muted); }

.spinner {
  width: 26px; height: 26px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.error-card {
  margin-top: 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 14px;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: #991b1b;
}

/* --- RESULT SECTION --- */
.result-section { margin-top: 35px; }

.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.status-indicator {
  background: #dcfce7;
  color: var(--success-green);
  border: 1px solid #bbf7d0;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.8rem;
}

.btn-group { display: flex; gap: 8px; }

.btn-action {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.btn-action.primary { background: var(--text-dark); color: #fff; }
.btn-action.secondary { background: #e2e8f0; color: var(--text-dark); }

/* Printable Certificate Canvas */
.official-certificate {
  background: #ffffff;
  color: var(--text-dark);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-light);
}

.cert-border {
  border: 3px double var(--accent-blue);
  padding: 25px;
  border-radius: 10px;
  position: relative;
  background: #fafafa;
}

.watermark-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-family: 'Cinzel', serif;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(37, 99, 235, 0.04);
  pointer-events: none;
  white-space: nowrap;
}

.cert-header { text-align: center; border-bottom: 2px solid #e2e8f0; padding-bottom: 15px; margin-bottom: 20px; }

.gold-badge {
  width: 45px; height: 45px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin: 0 auto 8px;
}

.cert-header h2 { font-family: 'Cinzel', serif; font-size: 1.2rem; color: var(--text-dark); }
.cert-header .sub-text { font-size: 0.75rem; color: var(--text-muted); }

.cert-title-badge {
  display: inline-block; margin-top: 10px;
  background: var(--text-dark); color: #fff;
  padding: 4px 14px; font-size: 0.68rem; font-weight: 800; border-radius: 15px;
}

.cert-body { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.data-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.data-cell {
  background: #ffffff; padding: 10px 14px;
  border-radius: 8px; border: 1px solid #e2e8f0; border-left: 4px solid var(--accent-blue);
}

.data-cell.highlight-cell { background: #ffffff; }
.data-cell.grade-cell { background: #ffffff; border-left-color: var(--accent-blue); }

.data-cell .label { display: block; font-size: 0.65rem; color: var(--text-muted); font-weight: 800; }
.data-cell .value { font-size: 0.88rem; font-weight: 700; color: var(--text-dark); }
.data-cell .name-val { color: var(--text-dark); font-size: 1rem; }
.data-cell .grade-val { color: var(--text-dark); }

.cert-footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  border-top: 2px dashed #e2e8f0; padding-top: 15px;
}

.qr-box img { width: 65px; height: 65px; border: 1px solid #ddd; padding: 2px; border-radius: 6px; }
.qr-box span { display: block; font-size: 0.6rem; color: var(--text-muted); text-align: center; margin-top: 4px; }

.sign-box { text-align: center; }

/* Digital Font Signature Effect */
.digital-signature {
  font-family: 'Dancing Script', cursive;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: -4px;
  transform: rotate(-3deg);
}

.sign-line { width: 110px; height: 2px; background: var(--text-dark); margin: 0 auto 4px; }
.sign-box span { font-size: 0.75rem; font-weight: 700; display: block; }
.sign-box small { font-size: 0.65rem; color: var(--text-muted); }