/* ==================================
   VARIABLES & DESIGN SYSTEM
================================== */
:root {
  /* Colors - Mystic Forest Theme */
  --bg-dark: #0f1715;
  --bg-gradient: radial-gradient(circle at top right, #1b2f2b, #0f1715);
  
  --primary-color: #2b7058; /* Emerald Green */
  --primary-hover: #3d8a70;
  --secondary-color: #8b6b3d; /* Earthy Gold */
  
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-active: #ffffff;
  
  --glass-bg: rgba(26, 43, 39, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 12px;
  
  /* Typography */
  --font-hero: 'Cinzel', serif;
  --font-ui: 'Inter', sans-serif;
  
  /* Shadows */
  --shadow-glow: 0 0 20px rgba(43, 112, 88, 0.2);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 50px;
  
  /* Layout constraints for blogger container */
  --max-width: 1200px;
}

/* ==================================
   RESET & BASE STRUCTURE
================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-ui);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-hero);
  font-weight: 600;
  color: var(--text-active);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Base Wrapper that will be inside Blogger */
#therian-app-root {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--bg-gradient);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==================================
   GLASSMORPHISM UTILS
================================== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

/* ==================================
   NAVBAR
================================== */
nav.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  background: rgba(15, 23, 21, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 100;
}

.nav-brand {
  font-family: var(--font-hero);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-active);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand i { 
  color: var(--primary-color);
}

.nav-brand span { 
  color: var(--text-muted); font-weight: 400; 
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-links a.active, .nav-links a:hover {
  color: var(--text-active);
}

/* ==================================
   BUTTONS
================================== */
.btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(43, 112, 88, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-active);
  border: 1px solid var(--glass-border);
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
}

.btn-text:hover { color: var(--text-active); }

/* ==================================
   MAIN CONTENT AREA
================================== */
main#app-content {
  flex: 1;
  padding-top: 90px; /* Offset for fixed nav */
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: 50px;
  /* View transition animation */
  animation: fadeIn 0.4s ease forwards;
}

/* ==================================
   HERO SECTION
================================== */
.hero {
  text-align: center;
  padding: 80px 20px;
  position: relative;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, #8b6b3d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 60px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-family: var(--font-hero);
  font-size: 2rem;
  color: var(--text-active);
  font-weight: 700;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==================================
   SECTION GRIDS (Events, Users, etc)
================================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 60px 0 20px 0;
  padding: 0 20px;
}

.section-header h2 {
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 0 20px;
}

/* ==================================
   CARDS
================================== */
.card {
  padding: 24px;
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
}

.card-title {
  font-family: var(--font-hero);
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text-active);
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.8rem;
  color: var(--primary-color);
}

/* User Card specifically */
.user-card {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.user-info h4 { margin: 0; font-size: 1.1rem; }
.user-info p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.badge-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(139, 107, 61, 0.2);
  color: var(--secondary-color);
  border-radius: 4px;
  font-size: 0.7rem;
  margin-top: 5px;
}

/* ==================================
   FORMS & AUTHENTICATION WIZARD
================================== */
.auth-container {
  max-width: 500px;
  margin: 40px auto;
  padding: 40px;
  text-align: center;
}

.auth-container h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.auth-container p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  color: var(--text-active);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* ==================================
   WIZARD OPTIONS (Radio cards)
================================== */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

.options-grid.col-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.option-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 20px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.option-card i {
  font-size: 24px;
  color: var(--text-muted);
}

.option-card span {
  font-weight: 500;
  font-size: 0.9rem;
}

.option-card.selected {
  border-color: var(--primary-color);
  background: rgba(43, 112, 88, 0.1);
  box-shadow: 0 0 15px rgba(43, 112, 88, 0.2);
}

.option-card.selected i, .option-card.selected span {
  color: var(--text-active);
}

/* ==================================
   LOADER & TOAST
================================== */
.loader-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-dark);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.4s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 20px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==================================
   RESPONSIVE
================================== */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .options-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; /* In a real app, add a hamburger menu */ }
}
