/* Certificate Verification Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Georgia&display=swap');

:root {
  /* UI Colors */
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --primary: #1e3a8a;
  --accent: #3b82f6;
  --success: #10b981;
  --danger: #ef4444;
  --line: #e2e8f0;
  --shadow: 0 10px 25px -5px rgba(30, 58, 138, 0.1), 0 8px 10px -6px rgba(30, 58, 138, 0.1);

  /* Certificate Specific */
  --cert-bg: #ffffff;
  --cert-border: #e2e8f0;
  --cert-gold: #d4af37;
  --cert-navy: #1e293b;
  --cert-text: #334155;
  --cert-accent: #0b4ed8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(30, 58, 138, 0.05) 0px, transparent 50%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.nav-logo {
  height: 32px;
}

/* Layout */
.shell {
  width: min(1000px, calc(100% - 32px));
  margin: 40px auto;
  flex: 1;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.subtitle {
  margin: 1rem auto 0;
  color: var(--muted);
  max-width: 600px;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Search Section */
.search-section {
  max-width: 600px;
  margin: 0 auto 3rem;
}

.search-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.form {
  display: flex;
  gap: 0.75rem;
}

.input-wrapper {
  flex: 1;
  position: relative;
}

.input {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 1rem;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  color: var(--ink);
  transition: all 0.2s;
  outline: none;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.button {
  border: none;
  border-radius: 1rem;
  padding: 0 1.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  white-space: nowrap;
}

.button:hover {
  background: #1e40af;
}

.button:active {
  transform: scale(0.98);
}

.button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.status {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
  height: 1.25rem;
}

/* Error Message */
.error-result {
  margin-top: 1.5rem;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 1rem;
  padding: 1rem;
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
}

.error-icon {
  color: var(--danger);
  flex-shrink: 0;
}

#errorMessage {
  margin: 0;
  font-weight: 600;
  color: #991b1b;
  font-size: 0.875rem;
}

/* Certificate Card Styling */
.certificate-card {
  background: var(--cert-bg);
  border: 12px double var(--cert-border);
  border-radius: 8px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  margin-top: 30px;
  display: none;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.certificate-header {
  text-align: center;
  border-bottom: 2px solid var(--cert-border);
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.app-logo {
  max-height: 60px;
  width: auto;
}

.certificate-title {
  font-family: 'Georgia', serif;
  font-size: 28px;
  color: var(--cert-navy);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin: 15px 0 0;
}

.certificate-body {
  text-align: center;
  position: relative;
}

.cert-award-text {
  font-size: 18px;
  color: var(--cert-text);
  margin-bottom: 10px;
}

.student-name {
  font-family: 'Georgia', serif;
  font-size: clamp(24px, 6vw, 42px);
  font-weight: bold;
  color: var(--cert-accent);
  margin: 20px 0;
  border-bottom: 1px solid var(--cert-border);
  display: inline-block;
  padding: 0 40px 10px;
}

.cert-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--cert-text);
  max-width: 600px;
  margin: 0 auto 30px;
}

.cert-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
  border-top: 1px dashed var(--cert-border);
  padding-top: 30px;
  text-align: left;
}

.cert-meta-item label {
  display: block;
  font-weight: bold;
  color: var(--cert-navy);
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 4px;
}

.cert-meta-item span {
  font-size: 14px;
  color: var(--cert-text);
}

.verification-seal {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100px;
  height: 100px;
  border: 4px double var(--cert-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(-15deg);
  background: rgba(212, 175, 55, 0.05);
}

.seal-text {
  font-size: 10px;
  font-weight: bold;
  color: var(--cert-gold);
  text-transform: uppercase;
  line-height: 1.2;
}

.cert-footer {
  margin-top: 40px;
  text-align: center;
}

.btn-download {
  background: var(--cert-navy);
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-download:hover {
  background: var(--cert-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 78, 216, 0.2);
}

footer {
  background: white;
  border-top: 1px solid var(--line);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 640px) {
  .form { flex-direction: column; }
  .button { width: 100%; height: 3.5rem; }
  
  /* Navbar Mobile */
  .navbar { 
    padding: 0.75rem 1rem; 
    justify-content: center; /* Center brand on mobile */
  }
  .nav-brand { 
    font-size: 1rem; 
    gap: 8px; 
  }
  .nav-logo { 
    height: 24px; 
  }
  
  /* Certificate Mobile */
  .certificate-card {
    padding: 20px;
    border-width: 6px;
  }

  .certificate-header .app-logo {
    max-height: 40px;
  }
  
  .cert-details-grid {
    grid-template-columns: 1fr;
  }
  
  .verification-seal {
    position: static;
    margin: 30px auto 0;
    transform: none;
  }
}
