/* Custom Properties */
:root {
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --hover-gradient: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
  --background-gradient: linear-gradient(135deg, #f6f9fc 0%, #eef2f7 100%);
}

/* Base Layout */
.bg-gradient {
  background: var(--background-gradient);
  min-height: 100vh;
}

.header-gradient {
  background: var(--primary-gradient);
}

/* Card Styling */
.card-modern {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
}

@media (min-width: 640px) {
  .card-modern {
    padding: 1.5rem;
    border-radius: 16px;
  }
}

.card-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

@media (min-width: 640px) {
  .card-header {
    padding-bottom: 1rem;
  }
}

/* Form Styling */
.form-group {
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .form-group {
    margin-bottom: 1.5rem;
  }
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

/* Input Styling */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix,
.input-suffix {
  position: absolute;
  color: #6b7280;
  font-size: 0.875rem;
  pointer-events: none;
  user-select: none;
}

.input-prefix {
  left: 12px;
}

.input-suffix {
  right: 12px;
}

input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: all 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input.has-prefix {
  padding-left: 28px;
}

input.has-suffix {
  padding-right: 28px;
}

@media (max-width: 640px) {
  input {
    font-size: 16px;
  }
}

input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Button Styling */
.btn-primary {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .btn-primary {
    font-size: 1rem;
  }
}

.btn-primary:hover {
  background: var(--hover-gradient);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* Loading Spinner */
.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Results Styling */
.prediction-badge {
  padding: 0.75rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  animation: fadeIn 0.5s ease-out;
}

@media (min-width: 640px) {
  .prediction-badge {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}

.prediction-badge.positive {
  background-color: #ecfdf5;
  color: #047857;
}

.prediction-badge.negative {
  background-color: #fef2f2;
  color: #dc2626;
}

/* Chart Container */
.chart-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 1rem;
}

@media (min-width: 640px) {
  .chart-container {
    max-width: 400px;
    padding: 1.5rem;
  }
}

/* Confidence Meter */
.confidence-meter {
  margin-top: 1rem;
}

.confidence-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  color: #4b5563;
}

@media (min-width: 640px) {
  .confidence-label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }
}

.confidence-bar {
  height: 6px;
  background-color: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

@media (min-width: 640px) {
  .confidence-bar {
    height: 8px;
    border-radius: 4px;
  }
}

.confidence-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: inherit;
  transition: width 0.5s ease-out;
}

/* Toast Customization */
.toastify {
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  margin: 0.5rem;
}

@media (max-width: 640px) {
  .toastify {
    max-width: calc(100vw - 24px);
    margin: 0.75rem auto;
  }
}

/* Footer Styling */
.footer-modern {
  background-color: #1f2937;
  color: white;
  padding: 1.5rem 0;
  margin-top: 1.5rem;
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

/* Error Styling */
.error-message {
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 0.375rem;
  animation: fadeIn 0.3s ease-out;
}

@media (min-width: 640px) {
  .error-message {
    font-size: 0.875rem;
    margin-top: 0.5rem;
  }
}

.input-error {
  border-color: #dc2626;
}

.input-error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}