:root {
  --bg-color: #030305;
  --surface-color: rgba(255, 255, 255, 0.02);
  --surface-color-hover: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-color: #6366f1;
  --accent-gradient: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  --glow-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

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

body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Dynamic animated background */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.06) 0%, rgba(0,0,0,0) 40%),
              radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.04) 0%, rgba(0,0,0,0) 40%);
  z-index: -1;
  pointer-events: none;
  animation: bgPulse 15s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.1) translate(-2%, 2%); }
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--accent-gradient);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.app-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
}

/* Views Management */
.view {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.view.active-view {
  display: block;
  opacity: 1;
}

@keyframes slideExitLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-100px); }
}
@keyframes slideEnterRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideExitRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100px); }
}
@keyframes slideEnterLeft {
  from { opacity: 0; transform: translateX(-100px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Ultra premium glass panel */
.glass-panel {
  background: var(--surface-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  position: relative;
}

.title-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  line-height: 1.2;
}

/* Dashboard */
.dashboard-header {
  text-align: center;
  margin: 5rem 0;
}

.dashboard-header h1 {
  font-size: 4.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -2px;
}

.dashboard-header p {
  color: var(--text-muted);
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

/* Animated Cards */
.app-card {
  padding: 2.5rem;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

/* Animated Border Gradient trick */
.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: var(--accent-gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.app-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: var(--surface-color-hover);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), var(--glow-shadow);
}

.app-card:hover::before {
  opacity: 1;
}

.app-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 20px rgba(255,255,255,0.02);
  transition: all 0.5s ease;
}

.app-card:hover .app-card-icon {
  transform: scale(1.15) rotate(10deg);
  box-shadow: inset 0 0 20px rgba(255,255,255,0.1);
}

.app-card h3 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.app-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #818cf8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* App Details Premium Button */
.premium-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-main);
  background: var(--surface-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.6rem 1.5rem;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.premium-back-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: all 0.5s ease;
}

.premium-back-btn:hover {
  transform: translateX(-5px);
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 10px 25px rgba(168, 85, 247, 0.2);
}

.premium-back-btn:hover i {
  transform: translateX(-4px);
}

.premium-back-btn:hover::before {
  left: 200%;
}

.premium-back-btn i {
  transition: transform 0.3s ease;
}

.details-header {
  margin-bottom: 4rem;
  padding: 3rem;
}

.details-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.details-title-row h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.details-title-row p {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent-gradient);
  color: white;
  padding: 1rem 2rem;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(129, 140, 248, 0.3);
}

.primary-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 40px rgba(129, 140, 248, 0.5);
}

/* Elegant Timeline / Prompts Section */
.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: white;
}

.prompts-container {
  position: relative;
  padding-left: 3.5rem;
  padding-bottom: 2rem;
}

/* The Glowing Timeline Line perfectly aligned */
.prompts-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  transform: translateX(-50%);
}

.prompts-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--accent-gradient);
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
  transition: height 0.4s ease-out;
}

.prompt-item {
  position: relative;
  margin-bottom: 4rem;
  /* Starting state for Scroll Reveal */
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: left center;
}

.prompt-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.prompt-item:last-child {
  margin-bottom: 0;
}

.prompt-number {
  position: absolute;
  left: -3.5rem;
  top: 10px;
  width: 44px;
  height: 44px;
  background: var(--bg-color);
  border: 4px solid var(--surface-color-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-muted);
  box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  transition: all 0.5s ease;
  z-index: 2;
  transform: translateX(-50%);
}

.prompt-item.is-active .prompt-number {
  border-color: #c084fc;
  color: #c084fc;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
  transform: translateX(-50%) scale(1.1);
}

.prompt-content {
  padding: 2.5rem;
}

/* Hover effect on individual prompts */
.prompt-content:hover {
  transform: translateX(10px);
  border-color: rgba(168, 85, 247, 0.3);
}

