/**
 * Scam Detector Styles
 * Clean, trustworthy design for security-conscious users
 */

/* Reset and base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #ca8a04;
  --danger: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
}

/* Header */
header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--gray-900);
}

.logo-icon {
  font-size: 1.75rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--primary);
}

/* Main container */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Safety banner */
.safety-banner {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 0.875rem 1.25rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

#safety-banner {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Input section */
.input-section {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.input-header h2 {
  font-size: 1.25rem;
  color: var(--gray-800);
}

#char-counter {
  font-size: 0.875rem;
  color: var(--gray-500);
}

#email-input {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.5rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  resize: vertical;
  transition: border-color 0.2s;
}

#email-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#email-input.input-warning {
  border-color: var(--warning);
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-300);
}

.input-hint {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* Results */
#results-container {
  margin-top: 1.5rem;
}

.results-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rotating-banner {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
  color: white;
  font-size: 0.9375rem;
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
  padding: 1rem;
  border-radius: 0.75rem 0.75rem 0 0;
}

/* Risk indicator */
.risk-indicator {
  text-align: center;
  padding: 1.5rem;
  border: 3px solid var(--gray-300);
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.risk-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.risk-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.confidence {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* Summary */
.summary-box {
  background: var(--gray-50);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0.25rem;
}

.summary-box p {
  margin: 0;
  line-height: 1.7;
}

/* Findings */
.findings-section {
  margin-bottom: 1.5rem;
}

.findings-section h3 {
  font-size: 1.125rem;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

.finding-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.finding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.finding-name {
  font-weight: 600;
  color: var(--gray-800);
}

.finding-weight {
  font-size: 0.75rem;
  color: var(--gray-500);
  background: var(--gray-200);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.finding-description {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.finding-matches ul {
  margin: 0.5rem 0 0 1.25rem;
  font-size: 0.875rem;
}

.finding-matches li {
  margin-bottom: 0.5rem;
}

.finding-matches code {
  background: var(--gray-200);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
}

.finding-matches small {
  color: var(--gray-500);
}

/* No findings */
.no-findings {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--gray-600);
}

/* Disclaimer */
.disclaimer {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.6;
}

/* Placeholder */
.placeholder-card {
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  border-radius: 0.75rem;
  padding: 3rem;
  text-align: center;
  color: var(--gray-500);
}

/* Error */
.error-card {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}

.error-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Page content */
.page-content {
  background: white;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.page-content h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--gray-900);
}

.page-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--gray-800);
}

.page-content h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--gray-800);
}

.page-content p {
  margin-bottom: 1rem;
  color: var(--gray-700);
}

.page-content ul, .page-content ol {
  margin: 1rem 0 1rem 1.5rem;
}

.page-content li {
  margin-bottom: 0.5rem;
}

/* Scam type cards */
.scam-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.scam-type-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.scam-type-card h4 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
}

.scam-type-card p {
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.scam-type-card ul {
  font-size: 0.875rem;
}

/* Resource list */
.resource-list {
  background: var(--gray-50);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1rem 0;
}

.resource-list h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--gray-800);
}

.resource-list ul {
  list-style: none;
  margin: 0;
}

.resource-list li {
  margin-bottom: 0.75rem;
}

.resource-list a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.resource-list a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background: var(--gray-800);
  color: var(--gray-300);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
}

.footer-links a:hover {
  color: white;
}

.footer-disclaimer {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 640px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .input-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .scam-type-grid {
    grid-template-columns: 1fr;
  }
}