/* Modern Health-focused Theme for InteractionAI */

:root {
  /* Natural health color palette */
  --primary-green: #52b788;
  --dark-green: #2d6a4f;
  --light-green: #74c69d;
  --sage-green: #95d5b2;
  --mint-green: #b7e4c7;
  --cream-white: #f8f9fa;
  --soft-white: #ffffff;
  --warm-gray: #6c757d;
  --charcoal: #2c2c2c;
  --danger-red: #e63946;
  --warning-orange: #f77f00;
  --info-blue: #219ebc;
  --soft-shadow: rgba(82, 183, 136, 0.15);
  --card-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  --border-radius: 20px;
  --input-radius: 50px;
}

body {
  background: linear-gradient(135deg, var(--cream-white) 0%, var(--mint-green) 100%);
  color: var(--charcoal);
  font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

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

.display-4 {
  color: var(--dark-green);
  font-weight: 700;
  text-shadow: 0 2px 4px var(--soft-shadow);
}

/* Navigation */
.navbar {
  background: transparent !important;
  border-bottom: none;
  box-shadow: none;
  backdrop-filter: none;
}

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

.navbar-nav .nav-link {
  color: var(--warm-gray) !important;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 12px;
  padding: 8px 16px !important;
}

.navbar-nav .nav-link:hover {
  color: var(--dark-green) !important;
  background: var(--mint-green);
}

/* Cards and containers */
.card {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  box-shadow: none;
  transition: all 0.3s ease;
  backdrop-filter: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(82, 183, 136, 0.15);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-green), var(--sage-green));
  color: white;
  border-bottom: none;
  font-weight: 600;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-green), var(--light-green));
  border: none;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--input-radius);
  transition: all 0.3s ease;
  letter-spacing: 0.025em;
  box-shadow: 0 4px 15px rgba(82, 183, 136, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(82, 183, 136, 0.4);
}

.btn-secondary {
  background: var(--warm-gray);
  border: none;
  color: white;
  font-weight: 500;
  border-radius: var(--input-radius);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--charcoal);
  transform: translateY(-1px);
}

/* Hero card styling */
.hero-card {
  background: linear-gradient(135deg, var(--soft-white), var(--mint-green));
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 15px 35px rgba(82, 183, 136, 0.1);
}

.hero-icon {
  font-size: 4rem;
  color: var(--primary-green);
  text-shadow: 0 4px 15px rgba(82, 183, 136, 0.3);
}

.hero-content h1 {
  color: var(--dark-green);
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Form controls */
.form-control {
  border: 2px solid rgba(82, 183, 136, 0.2);
  border-radius: var(--input-radius);
  padding: 16px 24px;
  transition: all 0.3s ease;
  background: var(--soft-white);
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 4px rgba(82, 183, 136, 0.15);
  outline: none;
  background: var(--soft-white);
}

.form-control::placeholder {
  color: var(--warm-gray);
  font-weight: 400;
}

/* Search suggestions */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--soft-white);
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 320px;
  overflow-y: auto;
  backdrop-filter: blur(20px);
}

.search-item {
  padding: 16px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--charcoal);
  border-bottom: 1px solid rgba(82, 183, 136, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.search-item:hover,
.search-item.active {
  background: linear-gradient(135deg, var(--mint-green), var(--sage-green));
  color: var(--dark-green);
  transform: translateX(4px);
}

.search-item:last-child {
  border-bottom: none;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.search-item:first-child {
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.search-item .risk-indicator {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

/* Search container positioning */
.search-container {
  position: relative;
}

/* Risk level color coding */
.risk-critical {
  background: var(--danger-red);
  color: white;
}

.risk-dangerous {
  background: var(--warning-orange);
  color: white;
}

.risk-monitor {
  background: var(--info-blue);
  color: white;
}

.risk-safe {
  background: var(--primary-green);
  color: white;
}

.risk-unknown {
  background: var(--warm-gray);
  color: white;
}

/* Feature tiles styling */
.feature-tile {
  background: var(--soft-white);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  height: 100%;
  border: 1px solid rgba(82, 183, 136, 0.1);
}

.feature-tile:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(82, 183, 136, 0.15);
  border-color: var(--primary-green);
}

.feature-tile a {
  color: inherit;
  display: block;
  height: 100%;
}

.feature-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-green), var(--light-green));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 20px rgba(82, 183, 136, 0.3);
}