.prompt-content h4 {
  color: #c084fc;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.prompt-text-block {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5rem 2rem;
  border-radius: 16px;
  border-left: 4px solid #818cf8;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #cbd5e1;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .app-container { padding: 1rem; }
  
  .dashboard-header { margin: 2rem 0; }
  .dashboard-header h1 { font-size: 2.5rem; }
  .dashboard-header p { font-size: 1rem; }
  
  .cards-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .app-card { padding: 1.5rem; }
  
  .details-header { padding: 1.5rem; margin-bottom: 2rem; }
  .details-title-row h1 { font-size: 2rem; }
  .primary-btn { padding: 0.8rem 1.2rem; font-size: 1rem; width: 100%; justify-content: center; }
  
  .section-title { font-size: 1.5rem; margin-bottom: 2rem; }
  
  .prompts-container { padding-left: 2.5rem; }
  .prompt-number { left: -2.5rem; width: 32px; height: 32px; font-size: 0.9rem; border-width: 3px; }
  
  .prompt-content { padding: 1.2rem; }
  .prompt-content h4 { font-size: 0.8rem; margin-bottom: 1rem; }
  .prompt-text-block { 
     padding: 1rem; 
     font-size: 0.85rem; 
     overflow-wrap: break-word;
     word-wrap: break-word;
  }
  
  .theme-toggle-panel {
     bottom: auto;
     top: 1rem;
     right: 1rem;
     transform: scale(0.9);
  }

  .scroll-top-btn {
     bottom: 1rem;
     right: 1rem;
     transform: scale(0.9) translateY(20px);
  }
  
  .scroll-top-btn.visible {
     transform: scale(0.9) translateY(0);
  }
}

/* --- LIGHT THEME --- */
body.light-theme {
  --bg-color: #f8fafc;
  --surface-color: rgba(255, 255, 255, 0.6);
  --surface-color-hover: rgba(255, 255, 255, 0.9);
  --border-color: rgba(0, 0, 0, 0.08);
  --text-main: #0f172a;
  --text-muted: #475569;
  --glow-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

body.light-theme::before {
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.08) 0%, rgba(255,255,255,0) 40%),
              radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.06) 0%, rgba(255,255,255,0) 40%);
}

body.light-theme .glass-panel {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

body.light-theme .section-title {
  color: var(--text-main);
}

body.light-theme .prompt-text-block {
    background: rgba(255, 255, 255, 0.6);
    color: #334155;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.03);
    border-left: 4px solid #6366f1;
}

body.light-theme .prompt-content h4 {
    color: #6366f1;
}

body.light-theme .app-card-icon {
    background: rgba(0, 0, 0, 0.03);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.02);
}

body.light-theme .prompts-line {
    background: rgba(0,0,0,0.1);
}

body.light-theme .premium-back-btn {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0,0,0,0.1);
  color: #0f172a;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

body.light-theme .premium-back-btn:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(255, 255, 255, 1);
}

/* Theme Toggle Button Panel */
.theme-toggle-panel {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 30px;
    z-index: 1000;
}

.theme-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

.theme-btn.active {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

/* Scroll To Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--surface-color-hover);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3), var(--glow-shadow);
    transform: translateY(-5px);
}

body.light-theme .scroll-top-btn:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1), var(--glow-shadow);
}

/* Floating Prompt Navigator */
.prompt-navigator {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px) scale(0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 40px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
}

body.light-theme .prompt-navigator {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.05);
}

.prompt-navigator.visible {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.nav-indicator {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    min-width: 70px;
    text-align: center;
    letter-spacing: 1px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    color: var(--accent-color);
}

body.light-theme .nav-btn:hover:not(:disabled) {
    background: rgba(0,0,0,0.05);
}

.nav-btn:disabled {
    opacity: 0.2;
    cursor: default;
}

@media (max-width: 768px) {
    .prompt-navigator {
        bottom: 1rem;
    }
}
