/* ==========================================================================
   DAILYRITUAL PORTAL GATEWAY CSS
   Aesthetic: Ultra-Premium Cosmos Dark, HSL Gradients, Glassmorphism, Micro-motions
   ========================================================================== */

:root {
  /* Colors */
  --bg-primary: #05070c;
  --bg-card: rgba(13, 19, 33, 0.45);
  --border-color: rgba(255, 255, 255, 0.05);
  --text-main: #f8fafc;
  --text-dim: #cbd5e1;
  --text-muted: #64748b;
  
  /* HSL Neon Colors for Categories & Cards */
  --purple-glow: hsla(270, 85%, 60%, 0.12);
  --purple-border: hsla(270, 85%, 60%, 0.25);
  --purple-text: #a78bfa;

  --blue-glow: hsla(210, 90%, 55%, 0.12);
  --blue-border: hsla(210, 90%, 55%, 0.25);
  --blue-text: #60a5fa;

  --orange-glow: hsla(24, 95%, 55%, 0.12);
  --orange-border: hsla(24, 95%, 55%, 0.25);
  --orange-text: #fb923c;

  --emerald-glow: hsla(150, 80%, 45%, 0.12);
  --emerald-border: hsla(150, 80%, 45%, 0.25);
  --emerald-text: #34d399;

  --rose-glow: hsla(335, 85%, 55%, 0.12);
  --rose-border: hsla(335, 85%, 55%, 0.25);
  --rose-text: #f472b6;

  /* Accent Gradient Theme */
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #3b82f6 100%);
  --accent-primary: #8b5cf6;
  --accent-secondary: #ec4899;
  
  /* Borders and Shadow radii */
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-glow: 0 15px 35px -5px rgba(0, 0, 0, 0.8), 0 0 25px 0px rgba(139, 92, 246, 0.05);
  
  /* Transitions */
  --transition-normal: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   BACKGROUND MESH GRADIENTS (Glow Orbs)
   ========================================================================== */
.mesh-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #0c0f1b 0%, #05070c 100%);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
  mix-blend-mode: screen;
  pointer-events: none;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: #7c3aed;
  top: -100px;
  left: -100px;
  animation: floatOrb 25s infinite alternate ease-in-out;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: #db2777;
  bottom: -200px;
  right: -100px;
  animation: floatOrb 30s infinite alternate-reverse ease-in-out;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: #2563eb;
  top: 40%;
  left: 45%;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
  100% { transform: translate(-40px, 50px) scale(0.9); }
}

/* ==========================================================================
   PORTAL CONTAINER & STRUCTURE
   ========================================================================== */
.portal-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Portal Header */
.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 60px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.svg-logo {
  width: 100%;
  height: 100%;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  font-weight: 400;
  opacity: 0.85;
}

.header-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   HERO PORTAL INTRO
   ========================================================================== */
.hero-section {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 18px;
}

.hero-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-dim);
  opacity: 0.85;
}

/* ==========================================================================
   NAVIGATION CATEGORY FILTER TABS
   ========================================================================== */
.filter-section {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}

.filter-tab-bar {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

.filter-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-main);
}

.filter-btn.active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.3);
  border: 0.5px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   SPACES CARDS GRID
   ========================================================================== */
.spaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 28px;
  margin-bottom: 60px;
}

/* Individual Space Card Styles */
.space-card {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.space-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
  pointer-events: none;
}

/* Reactive Glow layer following card properties */
.card-glow-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(800px circle at var(--x, 50%) var(--y, 50%), var(--card-glow, rgba(139, 92, 246, 0.08)), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.space-card:hover .card-glow-layer {
  opacity: 1;
}

.space-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-border, rgba(139, 92, 246, 0.3));
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 35px 2px var(--card-glow);
}

.card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Header within Card */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.space-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
}

.space-card:hover .space-icon {
  transform: scale(1.08) rotate(4deg);
}

.space-icon svg {
  width: 22px;
  height: 22px;
}

/* Dynamic theme setups for icons */
.purple-theme { background: rgba(139, 92, 246, 0.1); color: var(--purple-text); }
.blue-theme   { background: rgba(37, 99, 235, 0.1); color: var(--blue-text); }
.orange-theme { background: rgba(249, 115, 22, 0.1); color: var(--orange-text); }
.emerald-theme{ background: rgba(16, 185, 129, 0.1); color: var(--emerald-text); }
.rose-theme   { background: rgba(244, 63, 94, 0.1); color: var(--rose-text); }

/* Status Badges */
.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 50px;
}

.badge-active {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.badge-future {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Card titles and desc */
.space-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.space-description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-dim);
  opacity: 0.85;
  margin-bottom: 28px;
  flex-grow: 1;
}

/* Space Footer details */
.space-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.tech-stack {
  display: flex;
  gap: 8px;
}

.tech-stack span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Launch buttons */
.launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.launch-btn svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.launch-btn:hover svg {
  transform: translate(2px, -2px);
}

/* Button colors */
.purple-btn {
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple-text);
  border-color: rgba(139, 92, 246, 0.2);
}

.purple-btn:hover {
  background: #8b5cf6;
  color: #fff;
  box-shadow: 0 8px 20px -4px rgba(139, 92, 246, 0.5);
}

.orange-btn {
  background: rgba(249, 115, 22, 0.1);
  color: var(--orange-text);
  border-color: rgba(249, 115, 22, 0.2);
}

.orange-btn:hover {
  background: #f97316;
  color: #fff;
  box-shadow: 0 8px 20px -4px rgba(249, 115, 22, 0.5);
}

.blue-btn {
  background: rgba(96, 165, 250, 0.1);
  color: var(--blue-text);
  border-color: rgba(96, 165, 250, 0.2);
}

.blue-btn:hover {
  background: #60a5fa;
  color: #fff;
  box-shadow: 0 8px 20px -4px rgba(96, 165, 250, 0.5);
}

.emerald-btn {
  background: rgba(52, 211, 153, 0.1);
  color: var(--emerald-text);
  border-color: rgba(52, 211, 153, 0.2);
}

.emerald-btn:hover {
  background: #34d399;
  color: #fff;
  box-shadow: 0 8px 20px -4px rgba(52, 211, 153, 0.5);
}

.disabled-btn {
  background: rgba(255, 255, 255, 0.01) !important;
  color: var(--text-muted) !important;
  border-color: var(--border-color) !important;
  cursor: not-allowed;
}

/* ==========================================================================
   PORTAL FOOTER AREA
   ========================================================================== */
.portal-footer {
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  margin-top: 60px;
}

.portal-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   GRID FILTER ANIMATIONS STYLES
   ========================================================================== */
.space-card.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.95);
}

/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATIONS
   ========================================================================== */
@media (max-width: 768px) {
  .portal-wrapper {
    padding: 24px 16px 40px;
  }
  
  .portal-header {
    margin-bottom: 40px;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
  }
  
  .spaces-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .space-card {
    padding: 24px;
  }
}
