/* Struktur-Reset für volle Höhe & Footer */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Logo + Header */
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #0a2b59;
  background-color: #ffffff;
  text-align: center;
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* Headings */
h1, h2, h3, h4, h5 {
  color: #800000;
  margin: 20px 0 10px;
}

header {
  margin-top: 40px;
  margin-bottom: 30px;
}

.achtung-logo {
  color: #800000;
  font-weight: bold;
  font-size: 2.4em;
  margin: 30px 0 8px 0;
  text-align: center;
}

.claim {
  color: #0a2b59;
  font-size: 1em;
  margin: -10px 0 20px 0;
  text-align: center;
}

/* Formulare */
form {
  max-width: 500px;
  margin: 20px auto;
}
textarea,
input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0 20px 0;
  border: none;
  border-bottom: 2px solid #ccc;
  background-color: transparent;
  font-size: 16px;
}
textarea:focus,
input:focus {
  border-bottom: 2px solid #800000;
  outline: none;
}

/* Global checkbox styling */
input[type="checkbox"] {
  accent-color: #800000;
  width: 18px;
  height: 18px;
}

/* Buttons */

.button-link {
  display: inline-block;
  background-color: #800000;
  color: white;
  padding: 10px 16px;
  margin: 5px 0;
  text-decoration: none;
  border-radius: 6px;
  font-size: 1em;
}

button,
input[type="submit"] {
  background-color: #800000;
  color: white;
  border: none;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  margin-top: 10px;
}
button:hover,
input[type="submit"]:hover {
  background-color: #a60000;
}
.mail-button {
  background-color: #800000;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  text-decoration: none;
  display: inline-block;
}


/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 30px;
  border-radius: 8px;
  max-width: 720px;
  position: relative;
  animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: #000;
}

/* Fallbeispiele */
.case-study-box {
  display: none;
  padding: 20px;
  margin-bottom: 20px;
}
.case-study-box.active {
  display: block;
}
.case-study-box h3 {
  color: #800000;
}
.case-study-box .label {
  font-weight: bold;
  margin-top: 10px;
  color: #0a2b59;
}
.case-study-box .field {
  background: #ffffff;
  color: #000;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
}
.case-study-box .feedback {
  background: #800000;
  color: white;
  font-weight: bold;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.case-study-box .hint {
  background: #800000;
  color: #ffffff;
  font-size: 0.95em;
  margin-top: 10px;
  padding: 12px;
  border-radius: 6px;
}
.case-study-nav {
  text-align: center;
  margin-top: 20px;
}
.case-study-nav button {
  background-color: #800000;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  margin: 0 5px;
  cursor: pointer;
}

/* Footer fixiert unten */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  text-align: center;
  padding: 30px 20px;
  background-color: #f9f9f9;
  font-size: 14px;
  color: #0a2b59;
  line-height: 1.6;
  border-top: 1px solid #c5c5c5;
  position: relative;
  z-index: 10;
  clear: both;
}
.site-footer .europe {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 15px;
}
.site-footer .schutztext,
.site-footer .claims {
  font-size: 14px;
  margin: 10px 0;
}
.footer-nav {
  margin-top: 20px;
}
.footer-nav a {
  color: #800000;
  margin: 0 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
}
.footer-nav a:hover {
  text-decoration: underline;
}
.site-footer .copyright {
  font-size: 12px;
  margin-top: 15px;
  color: #0a2b59;
}
.no-bullets {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.footer-nav a.demo-highlight {
  background-color: #800000;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.footer-nav a.hilfe-highlight {
  background: linear-gradient(135deg, #2e7d32, #4caf50);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.footer-nav a.hilfe-highlight:hover {
  background: linear-gradient(135deg, #1b5e20, #388e3c);
}

/* Highlight-Klasse für Logo-Text */
.highlight {
  color: #990000;
  font-weight: bold;
}

/* Hauptinhalt */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  overflow: visible;
}

/* Button Container für Hilfe-Seite */
.button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.button-container button {
  min-width: 200px;
}

/* Hilfe-Button Links */
.hilfe-links {
  gap: 12px;
}

.hilfe-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 12px 20px;
  background: #800000;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.2s, transform 0.1s;
}

.hilfe-button:hover {
  background: #a00000;
  transform: translateY(-1px);
}

.hilfe-button:active {
  transform: translateY(0);
}

/* Assistent Banner */
.assistent-banner {
  background: linear-gradient(135deg, #f8f4f4 0%, #fff 100%);
  border: 2px solid #800000;
  border-radius: 12px;
  padding: 15px 20px;
  margin: 15px auto 25px;
  max-width: 700px;
  box-shadow: 0 2px 10px rgba(128,0,0,0.1);
}

.assistent-banner-content {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.assistent-banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.assistent-banner-text {
  flex: 1;
  min-width: 200px;
  text-align: left;
}

.assistent-banner-text strong {
  display: block;
  color: #800000;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.assistent-banner-text span {
  color: #555;
  font-size: 0.95rem;
}

.assistent-banner-btn {
  background: #800000;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}

.assistent-banner-btn:hover {
  background: #a00000;
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .assistent-banner-content {
    flex-direction: column;
    text-align: center;
  }

  .assistent-banner-text {
    text-align: center;
  }

  .assistent-banner-btn {
    width: 100%;
    text-align: center;
  }
}

/* Experten-Toggle Bereich */
.expert-toggle-section {
  text-align: center;
  margin: 20px auto 10px;
  max-width: 700px;
}

.expert-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 2px solid #ccc;
  padding: 14px 28px;
  border-radius: 30px;
  font-size: 1rem;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expert-toggle-btn:hover {
  border-color: #800000;
  color: #800000;
}

.expert-toggle-btn[aria-expanded="true"] {
  border-color: #800000;
  color: #800000;
  background: #fdf5f5;
}

.expert-toggle-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.expert-toggle-btn[aria-expanded="true"] .expert-toggle-arrow {
  transform: rotate(180deg);
}

.expert-toggle-hint {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #888;
}

/* Aufklappbarer Experten-Inhalt */
.expert-content {
  animation: slideDown 0.3s ease;
}

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

/* Link-Button Liste */
.link-button-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

/* Datenschutz-Hinweis im Formular */
.datenschutz-hinweis {
  font-size: 14px;
  margin: 15px 0;
  text-align: left;
}

.datenschutz-hinweis a {
  color: #800000;
}

/* Formular-Nachricht */
.form-message {
  padding: 15px;
  margin: 15px 0;
  border-radius: 5px;
  text-align: center;
}

/* Analyse-Ergebnis Box */
.analysis-result {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #800000;
  text-align: left;
  margin: 20px auto;
  max-width: 600px;
}

/* ========================================
   Authentifizierungs-Modal Styles
   ======================================== */

.auth-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 40, 85, 0.95);
  justify-content: center;
  align-items: center;
}

.auth-modal-content {
  background-color: #ffffff;
  padding: 40px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease-in-out;
}

.auth-modal-content h2 {
  color: #800000;
  margin-bottom: 10px;
}

.auth-modal-content p {
  color: #0a2b59;
  margin-bottom: 20px;
}

#authForm {
  margin: 0;
}

#authForm input[type="password"] {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  border: 2px solid #ccc;
  border-radius: 6px;
  margin-bottom: 15px;
  box-sizing: border-box;
}

#authForm input[type="password"]:focus {
  border-color: #800000;
  outline: none;
}

#authForm button {
  width: 100%;
  padding: 15px;
  font-size: 16px;
}

.auth-error {
  color: #800000;
  font-weight: bold;
  margin-top: 15px;
}

.auth-hint {
  font-size: 12px;
  color: #666;
  margin-top: 20px;
}

/* Geschützter Inhalt */
.protected-content {
  display: none;
}

.auth-required {
  display: block;
}

/* Logout Button */
.logout-button {
  position: fixed;
  top: 10px;
  right: 10px;
  background-color: #666;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  z-index: 1000;
}

.logout-button:hover {
  background-color: #800000;
}

/* ========================================
   Responsive Anpassungen
   ======================================== */

/* ========================================
   Visual Risk Dashboard Styles
   ======================================== */

/* Risk Dashboard Container */
.risk-dashboard {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
  max-width: 700px;
  overflow: hidden;
}