.feature-icon-wrapper i {
  font-size: 2rem;
  color: white;
}

.feature-tile h5 {
  color: var(--dark-green);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-tile p {
  color: var(--warm-gray);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* Input group styling */
.input-group {
  border-radius: var(--input-radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.input-group-text {
  background: var(--soft-white);
  border: 2px solid rgba(82, 183, 136, 0.2);
  border-right: none;
  color: var(--primary-green);
}

.input-group .form-control {
  border-left: none;
}

.input-group .btn {
  border: 2px solid rgba(82, 183, 136, 0.2);
  border-left: none;
}

/* Interaction results */
.interaction-result {
  margin: 20px 0;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid;
}

.interaction-result.critical {
  background: #f8d7da;
  border-color: var(--danger-red);
}

.interaction-result.dangerous {
  background: #fff3cd;
  border-color: var(--warning-orange);
}

.interaction-result.monitor {
  background: #d1ecf1;
  border-color: var(--info-blue);
}

.interaction-result.safe {
  background: #d4edda;
  border-color: var(--success-green);
}

/* Alerts and badges */
.alert {
  border: none;
  border-radius: 8px;
  font-weight: 500;
}

.badge {
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
}

/* Elder mode adjustments */
.elder-text {
  font-size: 1.25rem !important;
  font-weight: 600;
}

.main-elder {
  font-size: 1.1rem;
}

.main-elder .btn {
  font-size: 1.25rem;
  padding: 15px 30px;
}

.main-elder .form-control {
  font-size: 1.25rem;
  padding: 15px 20px;
}

/* Animation effects */
.pulse-button {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 102, 204, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0);
  }
}

/* Footer */
.footer {
  background: var(--dark-gray);
  color: white;
  margin-top: auto;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Report page styling */
.report-header {
  background: linear-gradient(135deg, var(--primary-green), var(--sage-green));
  color: white;
  padding: 3rem 2rem;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.report-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.report-header .report-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.report-badge {
  display: inline-block;
  background: white;
  color: var(--primary-green);
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.interaction-summary-card {
  background: var(--soft-white);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--primary-green);
}

/* Background patterns and images */
.bg-pattern {
  background: 
    radial-gradient(circle at 20% 80%, rgba(82, 183, 136, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(116, 198, 157, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(183, 228, 199, 0.1) 0%, transparent 50%);
}

.pill-image-bg {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="30" r="3" fill="rgba(82,183,136,0.2)"/><circle cx="80" cy="70" r="2" fill="rgba(116,198,157,0.2)"/><circle cx="60" cy="20" r="2.5" fill="rgba(183,228,199,0.2)"/></svg>');
  background-repeat: no-repeat;
  background-size: cover;
}

/* Search Suggestions Styling */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 2px solid var(--primary-green);
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.search-item {
  padding: 15px 20px;
  cursor: pointer;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.search-item:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%);
  transform: translateX(5px);
}

.search-item:last-child {
  border-bottom: none;
  border-radius: 0 0 10px 10px;
}

.risk-indicator {
  font-size: 0.8rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.risk-critical {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.risk-dangerous {
  background: linear-gradient(135deg, #fd7e14 0%, #e55a00 100%);
  color: white;
}

.risk-monitor {
  background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
  color: white;
}

.risk-safe {
  background: linear-gradient(135deg, #198754 0%, #146c43 100%);
  color: white;
}

.risk-unknown {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
}

/* Video container styling */
.video-container {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.video-container video {
  width: 100%;
  height: auto;
  display: block;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(82, 183, 136, 0.1), rgba(116, 198, 157, 0.1));
  pointer-events: none;
}

/* Image styling */
.health-image {
  border-radius: var(--border-radius);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.health-image:hover {
  transform: scale(1.02);
}

/* Responsive design */
@media (max-width: 768px) {
  .card {
    margin: 10px;
  }
  
  .main-elder .btn {
    font-size: 1.1rem;
    padding: 12px 24px;
  }
  
  .feature-tile {
    padding: 1.5rem;
  }
  
  .feature-icon-wrapper {
    width: 60px;
    height: 60px;
  }
  
  .feature-icon-wrapper i {
    font-size: 1.5rem;
  }
  
  .report-header .report-title {
    font-size: 2rem;
  }
}