.header {
  width: 100%;
  height: 100vh;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("../../assets/images/home-hero-bg.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
}

.content {
  width: 100%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  color: #fff;
}

.content h1 {
  font-size: 50px;
  margin-top: 80px;
}

.content p {
  margin: 20px 0;
  font-size: 25px;
  font-weight: 200;
  line-height: 25px;
}

.space-link {
  display: inline-block;
  text-decoration: none;
  padding: 12px 34px;
  border: 1px solid rgb(255, 255, 255);
  background: transparent;
  color: #fff;
  cursor: pointer;
  position: relative;
  font-size: 15px;
  border-radius: 55px;
}

.space-link:hover {
  border: 1px solid #4d4177;
  background: #4d4177;
  transition: 0.8s;
}

@media (max-width: 700px) {
  .content h1 {
    font-size: 20px;
  }
  .content p {
    font-size: 14px;
  }
}

/* --- Academy Dashboard Styles --- */
.dashboard-card {
  background: rgba(26, 24, 51, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 127, 255, 0.3);
  border-radius: 20px;
  padding: 25px;
  margin: 30px auto;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
  animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-info {
  display: flex;
  align-items: center;
  gap: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}

.rank-badge {
  background: linear-gradient(135deg, #8b7fff, #4d4177);
  padding: 15px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.rank-badge i {
  font-size: 24px;
  margin-bottom: 5px;
}

.rank-badge span {
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.xp-bar-container {
  flex-grow: 1;
}

.xp-label {
  font-size: 14px;
  margin-bottom: 8px;
  text-align: left;
  color: #b38bff;
  font-weight: bold;
}

.xp-bar {
  background: rgba(255, 255, 255, 0.1);
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
}

.xp-progress {
  background: linear-gradient(90deg, #8b7fff, #00ff88);
  height: 100%;
  transition: width 1s ease-in-out;
  box-shadow: 0 0 10px rgba(139, 127, 255, 0.5);
}

.mission-stats {
  display: flex;
  justify-content: space-around;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #00ff88;
}

.stat-label {
  font-size: 12px;
  color: #ccc;
  text-transform: uppercase;
}

/* --- Greeting Styles --- */
.greeting-text {
  color: #b38bff;
  font-weight: bold;
  margin-right: 15px;
  font-family: "Roboto Slab", serif;
}

.logout-btn {
  background: transparent;
  border: 1px solid #ff4d4d;
  color: #ff4d4d;
  padding: 5px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.logout-btn:hover {
  background: #ff4d4d;
  color: white;
}

@media (max-width: 700px) {
  .dashboard-card {
    padding: 15px;
    margin: 20px 10px;
  }
  .user-info {
    flex-direction: column;
    gap: 15px;
  }
}

.topics {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 50px 20px;
  gap: 30px;
}

.card {
  background: #1a1833;
  width: calc(50% - 50px);
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  transition: 0.5s;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
  height: 600px; /* Adjusted height for tag */
  position: relative;
  overflow: hidden;
}

.mission-status-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(139, 127, 255, 0.8);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  z-index: 10;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mission-cleared {
  border: 1px solid #00ff88;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.card img {
  width: 100%;
  border-radius: 10px;
  height: 398px;
  object-fit: cover;
}

.card h2 {
  margin: 15px 0;
  font-size: 26px;
}

.card p {
  font-size: 15px;
  color: #ccc;
  margin-bottom: 20px;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 20px rgba(100, 90, 180, 0.05);
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  margin-bottom: 10px;
  background-color: transparent;
  border: 2px solid #8b7fff;
  color: white;
  border-radius: 30px;
  text-decoration: none;
  transition: 0.8s;
}

.btn:hover {
  background: #8b7fff;
  box-shadow: 0 0 10px #8b7fff;
}

@media (max-width: 700px) {
  .card {
    width: 100%;
  }
}

/* --- Certificate & Modal Styles --- */
.claim-cert-btn {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #000;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 15px;
  transition: 0.3s;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
  }
}

.cert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(10px);
}

.cert-container {
  position: relative;
  width: 90%;
  max-width: 800px;
  background: #0a0a1a;
  padding: 40px;
  border-radius: 15px;
  border: 4px double #ffd700;
  box-shadow: 0 0 50px rgba(139, 127, 255, 0.2);
  text-align: center;
  color: #fff;
}

.cert-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.certificate {
  background-image: radial-gradient(circle at center, #1a1a3a 0%, #0a0a1a 100%);
  border: 10px solid transparent;
  border-image: linear-gradient(to bottom right, #ffd700, #8b7fff, #ffd700) 1;
  padding: 40px;
  position: relative;
}

.cert-header h1 {
  font-family: "Roboto Slab", serif;
  color: #ffd700;
  font-size: 36px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.cert-header p {
  font-size: 14px;
  color: #8b7fff;
  letter-spacing: 2px;
}

.cert-body {
  margin: 40px 0;
}

.cert-body p {
  font-size: 18px;
  font-style: italic;
}

.cert-name {
  font-size: 48px;
  font-family: "Roboto Slab", serif;
  color: #fff;
  margin: 20px 0;
  text-decoration: underline;
  text-decoration-color: #ffd700;
}

.cert-text {
  font-size: 16px;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 50px;
}

.signature {
  border-top: 1px solid #ffd700;
  padding-top: 10px;
  width: 200px;
  font-size: 14px;
  font-family: "Brush Script MT", cursive;
  font-style: normal;
}

.seal {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, #ffd700 0%, #b8860b 100%);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #000;
  font-size: 32px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.cert-actions {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  justify-content: center;
}

@media print {
  body * {
    visibility: hidden;
  }
  .cert-overlay,
  .cert-container,
  .certificate,
  .certificate * {
    visibility: visible;
  }
  .cert-overlay {
    position: absolute;
    left: 0;
    top: 0;
    background: white;
    padding: 0;
  }
  .cert-container {
    border: none;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
    padding: 0;
  }
  .cert-actions,
  .cert-close {
    display: none;
  }
  .certificate {
    border: 20px solid #000;
    background: white !important;
    color: black !important;
  }
  .cert-name {
    color: #000 !important;
  }
  .cert-header h1 {
    color: #000 !important;
  }
}
