/* Journal Prompt - Main Styles */

/* CSS Variables for Theming */
:root {
  /* Light Theme Colors */
  --primary-color: #6366f1;
  --primary-light: #8b5cf6;
  --primary-dark: #4f46e5;
  
  --secondary-color: #10b981;
  --accent-color: #f59e0b;
  --danger-color: #ef4444;
  
  --background: #ffffff;
  --surface: #f8fafc;
  --surface-elevated: #ffffff;
  
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Crimson Text', 'Georgia', serif;
  --font-mono: 'Courier New', monospace;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* Dark Theme */
[data-theme="dark"] {
  --background: #0f172a;
  --surface: #1e293b;
  --surface-elevated: #334155;
  
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --border-color: #334155;
  --border-light: #475569;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background);
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  text-align: center;
  animation: fadeInUp 0.6s ease;
}

.loading-logo {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  animation: pulse 2s infinite;
}

/* Navigation */
.nav-bar {
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.nav-logo {
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  gap: var(--space-sm);
}

.nav-link {
  background: none;
  border: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface);
}

.nav-link.active {
  color: var(--primary-color);
  background: rgb(99 102 241 / 0.1);
}

.theme-toggle {
  background: none;
  border: none;
  padding: var(--space-sm);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--surface);
}

/* Main Content */
.main-content {
  padding-bottom: 6rem; /* Space for mobile nav */
}

.view {
  display: none;
  min-height: calc(100vh - 200px);
  padding: var(--space-xl) 0;
}

.view.active {
  display: block;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-top: var(--space-sm);
}

.today-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.date-display h1 {
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.streak-info {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.streak-badge {
  background: var(--secondary-color);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-light);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background: var(--surface);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.btn-icon {
  background: none;
  border: none;
  padding: var(--space-sm);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.125rem;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--surface);
}

/* Cards */
.card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
}

/* Prompt Section */
.prompt-section {
  margin-bottom: var(--space-2xl);
}

.prompt-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  text-align: center;
}

.prompt-header {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.prompt-category {
  background: var(--primary-color);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prompt-difficulty {
  background: var(--accent-color);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.prompt-time {
  background: var(--surface);
  color: var(--text-secondary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  font-size: 0.75rem;
}

.prompt-text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.prompt-followup {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.prompt-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

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

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.full-width {
  width: 100%;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

/* Mobile Navigation (Hidden on Desktop) */
.mobile-nav {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-bar {
    display: none;
  }
  
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-elevated);
    border-top: 1px solid var(--border-color);
    padding: var(--space-sm) 0;
    z-index: 100;
  }
  
  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    background: none;
    border: none;
    padding: var(--space-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
  }
  
  .mobile-nav-item.active {
    color: var(--primary-color);
  }
  
  .mobile-nav-icon {
    font-size: 1.25rem;
  }
  
  .mobile-nav-label {
    font-size: 0.75rem;
    font-weight: 500;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .view {
    padding: var(--space-lg) 0;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.375rem; }
  
  .prompt-text {
    font-size: 1.25rem;
  }
  
  .prompt-header {
    gap: var(--space-sm);
  }
  
  .prompt-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  .prompt-card {
    padding: var(--space-lg);
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}