/* Privacy Score Section */
.privacy-score-section {
  padding: 30px;
  text-align: center;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.privacy-score-label {
  font-size: 14px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.privacy-score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.privacy-score-circle.safe {
  background: #ffebee;
  border: 4px solid #800000;
}

.privacy-score-circle.warning {
  background: #ffebee;
  border: 4px solid #a60000;
}

.privacy-score-circle.danger {
  background: #ffebee;
  border: 4px solid #dc3545;
}

.privacy-score-number {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}

.privacy-score-circle.safe .privacy-score-number { color: #800000; }
.privacy-score-circle.warning .privacy-score-number { color: #800000; }
.privacy-score-circle.danger .privacy-score-number { color: #721c24; }

.privacy-score-max {
  font-size: 14px;
  color: #6c757d;
}

.privacy-score-status {
  font-size: 18px;
  font-weight: 600;
  margin-top: 10px;
}

.privacy-score-status.safe { color: #800000; }
.privacy-score-status.warning { color: #a60000; }
.privacy-score-status.danger { color: #dc3545; }

.privacy-score-summary {
  font-size: 14px;
  color: #6c757d;
  margin-top: 5px;
}

/* Risk Categories Grid */
.risk-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
  justify-content: center;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.risk-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.risk-category-badge:hover {
  transform: scale(1.05);
}

.risk-category-badge.critical {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.risk-category-badge.high {
  background: #ffe5d0;
  color: #8a4500;
  border: 1px solid #ffd5b5;
}

.risk-category-badge.medium {
  background: #ffebee;
  color: #800000;
  border: 1px solid #ffcdd2;
}

.risk-category-badge.low {
  background: #d1ecf1;
  color: #800000;
  border: 1px solid #bee5eb;
}

.risk-category-badge.safe {
  background: #ffebee;
  color: #800000;
  border: 1px solid #ffcdd2;
}

/* Marked Text Section */
.marked-text-section {
  padding: 20px;
  border-bottom: 1px solid #dee2e6;
}

.marked-text-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.marked-text-container {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  font-size: 15px;
  line-height: 1.8;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Text Highlight Marks */
.text-mark {
  padding: 2px 4px;
  border-radius: 3px;
  cursor: help;
  position: relative;
}

.text-mark.critical {
  background: #f8d7da;
  border-bottom: 2px solid #dc3545;
}

.text-mark.high {
  background: #ffe5d0;
  border-bottom: 2px solid #a60000;
}

.text-mark.medium {
  background: #ffebee;
  border-bottom: 2px solid #a60000;
}

.text-mark.low {
  background: #d1ecf1;
  border-bottom: 2px solid #800000;
}

/* Findings List */
.findings-section {
  padding: 20px;
  border-bottom: 1px solid #dee2e6;
}

.findings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.finding-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border-radius: 8px;
  text-align: left;
}

.finding-item.critical {
  background: #fff5f5;
  border-left: 4px solid #dc3545;
}

.finding-item.high {
  background: #fff8f0;
  border-left: 4px solid #a60000;
}

.finding-item.medium {
  background: #fffcf0;
  border-left: 4px solid #a60000;
}

.finding-item.low {
  background: #f0f9ff;
  border-left: 4px solid #800000;
}

.finding-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.finding-content {
  flex: 1;
}

.finding-title {
  font-weight: 600;
  font-size: 14px;
  color: #212529;
  margin-bottom: 4px;
}

.finding-match {
  font-family: monospace;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 6px;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finding-message {
  font-size: 13px;
  color: #495057;
  margin-bottom: 8px;
}

.finding-suggestion {
  font-size: 12px;
  color: #800000;
  font-style: italic;
}

.finding-suggestion::before {
  content: "Tipp: ";
  font-weight: 600;
}

/* Context Warning */
.context-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #e7f5ff;
  border-left: 4px solid #0066cc;
  font-size: 13px;
  color: #0066cc;
}

.context-warning-icon {
  font-size: 20px;
}

/* Smart Rewrite Section */
.rewrite-section {
  padding: 20px;
  background: #ffebee;
}

.rewrite-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.rewrite-icon {
  font-size: 24px;
}

.rewrite-title {
  font-size: 16px;
  font-weight: 600;
  color: #800000;
}

.rewrite-container {
  background: #ffffff;
  border: 2px solid #800000;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.rewrite-text {
  font-size: 15px;
  line-height: 1.6;
  color: #212529;
  text-align: left;
}

.rewrite-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.rewrite-change-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #ffebee;
  color: #800000;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.rewrite-change-tag::before {
  content: "✓";
}

.rewrite-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rewrite-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rewrite-btn-primary {
  background: #800000;
  color: white;
}

.rewrite-btn-primary:hover {
  background: #218838;
}

.rewrite-btn-secondary {
  background: #ffffff;
  color: #495057;
  border: 1px solid #ced4da;
}

.rewrite-btn-secondary:hover {
  background: #f8f9fa;
}

/* Copy Success Animation */
.copy-success {
  animation: copyPulse 0.3s ease;
}

@keyframes copyPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* All Safe State */
.all-safe-message {
  padding: 40px 20px;
  text-align: center;
}

.all-safe-icon {
  font-size: 64px;
  margin-bottom: 15px;
}

.all-safe-title {
  font-size: 24px;
  font-weight: 600;
  color: #800000;
  margin-bottom: 10px;
}

.all-safe-text {
  font-size: 15px;
  color: #6c757d;
}

/* Loading State */
.dashboard-loading {
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #800000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 16px;
  color: #6c757d;
}

/* Context Selector */
.context-selector {
  margin: 15px 0;
  text-align: left;
}

.context-selector label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
}

.context-selector select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.context-selector select:focus {
  border-color: #800000;
  outline: none;
}

/* Tooltip */
.tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #212529;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
}

.text-mark:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   Responsive Anpassungen
   ======================================== */

@media (max-width: 768px) {
  .achtung-logo {
    font-size: 1.8em;
  }

  .main-content {
    padding: 15px;
  }

  .button-container button {
    min-width: 100%;
  }

  .modal-content {
    width: 95%;
    padding: 20px;
  }

  .auth-modal-content {
    padding: 25px;
  }

  .privacy-score-circle {
    width: 120px;
    height: 120px;
  }

  .privacy-score-number {
    font-size: 36px;
  }

  .risk-categories {
    gap: 8px;
  }

  .risk-category-badge {
    padding: 6px 10px;
    font-size: 12px;
  }

  .rewrite-actions {
    flex-direction: column;
  }

  .rewrite-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   Phase 2: Tab Navigation
   ======================================== */

.tab-nav {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 0;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  border-radius: 8px 8px 0 0;
  margin-bottom: -2px;
}

.tab-btn:hover {
  background: #f8f9fa;
  color: #495057;
}

.tab-btn.active {
  background: #fff;
  color: #800000;
  border: 2px solid #dee2e6;
  border-bottom: 2px solid #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
  overflow: visible;
  margin-bottom: 40px;
}

/* ========================================
   Phase 2: API Status Indicator
   ======================================== */

.api-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  width: fit-content;
  margin: 0 auto 20px;
}

.api-status.healthy {
  background: #ffebee;
  color: #800000;
}

.api-status.degraded {
  background: #ffebee;
  color: #800000;
}

.api-status.offline {
  background: #f8d7da;
  color: #721c24;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-dot.healthy {
  background: #800000;
}

.status-dot.degraded {
  background: #a60000;
}

.status-dot.offline {
  background: #dc3545;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.provider-status {
  margin-left: 10px;
  font-size: 11px;
}

.status-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.provider-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.provider-badge.openai {
  background: rgba(0, 166, 126, 0.15);
  color: #00a67e;
}

.provider-badge.anthropic {
  background: rgba(204, 119, 34, 0.15);
  color: #cc7722;
}

.quick-check-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(0, 123, 255, 0.15);
  color: #800000;
  cursor: help;
}

/* ========================================
   Phase 2: Batch Analysis
   ======================================== */

.batch-description {
  color: #6c757d;
  font-size: 14px;
  margin-bottom: 20px;
}

.batch-input-area {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.batch-textarea-container {
  flex: 1;
  position: relative;
}

.batch-textarea-container textarea {
  width: 100%;
  min-height: 200px;
}

.batch-counter {
  position: absolute;
  bottom: 30px;
  right: 10px;
  font-size: 12px;
  color: #6c757d;
  background: #fff;
  padding: 2px 8px;
  border-radius: 10px;
}

.batch-divider {
  display: flex;
  align-items: center;
  color: #6c757d;
  font-size: 14px;
}

.batch-upload-area {
  flex: 0 0 200px;
  border: 2px dashed #ced4da;
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8f9fa;
}

.batch-upload-area:hover,
.batch-upload-area.drag-over {
  border-color: #800000;
  background: #fff5f5;
}

.upload-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.upload-text {
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  margin-bottom: 5px;
}

.upload-subtext {
  font-size: 11px;
  color: #6c757d;
}

/* Batch Results */
.batch-results-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-top: 20px;
}

.batch-summary {
  display: flex;
  justify-content: space-around;
  padding: 25px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.batch-summary-item {
  text-align: center;
}

.summary-number {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #212529;
}

.summary-number.safe { color: #800000; }
.summary-number.warning { color: #a60000; }
.summary-number.danger { color: #dc3545; }

.summary-label {
  display: block;
  font-size: 12px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 5px;
}

.batch-results-list {
  padding: 20px;
  display: grid;
  gap: 15px;
}

.batch-result-item {
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #dee2e6;
  background: #f8f9fa;
}

.batch-result-item.safe {
  border-left-color: #800000;
  background: #f0fff4;
}

.batch-result-item.warning {
  border-left-color: #a60000;
  background: #fffcf0;
}

.batch-result-item.danger {
  border-left-color: #dc3545;
  background: #fff5f5;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.result-number {
  font-weight: 600;
  color: #495057;
}

.result-score {
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 13px;
}

.result-score.safe {
  background: #ffebee;
  color: #800000;
}

.result-score.warning {
  background: #ffebee;
  color: #800000;
}

.result-score.danger {
  background: #f8d7da;
  color: #721c24;
}

.result-preview {
  font-size: 13px;
  color: #495057;
  margin-bottom: 8px;
  line-height: 1.5;
}

.result-risks {
  display: flex;
  gap: 6px;
  align-items: center;
}

.risk-mini-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 14px;
}

.risk-mini-badge.critical { background: #f8d7da; }
.risk-mini-badge.high { background: #ffe5d0; }
.risk-mini-badge.medium { background: #ffebee; }
.risk-mini-badge.low { background: #d1ecf1; }

.risk-more {
  font-size: 11px;
  color: #6c757d;
  font-weight: 500;
}

.result-safe {
  color: #800000;
  font-size: 13px;
  font-weight: 500;
}

.batch-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 8px;
  margin-top: 20px;
}

/* ========================================
   Phase 2: Smart Rewrite Mode Selector
   ======================================== */

.rewrite-mode-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.rewrite-mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 10px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rewrite-mode-btn:hover {
  border-color: #800000;
  background: #fff5f5;
}

.rewrite-mode-btn.active {
  border-color: #800000;
  background: #f0fff4;
}

.mode-icon {
  font-size: 24px;
  margin-bottom: 5px;
}

.mode-label {
  font-size: 13px;
  font-weight: 600;
  color: #212529;
}

.mode-desc {
  font-size: 10px;
  color: #6c757d;
  margin-top: 2px;
}

.rewrite-generate-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: #800000;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 15px;
}

.rewrite-generate-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
}

.rewrite-generate-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 18px;
}

.rewrite-result {
  animation: slideIn 0.3s ease;
}

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

/* ========================================
   Phase 2: Provider Info Footer
   ======================================== */

.provider-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: #f8f9fa;
  font-size: 11px;
  color: #6c757d;
  border-top: 1px solid #dee2e6;
}

.provider-badge {
  background: #e9ecef;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.provider-model {
  font-family: monospace;
}

.provider-time {
  color: #800000;
}

/* ========================================
   Phase 2: Mobile Responsive
   ======================================== */

@media (max-width: 768px) {
  .tab-nav {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 15px;
    font-size: 13px;
  }

  .batch-input-area {
    flex-direction: column;
  }

  .batch-upload-area {
    flex: none;
    width: 100%;
  }

  .batch-divider {
    justify-content: center;
    padding: 15px 0;
  }

  .batch-summary {
    flex-wrap: wrap;
    gap: 20px;
  }

  .batch-summary-item {
    flex: 1 1 30%;
  }

  .rewrite-mode-selector {
    flex-direction: column;
  }

  .rewrite-mode-btn {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 15px;
  }

  .mode-icon {
    margin-bottom: 0;
  }
}

/* ========================================
   Phase 3: Accessibility Toolbar
   ======================================== */

.accessibility-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 8px 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  z-index: 1001;
  flex-wrap: wrap;
}

.a11y-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.a11y-label {
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  margin-right: 5px;
}

.a11y-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: auto;
}

.a11y-btn:hover {
  background: #f8f9fa;
  border-color: #800000;
  color: #800000;
}

.a11y-btn.active {
  background: #800000;
  border-color: #800000;
  color: #fff;
}

.a11y-icon {
  font-size: 14px;
}

.a11y-text {
  font-size: 12px;
}

/* Adjust body padding for fixed toolbar */
body {
  padding-top: 50px;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Phase 3: High Contrast Mode
   ======================================== */

body.high-contrast {
  background-color: #000 !important;
  color: #fff !important;
}

body.high-contrast header,
body.high-contrast .main-content,
body.high-contrast .site-footer {
  background-color: #000 !important;
  color: #fff !important;
}

body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast .achtung-logo {
  color: #ffff00 !important;
}

body.high-contrast a {
  color: #00ffff !important;
}

body.high-contrast .claim {
  color: #fff !important;
}

body.high-contrast textarea,
body.high-contrast input,
body.high-contrast select {
  background: #1a1a1a !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.high-contrast button,
body.high-contrast input[type="submit"] {
  background: #ffff00 !important;
  color: #000 !important;
  border: 2px solid #fff !important;
}

body.high-contrast .risk-dashboard {
  background: #1a1a1a !important;
  border: 2px solid #fff !important;
}

body.high-contrast .privacy-score-section {
  background: #1a1a1a !important;
}

body.high-contrast .risk-category-badge,
body.high-contrast .finding-item {
  background: #2a2a2a !important;
  border-color: #fff !important;
  color: #fff !important;
}

body.high-contrast .api-status {
  background: #1a1a1a !important;
  border: 1px solid #fff !important;
}

body.high-contrast .tab-btn {
  background: #1a1a1a !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.high-contrast .tab-btn.active {
  background: #ffff00 !important;
  color: #000 !important;
}

body.high-contrast .accessibility-toolbar {
  background: #1a1a1a !important;
  border-color: #fff !important;
}

body.high-contrast .a11y-btn {
  background: #2a2a2a !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.high-contrast .a11y-btn.active {
  background: #ffff00 !important;
  color: #000 !important;
}

/* ========================================
   Phase 3: Simple Language Mode
   ======================================== */

body.simple-language .claim,
body.simple-language p,
body.simple-language label,
body.simple-language .finding-message {
  font-size: 1.1em;
  line-height: 1.8;
}

body.simple-language .batch-description,
body.simple-language .context-help,
body.simple-language .finding-suggestion {
  font-size: 1em;
}

.simple-lang {
  display: none;
  background: #e7f5ff;
  padding: 10px 15px;
  border-radius: 6px;
  border-left: 4px solid #0066cc;
  margin: 10px 0;
  font-size: 1.1em;
  line-height: 1.6;
}

body.simple-language .simple-lang {
  display: block;
}

.form-description {
  text-align: left;
  margin-bottom: 15px;
}

.context-help {
  display: block;
  margin-top: 8px;
  font-size: 0.9em;
  text-align: left;
}

/* ========================================
   Phase 3: Live Check Indicator
   ======================================== */

.live-check-indicator {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #ffebee;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #0066cc;
  width: fit-content;
  margin: 0 auto 15px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #0066cc;
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

/* ========================================
   Phase 3: Live Preview
   ======================================== */

.live-preview {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
  margin-bottom: 15px;
}

.live-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.live-preview-icon {
  font-size: 16px;
}

.live-preview-content {
  min-height: 40px;
}

.live-hint {
  color: #6c757d;
  font-size: 13px;
  font-style: italic;
}

.live-checking {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #495057;
  font-size: 13px;
}

.live-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #dee2e6;
  border-top-color: #800000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.live-error {
  color: #dc3545;
  font-size: 13px;
}

.live-safe {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #800000;
  font-size: 14px;
  font-weight: 500;
}

.live-safe-icon {
  font-size: 18px;
}

.live-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.live-warning.critical {
  background: #f8d7da;
  color: #721c24;
}

.live-warning.high {
  background: #ffe5d0;
  color: #8a4500;
}

.live-warning.medium {
  background: #ffebee;
  color: #800000;
}

.live-warning.low {
  background: #d1ecf1;
  color: #800000;
}

.live-categories {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.live-category {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 14px;
}

.live-category.critical { background: rgba(220, 53, 69, 0.2); }
.live-category.high { background: rgba(253, 126, 20, 0.2); }
.live-category.medium { background: rgba(255, 193, 7, 0.2); }
.live-category.low { background: rgba(23, 162, 184, 0.2); }

.live-more {
  font-size: 11px;
  color: #6c757d;
  padding: 4px 8px;
}

.live-time {
  font-size: 10px;
  color: #6c757d;
  margin-left: auto;
  font-style: italic;
  opacity: 0.8;
}

.live-safe .live-time {
  margin-left: 10px;
}

/* ========================================
   Phase 3: Accessibility Responsive
   ======================================== */

@media (max-width: 768px) {
  .accessibility-toolbar {
    padding: 6px 10px;
    gap: 8px;
  }

  .a11y-group {
    gap: 3px;
  }

  .a11y-btn {
    padding: 5px 8px;
    font-size: 12px;
  }

  .a11y-text {
    display: none;
  }

  .a11y-label {
    display: none;
  }

  body {
    padding-top: 45px;
  }

  .live-warning {
    flex-direction: column;
    align-items: flex-start;
  }

  .live-categories {
    margin-left: 0;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .accessibility-toolbar {
    justify-content: space-between;
  }

  .a11y-group:first-child {
    order: 1;
  }

  body {
    padding-top: 85px;
  }
}

/* ========================================
   Phase 4: Language Switcher
   ======================================== */

.lang-switcher {
  border-left: 1px solid #dee2e6;
  padding-left: 10px;
  margin-left: 5px;
}

.lang-btn {
  padding: 4px 8px !important;
  min-width: auto;
}

.lang-flag {
  font-size: 16px;
  line-height: 1;
}

.lang-code {
  font-size: 10px;
  font-weight: 600;
  margin-left: 2px;
}

.lang-btn.active {
  background: #800000;
  color: #fff;
  border-color: #800000;
}

.lang-btn.active .lang-code {
  color: #fff;
}

/* ========================================
   Phase 4: PWA Install Prompt
   ======================================== */

.pwa-install-prompt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #800000;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  z-index: 1002;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.pwa-icon {
  font-size: 24px;
}

.pwa-text {
  font-size: 14px;
  font-weight: 500;
}

.pwa-install-btn {
  padding: 8px 16px;
  background: #fff;
  color: #800000;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.pwa-install-btn:hover {
  transform: scale(1.05);
}

.pwa-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
  padding: 0 5px;
}

.pwa-close-btn:hover {
  color: #fff;
}

/* ========================================
   Phase 4: Offline Indicator
   ======================================== */

.offline-indicator {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  background: #6c757d;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
}

.offline-icon {
  font-size: 16px;
}

/* ========================================
   Phase 4: Document Upload
   ======================================== */

.doc-description {
  color: #6c757d;
  font-size: 14px;
  margin-bottom: 20px;
}

.document-upload-area {
  border: 2px dashed #ced4da;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.document-upload-area:hover,
.document-upload-area.drag-over {
  border-color: #800000;
  background: rgba(128, 0, 0, 0.02);
}

.document-upload-area.has-file {
  border-style: solid;
  border-color: #800000;
  background: rgba(40, 167, 69, 0.05);
}

.document-upload-area .upload-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.document-upload-area .upload-text {
  font-size: 16px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 5px;
}

.document-upload-area .upload-subtext {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 10px;
}

.document-upload-area .upload-maxsize {
  font-size: 11px;
  color: #adb5bd;
}

/* Document Preview */
.document-preview {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.doc-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.doc-preview-name {
  font-weight: 600;
  color: #495057;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-preview-size {
  font-size: 12px;
  color: #6c757d;
}

.doc-remove-btn {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 20px;
  cursor: pointer;
  padding: 0 5px;
}

.doc-preview-content {
  display: flex;
  justify-content: center;
}

.doc-preview-img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.doc-preview-pdf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 30px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.doc-preview-pdf .pdf-icon {
  font-size: 32px;
}

.doc-preview-pdf .pdf-text {
  font-weight: 500;
  color: #495057;
}

/* OCR Options */
.ocr-options {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.ocr-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #495057;
}

.ocr-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #800000;
}

/* Document Results */
.doc-results-container {
  margin-top: 20px;
}

.doc-extracted-text {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.extracted-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.extracted-title {
  font-weight: 600;
  color: #495057;
}

.extracted-confidence {
  font-size: 12px;
  color: #800000;
  background: rgba(40, 167, 69, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

.extracted-content {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #212529;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Sentiment Section */
.doc-sentiment {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.sentiment-header {
  font-weight: 600;
  color: #495057;
  margin-bottom: 10px;
}

.sentiment-result {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sentiment-icon {
  font-size: 32px;
}

.sentiment-label {
  font-size: 16px;
  font-weight: 600;
}

.sentiment-label.positive { color: #800000; }
.sentiment-label.neutral { color: #6c757d; }
.sentiment-label.negative { color: #dc3545; }

.sentiment-score {
  font-size: 13px;
  color: #6c757d;
  margin-left: auto;
}

/* Document Error */
.doc-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: #f8d7da;
  border-radius: 8px;
  color: #721c24;
}

/* ========================================
   Phase 4: Responsive for Mobile PWA
   ======================================== */

@media (max-width: 768px) {
  .pwa-install-prompt {
    left: 10px;
    right: 10px;
    transform: none;
    flex-wrap: wrap;
    justify-content: center;
  }

  .pwa-text {
    flex: 100%;
    text-align: center;
    margin-bottom: 5px;
  }

  .lang-switcher {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }

  .lang-code {
    display: none;
  }

  .ocr-options {
    flex-direction: column;
    gap: 10px;
  }

  .document-upload-area {
    padding: 30px 15px;
  }

  .document-upload-area .upload-icon {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .pwa-install-prompt {
    bottom: 10px;
    padding: 10px 15px;
  }

  .offline-indicator {
    top: 85px;
  }
}

/* ========================================
   Phase 5: Predictive Privacy Styles
   ======================================== */

/* Predictive Tab Styles */
.predictive-description {
  color: #555;
  margin-bottom: 20px;
}

.predictive-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 20px 0;
  justify-content: center;
}

.predictive-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background: #f5f5f5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.predictive-option:hover {
  background: #e8e8e8;
}

.predictive-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #800000;
}

.predictive-option .option-icon {
  font-size: 20px;
}

.predictive-option .option-text {
  font-size: 14px;
  font-weight: 500;
}

/* Time Horizon Selector */
.time-horizon-selector {
  margin: 20px 0;
  text-align: center;
}

.time-horizon-selector label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
}

.time-horizon-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.time-btn {
  padding: 10px 20px;
  border: 2px solid #800000;
  background: white;
  color: #800000;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.time-btn:hover {
  background: #f5e6e6;
}

.time-btn.active {
  background: #800000;
  color: white;
}

/* Predictive Results */
#predictiveResults {
  margin-top: 30px;
}

/* Summary Card */
.predictive-summary-card {
  background: #800000;
  border-radius: 16px;
  padding: 25px;
  color: white;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.summary-icon {
  font-size: 28px;
}

.summary-title {
  font-size: 20px;
  font-weight: 700;
}

.summary-content {
  text-align: left;
}

.summary-risk-badge {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.risk-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.summary-text {
  margin-bottom: 10px;
  font-size: 15px;
}

.summary-quickfix {
  background: rgba(255,255,255,0.2);
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 14px;
}

/* Predictive Sections */
.predictive-section {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border: 1px solid #eee;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.section-icon {
  font-size: 28px;
}

.section-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

/* k-Anonymity Gauge */
.k-anonymity-gauge {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.gauge-circle {
  position: relative;
  width: 150px;
  height: 150px;
}

.gauge-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.gauge-bg {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke: #800000;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.gauge-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-k {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #333;
}

.gauge-label {
  display: block;
  font-size: 12px;
  color: #666;
}

.gauge-explanation {
  flex: 1;
  min-width: 200px;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
}

/* Unique Data Points */
.unique-datapoints {
  margin-top: 25px;
}

.unique-datapoints h4 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #555;
}

.datapoints-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.datapoint-item {
  display: grid;
  grid-template-columns: 40px 1fr 1fr 60px;
  gap: 10px;
  align-items: center;
  padding: 12px 15px;
  background: #f9f9f9;
  border-radius: 8px;
}

.dp-icon {
  font-size: 20px;
}

.dp-label {
  font-weight: 600;
  color: #333;
}

.dp-value {
  color: #666;
  font-style: italic;
}

.dp-uniqueness {
  font-weight: 700;
  text-align: right;
}

.dp-note {
  grid-column: 2 / -1;
  font-size: 12px;
  color: #888;
}

/* Combined Risk */
.combined-risk {
  margin-top: 25px;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 10px;
}

.combined-risk-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.combined-risk-score {
  font-size: 36px;
  font-weight: 700;
  color: #800000;
}

.combined-risk-label {
  font-size: 14px;
  color: #666;
}

.combined-risk-explanation {
  margin-bottom: 10px;
  color: #555;
}

.combined-risk-recommendation {
  padding: 12px;
  background: #ffebee;
  border-radius: 8px;
  color: #800000;
  font-size: 14px;
}

/* Breach Simulation */
.breach-scenarios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.breach-scenario-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e0e0e0;
}

.breach-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.breach-icon {
  font-size: 24px;
}

.breach-name {
  font-weight: 700;
  font-size: 15px;
  flex: 1;
}

.breach-probability {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.probability-high {
  background: #ffebee;
  color: #c62828;
}

.probability-medium {
  background: #ffebee;
  color: #f57f17;
}

.probability-low {
  background: #ffebee;
  color: #800000;
}

.breach-description {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

.breach-affected {
  font-size: 13px;
  margin-bottom: 12px;
}

.breach-damage {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.damage-label {
  font-size: 12px;
  color: #666;
}

.damage-bar {
  flex: 1;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.damage-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.damage-value {
  font-weight: 700;
  font-size: 13px;
}

.breach-consequences {
  font-size: 13px;
  margin-bottom: 10px;
}

.breach-consequences ul {
  margin: 5px 0 0 0;
  padding-left: 20px;
}

.breach-consequences li {
  margin-bottom: 4px;
}

.breach-examples {
  font-size: 11px;
  color: #888;
}

.breach-overall {
  margin-top: 20px;
  padding: 15px;
  background: #f0f0f0;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.breach-overall-score {
  display: flex;
  align-items: center;
  gap: 10px;
}

.overall-label {
  font-size: 14px;
  color: #555;
}

.overall-value {
  font-size: 28px;
  font-weight: 700;
}

.breach-worst-case {
  flex: 1;
  font-size: 14px;
  color: #555;
  display: flex;
  align-items: center;
}

/* Future Risk Timeline */
.future-timeline {
  margin-bottom: 25px;
}

.timeline-track {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 20px 0;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 4px;
  background: #800000;
  border-radius: 2px;
}

.timeline-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  background: white;
  padding: 0 10px;
}

.timeline-point.now .timeline-label {
  font-weight: 700;
  color: #800000;
}

.timeline-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.timeline-score {
  font-size: 24px;
  font-weight: 700;
  background: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border: 3px solid #e0e0e0;
}

/* Future Threats */
.future-threats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.threat-card {
  background: #fafafa;
  border-radius: 10px;
  padding: 15px;
  border: 1px solid #e0e0e0;
}

.threat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.threat-year {
  font-weight: 700;
  color: #333;
}

.threat-multiplier {
  background: #800000;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.threat-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: #555;
}

.threat-list li {
  margin-bottom: 5px;
}

/* Permanent Risks */
.permanent-risks {
  background: #ffebee;
  border-radius: 10px;
  padding: 15px 20px;
}

.permanent-risks h4 {
  margin: 0 0 12px 0;
  font-size: 15px;
  color: #800000;
}

.permanent-risks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.permanent-risk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.perm-icon {
  font-size: 18px;
}

.perm-type {
  font-weight: 600;
  color: #800000;
}

.perm-risk {
  color: #c62828;
  font-weight: 500;
}

.perm-desc {
  color: #666;
  font-size: 12px;
}

/* Correlation Attacks */
.correlation-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.correlation-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e0e0e0;
}

.corr-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.corr-icon {
  font-size: 22px;
}

.corr-name {
  flex: 1;
  font-weight: 700;
  font-size: 15px;
}

.corr-difficulty {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.difficulty-easy {
  background: #ffebee;
  color: #800000;
}

.difficulty-medium {
  background: #ffebee;
  color: #f57f17;
}

.difficulty-hard {
  background: #ffebee;
  color: #c62828;
}

.corr-confidence {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 15px;
}

.confidence-bar {
  flex: 1;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: #800000;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.corr-steps {
  font-size: 13px;
}

.corr-steps ol {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.corr-steps li {
  margin-bottom: 5px;
}

/* Attack Surface */
.attack-surface {
  background: #f5f5f5;
  border-radius: 10px;
  padding: 20px;
}

.attack-surface-score {
  font-size: 16px;
  margin-bottom: 10px;
}

.attack-surface-weakest {
  margin-bottom: 10px;
  color: #555;
}

.attack-surface-recommendation {
  padding: 12px;
  background: #ffebee;
  border-radius: 8px;
  color: #1565c0;
  font-size: 14px;
}

/* Privacy Lifespan */
.privacy-lifespan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  background: #800000;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 500;
}

.lifespan-icon {
  font-size: 24px;
}

/* Responsive for Predictive */
@media (max-width: 768px) {
  .predictive-options {
    flex-direction: column;
    align-items: stretch;
  }

  .time-horizon-buttons {
    flex-wrap: wrap;
  }

  .k-anonymity-gauge {
    flex-direction: column;
    text-align: center;
  }

  .gauge-explanation {
    text-align: center;
  }

  .datapoint-item {
    grid-template-columns: 40px 1fr 60px;
  }

  .dp-value {
    grid-column: 2;
    grid-row: 2;
  }

  .dp-note {
    grid-column: 1 / -1;
  }

  .breach-scenarios {
    grid-template-columns: 1fr;
  }

  .correlation-methods {
    grid-template-columns: 1fr;
  }

  .timeline-track {
    flex-direction: column;
    gap: 20px;
  }

  .timeline-track::before {
    top: 5%;
    bottom: 5%;
    left: 50%;
    right: auto;
    width: 4px;
    height: auto;
    background: #800000;
  }

  .timeline-point {
    flex-direction: row;
    justify-content: flex-start;
    gap: 15px;
  }

  .timeline-label {
    margin-bottom: 0;
    min-width: 60px;
  }
}

/* ========================================
   Phase 7: Digital Footprint Scanner
   ======================================== */

/* Footprint Tab Styles */
.footprint-description {
  text-align: center;
  color: #666;
  margin-bottom: 25px;
}

.footprint-scan-type {
  margin-bottom: 20px;
}

.footprint-scan-type label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.scan-type-buttons {
  display: flex;
  gap: 10px;
}

.scan-type-btn {
  flex: 1;
  padding: 15px;
  border: 2px solid #ddd;
  background: white;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.scan-type-btn:hover {
  border-color: #800000;
}

.scan-type-btn.active {
  border-color: #800000;
  background: rgba(128, 0, 0, 0.1);
  color: #800000;
}

.scan-type-btn .scan-type-text {
  color: #333;
}

.scan-type-btn.active .scan-type-text {
  color: #800000;
  font-weight: 700;
}

.scan-type-icon {
  font-size: 24px;
}

.scan-type-text {
  font-size: 14px;
  font-weight: 600;
}

/* Footprint Inputs */
.footprint-inputs {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 15px;
}

.footprint-input-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-weight: 500;
}

.footprint-input-group .input-icon {
  font-size: 16px;
}

.footprint-input-group .required {
  color: #f44336;
}

.footprint-input-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.footprint-input-group input:focus {
  border-color: #800000;
  outline: none;
}

.toggle-advanced-btn {
  background: none;
  border: none;
  color: #800000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  margin: 10px 0;
  padding: 5px 0;
}

.toggle-advanced-btn:hover {
  text-decoration: underline;
}

/* Footprint Options */
.footprint-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.footprint-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: #f5f5f5;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.footprint-option:hover {
  background: #e8e8e8;
}

.footprint-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #800000;
}

.footprint-option .option-icon {
  font-size: 20px;
}

.footprint-option .option-text {
  font-size: 14px;
}

/* Footprint Results */
.footprint-summary-card {
  background: #800000;
  color: white;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 25px;
}

.footprint-summary-card .summary-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.footprint-summary-card .summary-icon {
  font-size: 28px;
}

.footprint-summary-card .summary-title {
  font-size: 20px;
  font-weight: 600;
}

.footprint-summary-card .summary-content {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* Risk Circle */
.footprint-risk-circle {
  position: relative;
  width: 120px;
  height: 120px;
}

.footprint-risk-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.footprint-risk-circle .risk-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 8;
}

.footprint-risk-circle .risk-fill {
  fill: none;
  stroke: #800000;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
}

.footprint-risk-circle .risk-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.footprint-risk-circle .risk-score {
  display: block;
  font-size: 32px;
  font-weight: bold;
}

.footprint-risk-circle .risk-label {
  font-size: 12px;
  opacity: 0.8;
}

/* Summary Stats */
.summary-stats {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
}

.summary-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-stats .stat-value {
  font-size: 24px;
  font-weight: bold;
  min-width: 40px;
}

.summary-stats .stat-label {
  font-size: 14px;
  opacity: 0.9;
}

.summary-stats .stat-item.critical .stat-value {
  color: #800000;
}

/* Footprint Sections */
.footprint-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  overflow: hidden;
}

.footprint-section .section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: #f8f8f8;
  cursor: pointer;
  transition: background 0.3s ease;
}

.footprint-section .section-header:hover {
  background: #f0f0f0;
}

.footprint-section .section-header.collapsible {
  cursor: pointer;
}

.footprint-section .section-icon {
  font-size: 24px;
}

.footprint-section .section-header h3 {
  flex: 1;
  margin: 0;
  font-size: 18px;
}

.footprint-section .section-count {
  background: #800000;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.footprint-section .section-toggle {
  color: #666;
  font-size: 14px;
}

.footprint-section .section-content {
  padding: 20px;
}

/* Breach List */
.breach-item {
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: border-color 0.3s ease;
}

.breach-item.severity-high {
  border-left: 4px solid #f44336;
}

.breach-item.severity-medium {
  border-left: 4px solid #a60000;
}

.breach-item.severity-low {
  border-left: 4px solid #800000;
}

.breach-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.breach-name {
  font-weight: 600;
  font-size: 16px;
}

.breach-date {
  color: #666;
  font-size: 14px;
}

.breach-severity {
  margin-left: auto;
}

.severity-badge-high {
  background: #f44336;
  color: white;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 12px;
  text-transform: uppercase;
}

.severity-badge-medium {
  background: #a60000;
  color: white;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 12px;
  text-transform: uppercase;
}

.breach-details {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #666;
}

.breach-details .detail-icon {
  margin-right: 5px;
}

.breach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-tag {
  background: #ffebee;
  color: #a60000;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
}

/* Social Profile List */
.social-profile-item {
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 10px;
  margin-bottom: 10px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.profile-icon {
  font-size: 24px;
}

.profile-name {
  font-weight: 600;
}

.profile-username {
  color: #666;
  font-size: 14px;
}

.privacy-score {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

.privacy-score.score-bad {
  background: #ffebee;
  color: #c62828;
}

.privacy-score.score-medium {
  background: #ffebee;
  color: #a60000;
}

.privacy-score.score-good {
  background: #ffebee;
  color: #800000;
}

.profile-status {
  margin-bottom: 10px;
}

.status-badge {
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 13px;
}

.status-badge.public {
  background: #ffebee;
  color: #c62828;
}

.status-badge.private {
  background: #ffebee;
  color: #800000;
}

.profile-issues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.issue-tag {
  background: #ffebee;
  color: #f57c00;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
}

.profile-link a {
  color: #800000;
  text-decoration: none;
  font-size: 14px;
}

.profile-link a:hover {
  text-decoration: underline;
}

/* Data Broker List */
.databroker-item {
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 10px;
  margin-bottom: 10px;
}

.broker-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.broker-name {
  font-weight: 600;
  font-size: 16px;
}

.broker-category {
  background: #ffebee;
  color: #1565c0;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 12px;
}

.broker-region {
  color: #666;
  font-size: 13px;
}

.broker-data {
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
}

.broker-data .data-icon {
  margin-right: 5px;
}

.broker-optout {
  display: flex;
  align-items: center;
  gap: 15px;
}

.difficulty {
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 12px;
  text-transform: capitalize;
}

.difficulty-easy {
  background: #ffebee;
  color: #800000;
}

.difficulty-medium {
  background: #ffebee;
  color: #a60000;
}

.difficulty-hard {
  background: #ffebee;
  color: #c62828;
}

.time-estimate {
  color: #666;
  font-size: 13px;
}

.optout-link {
  margin-left: auto;
  color: #800000;
  text-decoration: none;
  font-weight: 500;
}

.optout-link:hover {
  text-decoration: underline;
}

/* Data Broker Summary */
.databroker-summary {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.optout-progress {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.progress-label {
  font-size: 14px;
  color: #666;
}

.progress-bar {
  flex: 1;
  height: 10px;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #800000;
  border-radius: 5px;
  transition: width 0.5s ease;
}

.progress-value {
  font-weight: 600;
  min-width: 40px;
}

.bulk-optout-btn {
  width: 100%;
  padding: 15px;
  background: #800000;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bulk-optout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(128, 0, 0, 0.3);
}

.bulk-optout-btn .btn-icon {
  font-size: 20px;
}

/* Recommendations */
.recommendation-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 10px;
  margin-bottom: 10px;
}

.recommendation-item.priority-immediate {
  border-left: 4px solid #f44336;
}

.recommendation-item.priority-shortTerm {
  border-left: 4px solid #a60000;
}

.recommendation-item.priority-longTerm {
  border-left: 4px solid #800000;
}

.rec-priority {
  flex-shrink: 0;
}

.priority-badge {
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
}

.priority-badge.immediate {
  background: #ffebee;
  color: #c62828;
}

.priority-badge.shortTerm {
  background: #ffebee;
  color: #a60000;
}

.priority-badge.longTerm {
  background: #ffebee;
  color: #800000;
}

.rec-content {
  flex: 1;
}

.rec-action {
  font-weight: 600;
  margin-bottom: 5px;
}

.rec-reason {
  color: #666;
  font-size: 14px;
}

/* Monitoring CTA */
.monitoring-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #ffebee;
  border-radius: 12px;
  margin-top: 25px;
}

.monitoring-cta .cta-icon {
  font-size: 40px;
}

.monitoring-cta .cta-content {
  flex: 1;
}

.monitoring-cta .cta-content h4 {
  margin: 0 0 5px 0;
  font-size: 18px;
  color: #800000;
}

.monitoring-cta .cta-content p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.monitoring-cta .cta-btn {
  padding: 12px 25px;
  background: #800000;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.monitoring-cta .cta-btn:hover {
  background: #800000;
}

/* Responsive */
@media (max-width: 768px) {
  .footprint-options {
    grid-template-columns: 1fr;
  }

  .footprint-summary-card .summary-content {
    flex-direction: column;
    gap: 20px;
  }

  .scan-type-buttons {
    flex-direction: column;
  }

  .breach-header,
  .broker-optout {
    flex-wrap: wrap;
  }

  .monitoring-cta {
    flex-direction: column;
    text-align: center;
  }

  .monitoring-cta .cta-btn {
    width: 100%;
  }
}

/* ========================================
   Phase 10: Smart Privacy Coach
   ======================================== */

/* Coach Tab Styles */
.coach-description {
  text-align: center;
  color: #666;
  margin-bottom: 20px;
}

.coach-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

/* Chat Container */
.coach-chat-container {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.coach-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: #800000;
  color: white;
}

.coach-avatar {
  font-size: 32px;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coach-info {
  flex: 1;
}

.coach-name {
  display: block;
  font-weight: 600;
  font-size: 16px;
}

.coach-status {
  font-size: 12px;
  opacity: 0.9;
}

.coach-status.online::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #800000;
  border-radius: 50%;
  margin-right: 5px;
}

.coach-menu-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.coach-menu-btn:hover {
  opacity: 1;
}

/* Chat Messages */
.coach-chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  min-height: 300px;
  max-height: 400px;
  background: #f8f9fa;
}

.coach-message {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  animation: messageIn 0.3s ease;
}

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

.coach-message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.coach-message.coach .message-avatar {
  background: #800000;
}

.message-content {
  max-width: 75%;
}

.message-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  line-height: 1.5;
}

.coach-message.user .message-bubble {
  background: #800000;
  color: white;
}

.coach-message.user .message-content {
  text-align: right;
}

.message-bubble p {
  margin: 0 0 10px 0;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble strong {
  color: #800000;
}

.coach-message.user .message-bubble strong {
  color: #ffcdd2;
}

.message-time {
  font-size: 11px;
  color: #999;
  margin-top: 5px;
}

.coach-message.user .message-time {
  text-align: right;
}

/* Typing Indicator */
.message-bubble.typing {
  display: flex;
  gap: 4px;
  padding: 15px 20px;
}

.message-bubble.typing .dot {
  width: 8px;
  height: 8px;
  background: #800000;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.message-bubble.typing .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.message-bubble.typing .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* Suggestions */
.coach-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  background: #f8f9fa;
  border-top: 1px solid #eee;
}

.coach-suggestion-btn {
  padding: 8px 16px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.coach-suggestion-btn:hover {
  background: #800000;
  color: white;
  border-color: #800000;
}

/* Input Form */
.coach-input-form {
  padding: 15px;
  background: white;
  border-top: 1px solid #eee;
}

.coach-input-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.coach-attach-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.3s;
}

.coach-attach-btn:hover {
  background: #f0f0f0;
}

.coach-input-container input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #eee;
  border-radius: 25px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.coach-input-container input:focus {
  border-color: #800000;
  outline: none;
}

.coach-send-btn {
  width: 44px;
  height: 44px;
  background: #800000;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.coach-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
}

.send-icon {
  font-size: 18px;
}

/* Sidebar */
.coach-sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.coach-sidebar-section {
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.coach-sidebar-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #800000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

/* Quick Actions */
.coach-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8f8f8;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
}

.quick-action-btn:hover {
  background: #800000;
  color: white;
}

.quick-action-btn .action-icon {
  font-size: 18px;
}

.quick-action-btn span:last-child {
  font-size: 13px;
}

/* Topics List */
.coach-topics-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coach-topic-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8f8f8;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
}

.coach-topic-btn:hover {
  background: #800000;
  color: white;
}

.coach-topic-btn .topic-icon {
  display: none !important;
}

.topic-info {
  display: flex;
  flex-direction: column;
}

.topic-title {
  font-weight: 600;
  font-size: 13px;
}

.topic-desc {
  font-size: 11px;
  opacity: 0.7;
}

/* Daily Tip */
.coach-daily-tip {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #800000;
  border-radius: 12px;
  color: white;
}

.coach-daily-tip .tip-icon {
  display: none !important;
}

.coach-daily-tip .tip-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: white;
}

/* Responsive */
@media (max-width: 900px) {
  .coach-container {
    grid-template-columns: 1fr;
  }

  .coach-sidebar {
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .coach-sidebar-section {
    flex: 1;
    min-width: 200px;
  }

  .coach-chat-messages {
    min-height: 250px;
  }
}

@media (max-width: 600px) {
  .coach-sidebar {
    flex-direction: column;
  }

  .message-content {
    max-width: 85%;
  }

  .coach-quick-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .quick-action-btn {
    flex: 1;
    min-width: 140px;
  }
}

/* Phase 10: Additional Styles */

/* Message Feedback */
.message-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.message-feedback {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.coach-message:hover .message-feedback {
  opacity: 1;
}

.feedback-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  opacity: 0.6;
}

.feedback-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.feedback-btn.selected {
  opacity: 1;
  background: rgba(33, 150, 243, 0.1);
}

.feedback-btn.correct {
  background: rgba(76, 175, 80, 0.2);
}

.feedback-btn.incorrect {
  background: rgba(244, 67, 54, 0.2);
}

.feedback-btn:disabled {
  cursor: default;
}

.feedback-thanks {
  font-size: 12px;
  color: #800000;
  font-style: italic;
}

/* Coach Menu Dropdown */
.coach-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.coach-menu-dropdown.show {
  display: block;
  animation: slideDown 0.2s ease;
}

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

.coach-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
  font-size: 14px;
}

.coach-menu-item:hover {
  background: #f5f5f5;
}

.coach-menu-item .menu-icon {
  font-size: 16px;
}

.coach-menu-divider {
  height: 1px;
  background: #eee;
  margin: 4px 0;
}

/* Topic Modal */
.topic-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.topic-modal {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalAppear 0.3s ease;
}

.topic-modal.large {
  max-width: 900px;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.topic-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
}

.topic-modal-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topic-icon-large {
  font-size: 36px;
}

.topic-modal-title h3 {
  margin: 0;
  font-size: 1.3em;
}

.topic-meta {
  font-size: 12px;
  color: #888;
  text-transform: capitalize;
}

.topic-modal-close {
  background: #f5f5f5;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
}

.topic-modal-close:hover {
  background: #eee;
}

.topic-modal-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.topic-introduction {
  background: #ffebee;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.topic-introduction p {
  margin: 0;
  line-height: 1.6;
}

.topic-section {
  margin-bottom: 20px;
}

.topic-section h4 {
  margin: 0 0 12px 0;
  color: #333;
}

.topic-section p {
  margin: 0 0 12px 0;
  line-height: 1.6;
}

.topic-bullets {
  margin: 0;
  padding-left: 20px;
}

.topic-bullets li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.topic-quiz {
  background: #ffebee;
  padding: 16px;
  border-radius: 12px;
  margin-top: 12px;
}

.quiz-question p {
  margin: 0 0 12px 0;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option {
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.quiz-option:hover:not(:disabled) {
  border-color: #800000;
  background: #ffebee;
}

.quiz-option.correct {
  border-color: #800000;
  background: #ffebee;
}

.quiz-option.incorrect {
  border-color: #f44336;
  background: #ffebee;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-explanation {
  margin-top: 12px;
  padding: 12px;
  background: #ffebee;
  border-radius: 8px;
  border-left: 4px solid #800000;
}

.topic-takeaways {
  background: #ffebee;
  padding: 16px;
  border-radius: 12px;
  margin-top: 20px;
}

.topic-takeaways h4 {
  margin: 0 0 12px 0;
}

.topic-takeaways ul {
  margin: 0;
  padding-left: 20px;
}

.topic-takeaways li {
  margin-bottom: 8px;
}

.topic-related {
  margin-top: 20px;
}

.topic-related h4 {
  margin: 0 0 12px 0;
}

.related-topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-topic-btn {
  padding: 8px 16px;
  background: #f5f5f5;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  text-transform: capitalize;
}

.related-topic-btn:hover {
  background: #ffebee;
  color: #800000;
}

.topic-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: center;
}

.topic-ask-btn {
  padding: 12px 24px;
  background: #800000;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}

.topic-ask-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.topic-loading {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f0f0f0;
  border-top-color: #800000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

/* Topics Overview Modal */
.topics-category {
  margin-bottom: 24px;
}

.topics-category h4 {
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.topic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: #f9f9f9;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.topic-card:hover {
  border-color: #800000;
  background: #ffebee;
  transform: translateY(-2px);
}

.topic-card-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.topic-card-title {
  font-weight: 500;
  margin-bottom: 4px;
}

.topic-card-meta,
.topic-card-desc {
  font-size: 12px;
  color: #888;
}

/* Quick Tips Enhanced */
.tip-action-btn {
  margin-top: 10px;
  padding: 8px 16px;
  background: white;
  color: #800000;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.tip-action-btn:hover {
  background: #f5f5f5;
}

.daily-challenge {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.3);
}

.challenge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.challenge-icon {
  display: none !important;
}

.challenge-title {
  font-weight: 600;
  font-size: 13px;
  color: white;
}

.challenge-desc {
  margin: 0 0 6px 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.challenge-reward {
  display: inline-block;
  padding: 4px 10px;
  background: white;
  color: #800000;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* Topic Duration in Sidebar */
.topic-duration {
  font-size: 11px;
  color: #888;
  margin-left: auto;
}

/* ========================================
   Phase 13: Privacy Policy Analyzer
   ======================================== */

.policy-description {
  text-align: center;
  color: #666;
  margin-bottom: 24px;
  font-size: 1.1em;
}

.policy-container {
  max-width: 900px;
  margin: 0 auto;
}

/* Input Section */
.policy-input-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  margin-bottom: 24px;
}

.policy-input-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 12px;
}

.policy-input-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f5f5f5;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95em;
  color: #666;
}

.policy-input-tab:hover {
  background: #e8e8e8;
}

.policy-input-tab.active {
  background: #800000;
  color: white;
}

.policy-input-tab .tab-icon {
  font-size: 1.2em;
}

/* URL Input */
.url-input-group {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.url-input-group:focus-within {
  border-color: #800000;
}

.url-prefix {
  padding: 14px 8px 14px 16px;
  color: #888;
  font-family: monospace;
  font-size: 0.95em;
}

.url-input-group input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 8px;
  font-size: 1em;
  outline: none;
}

.analyze-btn {
  padding: 14px 24px;
  background: #800000;
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s;
}

.analyze-btn:hover {
  opacity: 0.9;
}

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

.popular-urls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.popular-urls span {
  color: #888;
  font-size: 0.85em;
}

.popular-urls button {
  padding: 6px 12px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 16px;
  font-size: 0.85em;
  cursor: pointer;
  transition: all 0.2s;
}

.popular-urls button:hover {
  background: #e0e0e0;
  border-color: #800000;
}

/* Text Input */
#policyTextInput textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 0.95em;
  resize: vertical;
  min-height: 150px;
  font-family: inherit;
  transition: border-color 0.3s;
}

#policyTextInput textarea:focus {
  outline: none;
  border-color: #800000;
}

#policyTextInput .analyze-btn {
  width: 100%;
  margin-top: 12px;
  border-radius: 12px;
}

/* Known Services Grid */
.known-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.known-service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.known-service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.known-service-card.grade-a {
  border-color: #800000;
  background: #ffebee);
}

.known-service-card.grade-b {
  border-color: #8bc34a;
  background: #ffebee);
}

.known-service-card.grade-c {
  border-color: #a60000;
  background: #ffebee);
}

.known-service-card.grade-d {
  border-color: #f44336;
  background: #ffebee);
}

.known-service-card.grade-f {
  border-color: #9c27b0;
  background: #ffebee);
}

.known-service-card.highlighted {
  animation: pulse-highlight 2s infinite;
}

@keyframes pulse-highlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
}

.service-icon {
  font-size: 2em;
  margin-bottom: 8px;
}

.service-name {
  font-weight: 600;
  font-size: 0.9em;
  text-align: center;
  margin-bottom: 4px;
}

.service-grade {
  font-size: 0.8em;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}

.grade-badge-a { background: #800000; color: white; }
.grade-badge-b { background: #8bc34a; color: white; }
.grade-badge-c { background: #a60000; color: white; }
.grade-badge-d { background: #f44336; color: white; }
.grade-badge-f { background: #9c27b0; color: white; }

.service-recommended {
  font-size: 0.75em;
  color: #800000;
  margin-top: 4px;
}

.show-all-btn {
  grid-column: 1 / -1;
  padding: 12px;
  background: #f0f0f0;
  border: 2px dashed #ccc;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9em;
  color: #666;
  transition: all 0.3s;
}

.show-all-btn:hover {
  background: #e0e0e0;
  border-color: #800000;
}

/* Results Section */
.policy-results {
  animation: fadeIn 0.5s ease;
}

/* Score Card */
.policy-score-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.score-circle {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.score-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.score-circle .score-bg {
  fill: none;
  stroke: #f0f0f0;
  stroke-width: 8;
}

.score-circle .score-fill {
  fill: none;
  stroke: #800000;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
}

.score-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-value {
  font-size: 2em;
  font-weight: 700;
  display: block;
  line-height: 1;
}

.score-grade {
  font-size: 1.5em;
  font-weight: 700;
}

.score-details {
  flex: 1;
}

.score-details h3 {
  margin: 0 0 8px 0;
  font-size: 1.3em;
}

.score-label {
  font-size: 1.1em;
  font-weight: 600;
  color: #800000;
  margin: 0 0 8px 0;
}

.score-summary {
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* TLDR Section */
.policy-tldr {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border-left: 4px solid #800000;
}

.tldr-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tldr-icon {
  font-size: 1.3em;
}

.tldr-header h4 {
  margin: 0;
  font-size: 1em;
}

.policy-tldr p {
  margin: 0;
  line-height: 1.6;
  color: #444;
}

/* Policy Sections */
.policy-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.section-header.warning {
  color: #f44336;
}

.section-header.collapsible {
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
  padding: 8px 0;
  transition: color 0.3s;
}

.section-header.collapsible:hover {
  color: #800000;
}

.section-icon {
  font-size: 1.3em;
}

.section-header h4 {
  margin: 0;
  flex: 1;
}

.section-count {
  background: #800000;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.85em;
}

.section-toggle {
  color: #888;
  font-size: 0.8em;
}

.section-content {
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  margin-top: 8px;
}

/* Key Points */
.key-points-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.key-point {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #f8f9fa;
}

.key-point.positive { background: rgba(76, 175, 80, 0.1); }
.key-point.negative { background: rgba(244, 67, 54, 0.1); }
.key-point.neutral { background: rgba(255, 152, 0, 0.1); }
.key-point.info { background: rgba(33, 150, 243, 0.1); }

.point-icon {
  font-size: 1.2em;
}

.point-text {
  flex: 1;
  font-size: 0.95em;
}

/* Red Flags */
.red-flags-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.red-flag-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(244, 67, 54, 0.05);
  border: 1px solid rgba(244, 67, 54, 0.2);
}

.red-flag-item.severity-high {
  background: rgba(244, 67, 54, 0.1);
  border-color: rgba(244, 67, 54, 0.3);
}

.red-flag-item.severity-medium {
  background: rgba(255, 152, 0, 0.1);
  border-color: rgba(255, 152, 0, 0.3);
}

.red-flag-item.severity-low {
  background: rgba(33, 150, 243, 0.1);
  border-color: rgba(33, 150, 243, 0.3);
}

.flag-icon {
  font-size: 1.3em;
}

.flag-text {
  flex: 1;
  font-size: 0.95em;
}

.severity-badge {
  font-size: 0.75em;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  background: #f44336;
  color: white;
  text-transform: uppercase;
}

.severity-medium .severity-badge { background: #a60000; }
.severity-low .severity-badge { background: #800000; }

/* Breakdown Grid */
.breakdown-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.breakdown-label {
  width: 140px;
  font-size: 0.9em;
  color: #666;
}

.breakdown-bar {
  flex: 1;
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.breakdown-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.breakdown-value {
  width: 40px;
  text-align: right;
  font-weight: 600;
  font-size: 0.9em;
}

/* Data Collection */
.data-collection-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.data-category-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.data-icon {
  font-size: 1.5em;
}

.data-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.data-info strong {
  font-size: 0.95em;
}

.data-examples {
  font-size: 0.85em;
  color: #666;
}

.data-purpose {
  font-size: 0.8em;
  color: #888;
  font-style: italic;
}

/* Third Parties */
.third-parties-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.third-party-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #ccc;
}

.third-party-item.risk-low { border-left-color: #800000; }
.third-party-item.risk-medium { border-left-color: #a60000; }
.third-party-item.risk-high { border-left-color: #f44336; }

.party-name {
  font-weight: 600;
  font-size: 0.9em;
}

.party-category {
  flex: 1;
  font-size: 0.8em;
  color: #888;
}

.party-risk {
  font-size: 0.7em;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

.risk-badge-low { background: #ffebee; color: #800000; }
.risk-badge-medium { background: #ffebee; color: #a60000; }
.risk-badge-high { background: #ffebee; color: #f44336; }

/* Recommendations */
.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.policy-recommendation-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.rec-priority {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #800000;
  color: white;
  border-radius: 50%;
  font-size: 0.8em;
  font-weight: 700;
  flex-shrink: 0;
}

.rec-text {
  flex: 1;
  font-size: 0.95em;
  line-height: 1.5;
}

.no-data {
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* Compare CTA */
.policy-compare-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffebee;
  padding: 20px;
  border-radius: 12px;
  margin-top: 16px;
  border: 2px solid #800000;
}

.cta-icon {
  font-size: 2em;
}

.cta-text {
  flex: 1;
}

.cta-text strong {
  display: block;
  font-size: 1.1em;
  margin-bottom: 4px;
}

.cta-text span {
  font-size: 0.9em;
  color: #666;
}

.cta-btn {
  padding: 12px 24px;
  background: #800000;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.cta-btn:hover {
  background: #43a047;
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .policy-input-tabs {
    flex-direction: column;
  }

  .policy-score-card {
    flex-direction: column;
    text-align: center;
  }

  .url-input-group {
    flex-direction: column;
  }

  .url-prefix {
    display: none;
  }

  .url-input-group input {
    padding: 14px 16px;
  }

  .analyze-btn {
    width: 100%;
  }

  .third-parties-list {
    grid-template-columns: 1fr;
  }

  .breakdown-item {
    flex-wrap: wrap;
  }

  .breakdown-label {
    width: 100%;
    margin-bottom: 4px;
  }

  .policy-compare-cta {
    flex-direction: column;
    text-align: center;
  }
}

/* ========================================
   Phase 9: Data Breach Alerts
   ======================================== */

.alerts-description {
  text-align: center;
  color: #666;
  margin-bottom: 24px;
  font-size: 1.1em;
}

.alerts-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

/* Subscribe Section */
.alerts-subscribe-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.subscribe-card {
  background: #800000;
  color: white;
  padding: 32px;
  border-radius: 16px;
  text-align: center;
}

.subscribe-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.subscribe-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.5em;
  color: white !important;
}

.subscribe-card > p {
  margin: 0 0 24px 0;
  opacity: 0.9;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.subscribe-form .input-group {
  display: flex;
  gap: 12px;
}

.subscribe-form input[type="email"] {
  flex: 1;
  padding: 14px 18px;
  border: none;
  border-radius: 10px;
  font-size: 1em;
}

.subscribe-btn {
  padding: 14px 28px;
  background: white;
  color: #800000;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.subscribe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.subscribe-options {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9em;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.subscribe-result {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
}

.result-success, .result-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.result-icon {
  font-size: 24px;
}

.result-note {
  margin: 8px 0 0 0;
  font-size: 0.85em;
  opacity: 0.8;
}

/* Status Check Card */
.status-check-card {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.status-check-card h4 {
  margin: 0 0 16px 0;
  color: #800000;
}

.status-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-form input {
  padding: 12px;
  border: 2px solid #eee;
  border-radius: 8px;
  font-size: 0.95em;
}

.status-btn {
  padding: 12px;
  background: #800000;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.status-btn:hover {
  background: #a60000;
}

.status-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f9f9f9;
}

.status-active, .status-inactive {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.status-icon {
  font-size: 20px;
}

.status-active p, .status-inactive p {
  margin: 4px 0 0 0;
  font-size: 0.9em;
  color: #666;
}

.breach-count {
  color: #f57c00 !important;
  font-weight: 500;
}

.no-breaches {
  color: #800000 !important;
}

/* Recent Breaches Section */
.recent-breaches-section {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.recent-breaches-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.recent-breaches-section h3 {
  margin: 0;
}

.last-updated {
  font-size: 0.85em;
  color: #888;
}

.breaches-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.8em;
  font-weight: 700;
  color: #d32f2f;
}

.stat-label {
  font-size: 0.85em;
  color: #666;
}

.breaches-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.breach-card {
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.breach-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.breach-card.severity-critical {
  border-left: 4px solid #d32f2f;
}

.breach-card.severity-high {
  border-left: 4px solid #f57c00;
}

.breach-card.severity-medium {
  border-left: 4px solid #fbc02d;
}

.breach-card.severity-low {
  border-left: 4px solid #800000;
}

.breach-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f9f9f9;
}

.breach-icon {
  font-size: 28px;
}

.breach-info {
  flex: 1;
}

.breach-info h4 {
  margin: 0;
}

.breach-date {
  font-size: 0.85em;
  color: #666;
}

.severity-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
}

.severity-badge.critical {
  background: #ffebee;
  color: #c62828;
}

.severity-badge.high {
  background: #ffebee;
  color: #a60000;
}

.severity-badge.medium {
  background: #ffebee;
  color: #f9a825;
}

.severity-badge.low {
  background: #ffebee;
  color: #800000;
}

.breach-details {
  padding: 16px;
}

.breach-description {
  margin: 0 0 12px 0;
  color: #666;
  font-size: 0.95em;
}

.breach-stats {
  margin-bottom: 12px;
}

.affected-users {
  font-size: 0.9em;
  color: #666;
}

.breach-data-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.data-type-tag {
  padding: 4px 10px;
  background: #f0f0f0;
  border-radius: 16px;
  font-size: 0.8em;
}

/* How It Works */
.alerts-how-it-works {
  background: #f8f9fa;
  padding: 24px;
  border-radius: 16px;
}

.alerts-how-it-works h4 {
  margin: 0 0 20px 0;
  text-align: center;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 30px;
  position: relative;
}

.step-number {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: #800000;
  color: white;
  border-radius: 50%;
  font-size: 0.85em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  display: none !important;
}

.step-text {
  font-size: 0.95em;
  color: #333;
  margin-top: 8px;
}

/* ========================================
   Phase 11: Privacy Templates
   ======================================== */

.templates-description {
  text-align: center;
  color: #666;
  margin-bottom: 24px;
  font-size: 1.1em;
}

.templates-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Categories Grid */
.templates-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.template-category-card {
  background: white;
  border: 2px solid #eee;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.template-category-card:hover {
  border-color: var(--cat-color, #800000);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.template-category-card .category-icon {
  display: none !important;
}

.template-category-card h4 {
  margin: 0 0 8px 0;
  color: #333;
}

.template-category-card p {
  margin: 0 0 12px 0;
  color: #666;
  font-size: 0.9em;
}

.template-count {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 0.85em;
  color: #666;
}

/* Templates Browser */
.templates-browser {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.browser-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.back-btn {
  background: #f5f5f5;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.2s;
}

.back-btn:hover {
  background: #eee;
}

.browser-header h3 {
  margin: 0;
}

.templates-list {
  display: flex;
  flex-direction: column;
}

.template-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.template-list-item:hover {
  background: #f9f9f9;
}

.template-item-info h4 {
  margin: 0 0 4px 0;
}

.template-item-info p {
  margin: 0 0 8px 0;
  color: #666;
  font-size: 0.9em;
}

.template-tags {
  display: flex;
  gap: 6px;
}

.template-tags .tag {
  padding: 2px 8px;
  background: #ffebee;
  color: #800000;
  border-radius: 12px;
  font-size: 0.75em;
}

.template-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.privacy-score-mini {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: conic-gradient(#800000 var(--score, 0%), #eee var(--score, 0%));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.privacy-score-mini::before {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
}

.privacy-score-mini .score-value {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 0.85em;
}

.popularity {
  font-size: 0.85em;
  color: #888;
}

/* Template Detail */
.template-detail {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.detail-header h3 {
  flex: 1;
  margin: 0;
}

.privacy-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  background: #ffebee;
  border-radius: 12px;
}

.privacy-badge .badge-score {
  font-size: 1.4em;
  font-weight: 700;
  color: #800000;
}

.privacy-badge .badge-label {
  font-size: 0.7em;
  color: #666;
}

.template-variants {
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.template-variants h4 {
  margin: 0 0 12px 0;
}

.variants-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.variant-btn {
  display: flex;
  flex-direction: column;
  padding: 12px 20px;
  background: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.variant-btn:hover {
  background: #eee;
}

.variant-btn.active {
  background: #ffebee;
  border-color: #800000;
}

.variant-name {
  font-weight: 600;
}

.variant-tone {
  font-size: 0.8em;
  color: #888;
}

.template-customizer {
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.template-customizer h4 {
  margin: 0 0 16px 0;
}

.customizer-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.customizer-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.customizer-field label {
  font-weight: 500;
  font-size: 0.9em;
}

.customizer-field input {
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
}

.customizer-field input:focus {
  border-color: #800000;
  outline: none;
}

.field-hint {
  font-size: 0.8em;
  color: #888;
}

.template-preview {
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.template-preview h4 {
  margin: 0 0 12px 0;
}

.preview-content {
  padding: 16px;
  background: #ffebee;
  border-radius: 10px;
  font-family: inherit;
  white-space: pre-wrap;
  line-height: 1.6;
  margin-bottom: 12px;
}

.copy-btn {
  padding: 10px 20px;
  background: #800000;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: #43a047;
}

.template-tips {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tips-section {
  padding: 16px;
  border-radius: 10px;
}

.tips-section.tips-do {
  background: #ffebee;
}

.tips-section.tips-dont {
  background: #ffebee;
}

.tips-section h5 {
  margin: 0 0 12px 0;
}

.tips-section ul {
  margin: 0;
  padding-left: 20px;
}

.tips-section li {
  margin-bottom: 6px;
  font-size: 0.9em;
}

/* Templates Analyzer */
.templates-analyzer {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  margin-top: 24px;
}

.analyzer-header {
  margin-bottom: 16px;
}

.analyzer-header h4 {
  margin: 0 0 4px 0;
}

.analyzer-header p {
  margin: 0;
  color: #666;
  font-size: 0.95em;
}

.analyzer-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.analyzer-form textarea {
  padding: 14px;
  border: 2px solid #eee;
  border-radius: 10px;
  font-size: 1em;
  resize: vertical;
}

.analyzer-form textarea:focus {
  border-color: #800000;
  outline: none;
}

.analyzer-context {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analyzer-context select {
  flex: 1;
  padding: 10px;
  border: 2px solid #eee;
  border-radius: 8px;
  font-size: 0.95em;
}

.analyze-result {
  margin-top: 20px;
}

.analyze-result-card {
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
}

.analyze-result-card .result-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: white;
  border-bottom: 1px solid #eee;
}

.result-score {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: conic-gradient(var(--grade-color, #800000) calc(var(--score, 0) * 1%), #eee calc(var(--score, 0) * 1%));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.result-score::before {
  content: '';
  position: absolute;
  width: 58px;
  height: 58px;
  background: white;
  border-radius: 50%;
}

.result-score .score-value,
.result-score .score-grade {
  position: relative;
  z-index: 1;
}

.result-score .score-value {
  font-size: 1.2em;
  font-weight: 700;
  line-height: 1;
}

.result-score .score-grade {
  font-size: 0.8em;
  color: #888;
}

.result-summary h4 {
  margin: 0 0 4px 0;
}

.result-summary p {
  margin: 0;
  color: #666;
}

.result-issues {
  padding: 20px;
}

.result-issues h5 {
  margin: 0 0 12px 0;
}

.issue-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 4px solid #f44336;
}

.issue-item.severity-medium {
  border-left-color: #a60000;
}

.issue-item.severity-low {
  border-left-color: #a60000;
}

.issue-found {
  font-weight: 500;
  color: #d32f2f;
}

.issue-suggestion {
  font-size: 0.9em;
  color: #666;
}

.result-suggestion {
  padding: 20px;
  background: #ffebee;
}

.result-suggestion h5 {
  margin: 0 0 12px 0;
}

.suggested-text {
  padding: 12px;
  background: white;
  border-radius: 8px;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.copy-suggestion-btn {
  padding: 8px 16px;
  background: #800000;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
}

/* Responsive Styles for Phase 9 & 11 */
@media (max-width: 768px) {
  .alerts-subscribe-section {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .templates-categories {
    grid-template-columns: 1fr;
  }

  .template-tips {
    grid-template-columns: 1fr;
  }

  .template-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .template-item-meta {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .subscribe-form .input-group {
    flex-direction: column;
  }

  .subscribe-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .variants-grid {
    flex-direction: column;
  }

  .variant-btn {
    width: 100%;
  }
}

/* ========================================
   Phase 11: Extended Features
   ======================================== */

/* Templates Toolbar */
.templates-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
}

.search-container {
  flex: 1;
  position: relative;
}

.search-container .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  z-index: 1;
}

.search-container input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #eee;
  border-radius: 10px;
  font-size: 1em;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.search-container input:focus {
  border-color: #800000;
  outline: none;
}

.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.search-loading,
.search-no-results,
.search-error {
  padding: 16px;
  text-align: center;
  color: #888;
}

.search-results-list {
  display: flex;
  flex-direction: column;
}

.search-result-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  border-bottom: 1px solid #f0f0f0;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f5f5f5;
}

.result-name {
  font-weight: 500;
}

.result-category {
  font-size: 0.85em;
  color: #888;
  text-transform: capitalize;
}

/* GDPR Generator Button */
.gdpr-generator-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #800000;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.gdpr-generator-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.gdpr-generator-btn .btn-icon {
  font-size: 18px;
}

/* GDPR Generator Modal */
.gdpr-type-selector {
  margin-bottom: 24px;
}

.gdpr-type-selector h4 {
  margin: 0 0 16px 0;
}

.gdpr-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.gdpr-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.gdpr-type-btn:hover {
  background: #eee;
}

.gdpr-type-btn.active {
  background: #ffebee;
  border-color: #800000;
}

.gdpr-type-btn .type-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.gdpr-type-btn .type-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.gdpr-type-btn .type-desc {
  font-size: 0.75em;
  color: #666;
}

.gdpr-template-content {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
}

.gdpr-template-header {
  margin-bottom: 20px;
}

.gdpr-template-header .template-info h4 {
  margin: 0 0 8px 0;
}

.legal-basis {
  display: inline-block;
  padding: 4px 10px;
  background: #ffebee;
  color: #800000;
  border-radius: 20px;
  font-size: 0.8em;
  margin-right: 10px;
}

.response-deadline {
  font-size: 0.9em;
  color: #666;
}

.gdpr-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gdpr-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gdpr-form label {
  font-weight: 500;
  font-size: 0.9em;
}

.gdpr-input {
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
}

.gdpr-input:focus {
  border-color: #800000;
  outline: none;
}

.gdpr-preview {
  padding: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95em;
  line-height: 1.6;
  background: white;
  resize: vertical;
}

.gdpr-tips {
  background: #ffebee;
  padding: 16px;
  border-radius: 10px;
}

.gdpr-tips h5 {
  margin: 0 0 10px 0;
}

.gdpr-tips ul {
  margin: 0;
  padding-left: 20px;
}

.gdpr-tips li {
  margin-bottom: 6px;
  font-size: 0.9em;
}

.gdpr-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.download-btn {
  padding: 12px 24px;
  background: #f5f5f5;
  color: #333;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.download-btn:hover {
  background: #eee;
  border-color: #ccc;
}

/* Favorite Button */
.favorite-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  transition: transform 0.2s;
}

.favorite-btn:hover {
  transform: scale(1.2);
}

.favorite-btn.active {
  animation: heartPop 0.3s ease;
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Responsive for Phase 11 Extended */
@media (max-width: 768px) {
  .templates-toolbar {
    flex-direction: column;
  }

  .gdpr-generator-btn {
    width: 100%;
    justify-content: center;
  }

  .gdpr-types-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gdpr-actions {
    flex-direction: column;
  }

  .gdpr-actions button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .gdpr-types-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Spell Check Feature
   ======================================== */

.form-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.spell-check-btn {
  padding: 14px 24px;
  background: white;
  color: #800000;
  border: 2px solid #800000;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.spell-check-btn:hover {
  background: #800000;
  color: white;
}

.spell-check-results {
  margin-top: 20px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  text-align: left;
}

.spell-check-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.spell-check-header h3 {
  margin: 0;
  color: #800000;
}

.spell-check-stats {
  display: flex;
  gap: 16px;
}

.spell-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
  color: #666;
}

.spell-stat .count {
  font-weight: 700;
  color: #800000;
}

.correction-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.correction-item {
  padding: 12px 16px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #800000;
}

.correction-item.spelling {
  border-left-color: #d32f2f;
}

.correction-item.grammar {
  border-left-color: #ff9800;
}

.correction-item.punctuation {
  border-left-color: #2196f3;
}

.correction-item.style {
  border-left-color: #9c27b0;
}

.correction-original {
  font-family: monospace;
  background: #ffebee;
  padding: 2px 6px;
  border-radius: 4px;
  color: #d32f2f;
  text-decoration: line-through;
}

.correction-arrow {
  margin: 0 8px;
  color: #666;
}

.correction-suggestion {
  font-family: monospace;
  background: #e8f5e9;
  padding: 2px 6px;
  border-radius: 4px;
  color: #2e7d32;
  cursor: pointer;
}

.correction-suggestion:hover {
  background: #c8e6c9;
}

.correction-message {
  font-size: 0.85em;
  color: #666;
  margin-top: 6px;
}

.correction-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75em;
  font-weight: 600;
  margin-left: 8px;
}

.correction-type.spelling {
  background: #ffebee;
  color: #d32f2f;
}

.correction-type.grammar {
  background: #fff3e0;
  color: #ff9800;
}

.correction-type.punctuation {
  background: #e3f2fd;
  color: #2196f3;
}

.correction-type.style {
  background: #f3e5f5;
  color: #9c27b0;
}

.spell-check-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.apply-corrections-btn {
  padding: 10px 20px;
  background: #800000;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.apply-corrections-btn:hover {
  background: #a60000;
}

.no-errors {
  text-align: center;
  padding: 30px;
  color: #2e7d32;
}

.no-errors h4 {
  margin: 0 0 8px 0;
  color: #2e7d32;
}
