@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0e17;
  --bg-panel: rgba(15, 25, 35, 0.7);
  --bg-panel-hover: rgba(15, 25, 35, 0.95);
  --text: #d4e0ed;
  --text-dim: rgba(212, 224, 237, 0.6);
  --cyan: #00ffcc;
  --green: #00ff9f;
  --border: rgba(0, 255, 204, 0.15);
  --border-hover: rgba(0, 255, 204, 0.5);
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  /* Cyber grid background */
  background-image: linear-gradient(rgba(0, 255, 204, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0, 255, 204, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0, 255, 204, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* Selection */
::selection { background-color: var(--cyan); color: #000; }
::-moz-selection { background-color: var(--cyan); color: #000; }

/* Topbar */
.topbar {
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cyan);
  text-decoration: none;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 4px;
}

.back-link:hover {
  background: rgba(0, 255, 204, 0.08);
  border-color: var(--border-hover);
  box-shadow: 0 0 10px rgba(0, 255, 204, 0.15);
}

.back-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s;
}

.back-link:hover svg {
  transform: translateX(-4px);
}

/* Container */
.container {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
  width: 100%;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 5rem;
}

/* Glitch Title Effect */
.glitch-title {
  font-family: 'Fira Code', monospace;
  font-size: clamp(2rem, 6vw, 4rem);
  color: #fff;
  position: relative;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 1rem;
  text-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
}

.glitch-title::before, .glitch-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch-title::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-title::after {
  left: -2px;
  text-shadow: -2px 0 var(--cyan);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(21px, 9999px, 52px, 0); }
  5% { clip: rect(33px, 9999px, 14px, 0); }
  10% { clip: rect(40px, 9999px, 68px, 0); }
  15% { clip: rect(61px, 9999px, 11px, 0); }
  20% { clip: rect(7px, 9999px, 64px, 0); }
  25% { clip: rect(21px, 9999px, 4px, 0); }
  30% { clip: rect(6px, 9999px, 41px, 0); }
  35% { clip: rect(32px, 9999px, 3px, 0); }
  40% { clip: rect(52px, 9999px, 63px, 0); }
  45% { clip: rect(34px, 9999px, 31px, 0); }
  50% { clip: rect(11px, 9999px, 47px, 0); }
  55% { clip: rect(52px, 9999px, 64px, 0); }
  60% { clip: rect(30px, 9999px, 2px, 0); }
  65% { clip: rect(52px, 9999px, 19px, 0); }
  70% { clip: rect(5px, 9999px, 4px, 0); }
  75% { clip: rect(51px, 9999px, 60px, 0); }
  80% { clip: rect(30px, 9999px, 61px, 0); }
  85% { clip: rect(35px, 9999px, 3px, 0); }
  90% { clip: rect(6px, 9999px, 36px, 0); }
  95% { clip: rect(66px, 9999px, 61px, 0); }
  100% { clip: rect(15px, 9999px, 53px, 0); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(29px, 9999px, 65px, 0); }
  5% { clip: rect(3px, 9999px, 2px, 0); }
  10% { clip: rect(36px, 9999px, 22px, 0); }
  15% { clip: rect(61px, 9999px, 54px, 0); }
  20% { clip: rect(1px, 9999px, 14px, 0); }
  25% { clip: rect(35px, 9999px, 64px, 0); }
  30% { clip: rect(4px, 9999px, 21px, 0); }
  35% { clip: rect(18px, 9999px, 44px, 0); }
  40% { clip: rect(51px, 9999px, 31px, 0); }
  45% { clip: rect(25px, 9999px, 68px, 0); }
  50% { clip: rect(40px, 9999px, 25px, 0); }
  55% { clip: rect(1px, 9999px, 20px, 0); }
  60% { clip: rect(34px, 9999px, 13px, 0); }
  65% { clip: rect(32px, 9999px, 62px, 0); }
  70% { clip: rect(60px, 9999px, 55px, 0); }
  75% { clip: rect(54px, 9999px, 4px, 0); }
  80% { clip: rect(35px, 9999px, 16px, 0); }
  85% { clip: rect(27px, 9999px, 44px, 0); }
  90% { clip: rect(19px, 9999px, 39px, 0); }
  95% { clip: rect(3px, 9999px, 13px, 0); }
  100% { clip: rect(44px, 9999px, 32px, 0); }
}

.subtitle {
  color: var(--text-dim);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

/* Cert Grid */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

/* Cert Card */
.cert-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.cert-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 255, 204, 0.15);
  background: var(--bg-panel-hover);
}

