/* Global Reset & Styling Variables */
:root {
  --primary-color: #f15a24; /* Sunset orange */
  --primary-glow: rgba(241, 90, 36, 0.4);
  --secondary-color: #ff9f1c; /* Saffron gold */
  --dark-blue: #0b132b; /* Deep spiritual dark blue */
  --text-main: #1c2541;
  --text-muted: #5c677d;
  --bg-gradient-start: #fbf5f0;
  --bg-gradient-end: #eeddd3;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-main: 0 15px 35px rgba(0, 0, 0, 0.08);
  --shadow-premium: 0 25px 50px rgba(11, 19, 43, 0.12);
  --border-radius: 24px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Background Decorative Circles */
.background-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}

.circle-1 {
  width: 350px;
  height: 350px;
  background: var(--secondary-color);
  top: -100px;
  right: -50px;
}

.circle-2 {
  width: 400px;
  height: 400px;
  background: var(--primary-color);
  bottom: -150px;
  left: -100px;
}

/* Container & Base Card */
.container {
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 1;
  margin-bottom: 40px;
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-premium);
  padding: 30px;
  width: 100%;
  transition: var(--transition);
  animation: cardFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.hidden {
  display: none !important;
}

/* Loading Spinner */
.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 30px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(241, 90, 36, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error Card */
.error-card {
  text-align: center;
  padding: 50px 30px;
}

.error-icon {
  font-size: 56px;
  color: #e63946;
  margin-bottom: 20px;
}

.error-card h2 {
  font-weight: 800;
  font-size: 26px;
  color: var(--dark-blue);
  margin-bottom: 10px;
}

.error-card p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  border-bottom: 1px dashed rgba(28, 37, 65, 0.1);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.card-header .logo {
  height: 48px;
  width: auto;
  margin-right: 15px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

.card-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark-blue);
  letter-spacing: 0.5px;
}

.card-header p {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* Verification Badge */
.verification-badge {
  background: #d4edda;
  color: #155724;
  border-radius: 30px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  border: 1px solid #c3e6cb;
}

.verification-badge i {
  font-size: 14px;
}

/* Profile Hero */
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 30px;
}

.avatar-container {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 10px 25px rgba(241, 90, 36, 0.25);
  margin-bottom: 15px;
  position: relative;
}

.avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #f7f7f7;
}

#devotee-name {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 28px;
  color: var(--dark-blue);
  margin-bottom: 4px;
}

.initiated-name-label {
  font-size: 16px;
  font-weight: 400;
  color: var(--primary-color);
  font-style: italic;
  margin-bottom: 12px;
}

.meta-row {
  display: flex;
  gap: 10px;
}

.badge {
  background: rgba(28, 37, 65, 0.05);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge-id {
  background: var(--dark-blue);
  color: #fff;
}

/* Info Sections */
.details-section {
  border-top: 1px dashed rgba(28, 37, 65, 0.1);
  padding-top: 25px;
  margin-bottom: 25px;
}

.section-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--dark-blue);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.3px;
}

.section-title i {
  color: var(--primary-color);
  font-size: 16px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item.full-width {
  grid-column: span 2;
}

.detail-item .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.detail-item .value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  word-wrap: break-word;
}

.text-highlight {
  color: var(--primary-color) !important;
}

/* Course Completion Cards */
.courses-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.course-badge {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(28, 37, 65, 0.08);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.course-badge.completed {
  background: rgba(79, 110, 138, 0.05);
  border-color: rgba(241, 90, 36, 0.2);
}

.course-badge i {
  font-size: 14px;
  color: var(--text-muted);
}

.course-badge.completed i {
  color: #2b9348;
}

.course-badge span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

/* Seva Action Panel */
.action-panel {
  background: linear-gradient(135deg, rgba(241, 90, 36, 0.06) 0%, rgba(255, 159, 28, 0.06) 100%);
  border: 1px solid rgba(241, 90, 36, 0.1);
  border-radius: 20px;
  padding: 20px;
  margin-top: 25px;
  margin-bottom: 25px;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.4;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(241, 90, 36, 0.35);
}

.btn-secondary {
  background: var(--dark-blue);
  color: white;
  border: none;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: #152044;
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(28, 37, 65, 0.2);
}

.btn-outline:hover {
  background: rgba(28, 37, 65, 0.03);
}

/* Footer */
.card-footer {
  text-align: center;
  border-top: 1px dashed rgba(28, 37, 65, 0.1);
  padding-top: 20px;
  margin-top: 25px;
  font-size: 11px;
  color: var(--text-muted);
}

.card-footer p {
  margin-bottom: 4px;
}

.footer-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

.text-center {
  text-align: center;
  justify-content: center;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  .card {
    padding: 20px;
    border-radius: 18px;
  }
  #devotee-name {
    font-size: 24px;
  }
  .details-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .detail-item.full-width {
    grid-column: span 1;
  }
  .courses-container {
    grid-template-columns: 1fr;
  }
}
