/* Professional Anxiety Reset App Styles */

:root {
  --primary-color: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #3730a3;
  --secondary-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #374151;
  --gray-700: #1f2937;
  --gray-800: #111827;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;
  --border-radius: 16px;
  --border-radius-lg: 20px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --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);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--gray-700);
  min-height: 100vh;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--gray-800);
}

.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200) !important;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color) !important;
  letter-spacing: -0.025em;
}

/* Enhanced Cards */
.card {
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg) !important;
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-body {
  padding: 1.5rem;
}

/* Progress Card Styling */
.progress-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  box-shadow: var(--shadow-lg);
}

.progress-card .card-body {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
}

.progress-card h2, 
.progress-card .form-label,
.progress-card .small,
.progress-card div {
  color: white;
}

.progress-card .text-white {
  color: white !important;
}

.progress-card .form-select {
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--primary-dark);
}

/* Enhanced Progress Bar */
.progress {
  height: 0.75rem;
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--secondary-color) 0%, #059669 100%);
  border-radius: 0.5rem;
  transition: width 0.6s ease;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Task Cards */
.task-container {
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.task-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gray-300);
  transition: background 0.3s ease;
}

.task-container:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.task-container.completed::before {
  background: var(--secondary-color);
}

.task-container.completed {
  background: var(--success-light);
  border-color: var(--success-border);
}

/* Enhanced Form Controls */
.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--gray-300);
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.form-check-input:checked {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-check-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-check-label {
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: color 0.2s ease;
}

.task-container.completed .form-check-label {
  color: var(--secondary-color);
}

.task-description {
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0.75rem 0;
}

.task-note {
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  resize: vertical;
  background: rgba(255, 255, 255, 0.8);
}

.task-note:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

/* Day Headers */
.day-header {
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  border-bottom: 2px solid var(--primary-color);
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.875rem;
  margin-right: 0.75rem;
}

/* Enhanced Buttons */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  transition: all 0.2s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-danger {
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
  background: transparent;
}

.btn-outline-danger:hover {
  background: var(--danger-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-secondary {
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--gray-600);
  color: white;
  border-color: var(--gray-600);
}

/* SOS Modal Enhancements */
.modal-content {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
  color: white;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-header .btn-close {
  filter: invert(1);
}

.breathing-instructions {
  background: var(--gray-50);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  margin: 1rem 0;
}

.breathing-instructions ol {
  margin: 0;
  padding-left: 1.25rem;
}

.breathing-instructions li {
  padding: 0.25rem 0;
  font-weight: 500;
}

#breathCoach {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  margin-top: 1rem;
}

/* Select Styling */
.form-select {
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  background: white;
  transition: all 0.2s ease;
}

.form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Streak Text */
#streakText {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .task-container {
    padding: 1rem;
  }
  
  .day-number {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 2s infinite;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Success State for Completed Tasks */
.task-container.completed .form-check-label::after {
  content: "✓";
  margin-left: 0.5rem;
  color: var(--secondary-color);
  font-weight: 700;
}

/* Explanation Section Styling */
.explanation-section {
  margin: 1rem 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-200);
}

.explanation-section .btn-link {
  color: var(--gray-600);
  font-weight: 500;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
}

.explanation-section .btn-link:hover {
  color: var(--primary-color);
}

.explanation-section .btn-link:focus {
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.chevron-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  margin-left: auto;
}

.explanation-section .btn-link[aria-expanded="true"] .chevron-icon {
  transform: rotate(180deg);
}

.explanation-content {
  background: linear-gradient(135deg, var(--gray-50) 0%, rgba(255, 255, 255, 0.8) 100%);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.science-section,
.benefits-section,
.research-section {
  position: relative;
  padding-left: 2rem;
}

.science-section::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 3px;
  height: calc(100% - 0.5rem);
  background: var(--primary-color);
  border-radius: 2px;
}

.benefits-section::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 3px;
  height: calc(100% - 0.5rem);
  background: var(--secondary-color);
  border-radius: 2px;
}

.research-section::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 3px;
  height: calc(100% - 0.5rem);
  background: var(--warning-color);
  border-radius: 2px;
}

.explanation-content h6 {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.explanation-content .science-section h6 {
  color: var(--primary-color);
}

.explanation-content .benefits-section h6 {
  color: var(--secondary-color);
}

.explanation-content .research-section h6 {
  color: var(--warning-color);
}

.explanation-content p {
  line-height: 1.5;
  margin-bottom: 0;
}

.explanation-content ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.explanation-content li {
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

/* Scientific credibility badges */
.credibility-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Responsive explanation styling */
@media (max-width: 768px) {
  .explanation-content {
    padding: 1rem;
  }
  
  .science-section,
  .benefits-section,
  .research-section {
    padding-left: 1.5rem;
  }
  
  .explanation-content h6 {
    font-size: 0.8rem;
  }
}

/* Credibility items on landing page */
.credibility-item {
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.credibility-item:hover {
  background: var(--gray-50);
  transform: translateY(-2px);
}

/* Enhanced SOS Modal styling */
.modal-header {
  background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
  color: white;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  border: none;
}

/* Program overview styling */
.program-overview {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid rgba(79, 70, 229, 0.1);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.program-overview h5 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Trust indicators */
.trust-indicator {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--secondary-color);
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0.25rem;
}

.trust-indicator .me-1 {
  margin-right: 0.25rem !important;
}

/* Enhanced Task Description Styles */
.enhanced-task-guide {
  margin: 1rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
  border: 1px solid #e3f2fd;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.08);
}

.task-icon-intro {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.task-icon {
  font-size: 2rem !important;
  margin-right: 15px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.gentle-intro {
  color: #495057;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

.step-by-step h6 {
  color: #0066cc;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.step-item {
  background: #ffffff !important;
  border-left: 3px solid #0066cc !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 0.75rem !important;
  margin-bottom: 0.5rem !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  line-height: 1.6;
  transition: all 0.3s ease;
}

.step-item:hover {
  transform: translateX(3px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.supportive-reminder {
  background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%) !important;
  border: 1px solid #28a745 !important;
  border-radius: 8px !important;
  padding: 1rem !important;
  margin-bottom: 1rem !important;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

.supportive-reminder h6 {
  color: #28a745 !important;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.adaptation-note {
  background: linear-gradient(135deg, #fff8e1 0%, #fffbf0 100%) !important;
  border: 1px solid #ffc107 !important;
  border-radius: 8px !important;
  padding: 0.75rem !important;
  box-shadow: 0 2px 4px rgba(255, 193, 7, 0.1);
}

.adaptation-note h6 {
  color: #f57c00 !important;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.adaptation-note small,
.supportive-reminder small {
  line-height: 1.5;
  font-size: 0.9rem;
}

/* Calming animation for breath-related exercises */
@keyframes mindful-breath {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.02); opacity: 1; }
}

.task-icon[title*="breath"], .task-icon[title*="breathing"] {
  animation: mindful-breath 4s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .enhanced-task-guide {
    padding: 1rem;
    margin: 0.75rem 0;
  }
  
  .task-icon {
    font-size: 1.5rem !important;
    margin-right: 10px;
  }
  
  .step-item {
    padding: 0.5rem !important;
    font-size: 0.9rem;
  }
}