.cert-card:hover::before {
  transform: translateX(100%);
}

.cert-content {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.cert-icon {
  width: 56px;
  height: 56px;
  background: rgba(0, 255, 204, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 15px rgba(0, 255, 204, 0.05);
  transition: all 0.3s;
}

.cert-card:hover .cert-icon {
  background: rgba(0, 255, 204, 0.15);
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.2);
  transform: scale(1.05);
}

.cert-icon svg {
  width: 28px;
  height: 28px;
}

.cert-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.cert-date {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.cert-status {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
}

.cert-status.verified {
  background: rgba(0, 255, 159, 0.15);
  color: var(--green);
  border: 1px solid rgba(0, 255, 159, 0.3);
  box-shadow: 0 0 10px rgba(0, 255, 159, 0.1);
}

.cert-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.cert-issuer {
  color: var(--cyan);
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

.cert-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  flex-grow: 1;
}

.cert-actions {
  margin-top: auto;
}

.cyber-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem;
  background: transparent;
  border: 1px dashed var(--cyan);
  color: var(--cyan);
  font-family: 'Fira Code', monospace;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  z-index: 1;
}

.cyber-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 0; height: 100%;
  background: rgba(0, 255, 204, 0.15);
  z-index: -1;
  transition: width 0.3s ease;
}

.cyber-btn:hover {
  border-style: solid;
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
  text-shadow: 0 0 5px rgba(0, 255, 204, 0.5);
  transform: translateY(-2px);
}

.cyber-btn:hover::before {
  width: 100%;
}

/* Locked Card for future */
.cert-card.locked {
  border-style: dashed;
  opacity: 0.6;
}

.cert-card.locked:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 224, 237, 0.3);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.cert-card.locked .cert-icon {
  color: var(--text-dim);
  border-color: rgba(212, 224, 237, 0.2);
  background: rgba(212, 224, 237, 0.05);
  box-shadow: none;
}

.cert-card.locked .cert-title { color: var(--text-dim); }
.cert-card.locked .cert-issuer { color: rgba(212, 224, 237, 0.4); }

.locked-badge {
  background: rgba(212, 224, 237, 0.1);
  color: var(--text-dim);
  border: 1px solid rgba(212, 224, 237, 0.2);
}

.cyber-btn.disabled {
  border-color: rgba(212, 224, 237, 0.2);
  color: var(--text-dim);
  cursor: not-allowed;
}
.cyber-btn.disabled:hover {
  transform: none;
  border-style: dashed;
  box-shadow: none;
  text-shadow: none;
}
.cyber-btn.disabled:hover::before { width: 0; }

/* Cyber Footer */
.cyber-footer {
  margin-top: auto;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  background: rgba(10, 14, 23, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  backdrop-filter: blur(10px);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  font-family: 'Fira Code', monospace;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: 1px solid transparent;
}

.footer-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -1px;
  left: 0;
  background-color: var(--cyan);
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: var(--cyan);
  border-color: rgba(0, 255, 204, 0.3);
  background: rgba(0, 255, 204, 0.05);
}

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

.footer-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .topbar {
    padding: 1rem;
  }
  .container {
    padding: 3rem 1.5rem;
  }
  .hero {
    margin-bottom: 3.5rem;
  }
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    gap: 0.8rem;
    display: grid;
    grid-auto-flow: column;
    justify-content: center;
  }
  .footer-link {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
  }
  .social-text {
    display: none;
  }
  .footer-link svg {
    margin: 0;
  }
  .footer-link::after {
    display: none;
  }
}
