/* Modern Design System */
:root {
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --surface-dark: #1a1b1e;
  --surface-darker: #141517;
  --surface-lighter: #2a2b2e;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --glow-purple: rgba(139, 92, 246, 0.5);
}

/* Base Styles */
body {
  background-color: var(--surface-dark);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding: var(--spacing-md);
  box-shadow: inset 0 0 0 16px var(--glow-purple);
  animation: borderGlow 2s ease-in-out infinite alternate;
  overflow-y: auto;
  max-height: 100vh;
}

/* Parallax Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/attached_assets/ibneeet2_1950s_photo_of_a_bernese_mountain_dog_female_lawyer_in_896ebe85-6f6a-488a-b087-5d46e75265b3.png');
  background-size: cover;
  background-position: top center;
  background-attachment: fixed;
  opacity: 0.15;
  filter: grayscale(30%) contrast(120%);
  z-index: -1;
  transform: translateZ(0);
  will-change: transform;
}
/* Layout Structure */
.container-fluid {
  overflow-y: auto;
  max-height: calc(100vh - 2 * var(--spacing-md));
  padding-right: var(--spacing-md);
  padding-left: var(--spacing-md);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  z-index: 1;
}

header {
  padding-top: var(--spacing-lg);
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(26, 27, 30, 0.7);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
}

/* Layout Structure */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 2 * var(--spacing-md));
}

.app-header {
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
}

.app-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Container Adjustments */
.container {
  max-width: 800px;
  padding: var(--spacing-md);
}

/* Header Styling */
.display-5 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-xs);
}

.lead {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
}

/* Card Modernization */
.card {
  background: rgba(20, 21, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Form Elements */
.form-control {
  background-color: var(--surface-lighter);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  padding: var(--spacing-sm) var(--spacing-md);
  transition: all 0.2s ease;
}

.form-control:focus {
  background-color: var(--surface-lighter);
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
  color: var(--text-primary);
}

/* Button Styling */
.btn-primary {
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  padding: var(--spacing-sm) var(--spacing-lg);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Settings Icon */
.settings-icon {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  z-index: 1000;
}

.settings-icon .btn-link {
  background: var(--surface-darker);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  color: var(--text-secondary);
  padding: var(--spacing-sm);
  transition: all 0.2s ease;
}

.settings-icon .btn-link:hover {
  background: var(--surface-lighter);
  color: var(--text-primary);
  transform: rotate(45deg);
}

.settings-icon .feather {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 2;
}

/* Defense Content Styling */
.defense-container {
  background: var(--surface-darker);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
}

.defense-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-sm) 0;
}

.defense-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.defense-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
}

.defense-text {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.6;
}

.defense-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.defense-point {
  align-items: flex-start;
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
}

.defense-point:last-child {
  margin-bottom: 0;
}

.defense-point i {
  color: #6366f1;
  flex-shrink: 0;
}

/* Logo Animation */
.d3-logo {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  font-weight: 800;
  transition: all 0.3s ease;
}

.d3-logo:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* Mobile Optimization */
@media (max-width: 768px) {
  :root {
    --spacing-lg: 1.25rem;
    --spacing-md: 0.875rem;
    --spacing-sm: 0.625rem;
    --spacing-xs: 0.375rem;
  }

  .container {
    padding: var(--spacing-sm);
  }

  .display-5 {
    font-size: 1.75rem;
  }

  .lead {
    font-size: 1rem;
  }

  .card {
    margin-bottom: var(--spacing-md);
  }

  .defense-container {
    padding: var(--spacing-sm);
  }

  .settings-icon {
    bottom: var(--spacing-md);
    right: var(--spacing-md);
  }

  .settings-icon .feather {
    width: 1.25rem;
    height: 1.25rem;
  }
}

@keyframes borderGlow {
  from {
    box-shadow: inset 0 0 0 8px var(--glow-purple);
  }
  to {
    box-shadow: inset 0 0 0 8px rgba(139, 92, 246, 0.8);
  }
}

/* Loading Animation */
.spinner-border {
  color: #6366f1;
  width: 2.5rem;
  height: 2.5rem;
}

/* Alerts */
.alert {
  background: var(--surface-lighter);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Add to existing CSS */
.history-list .defense-card {
  cursor: pointer;
}

.history-list .defense-card .accusation-summary {
  margin-bottom: 0;
  transition: color 0.2s ease;
}

.history-list .defense-card:hover .accusation-summary {
  color: #6366f1;
}

.history-list .defense-details {
  display: none;
}

.history-list .defense-details.show {
  display: block;
}

.history-list .card-header {
  background: var(--surface-darker);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Updated floating buttons styling */
.floating-buttons {
  position: fixed;
  bottom: var(--spacing-lg);
  left: var(--spacing-lg);
  display: flex;
  gap: var(--spacing-sm);
  z-index: 1000;
  align-items: center;
}

.floating-buttons .btn-link {
  background: var(--surface-darker);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  color: var(--text-secondary);
  padding: var(--spacing-sm);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-buttons .btn-link:hover {
  background: var(--surface-lighter);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.floating-buttons .feather {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 2;
}

.floating-buttons .floating-disclaimer {
  margin-left: var(--spacing-sm);
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Mobile optimization for floating buttons */
@media (max-width: 768px) {
  .floating-buttons {
    bottom: var(--spacing-md);
    left: var(--spacing-md);
    gap: var(--spacing-xs);
  }

  .floating-buttons .btn-link {
    padding: var(--spacing-xs);
  }

  .floating-buttons .feather {
    width: 1.25rem;
    height: 1.25rem;
  }

  .floating-buttons .floating-disclaimer {
    font-size: 0.7rem;
  }
}

/* Add to your existing CSS */
.install-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-darker);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-xs);
  z-index: 1001;
}