/* Modern Accessibility Checker Frontend */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --accent: #ec4899;
  --accent-light: #f472b6;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --bg-light: #f8fafc;
  --bg-lighter: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --border: #e2e8f0;
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(0deg, #f9f4bec7 0%, #f9f4be 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  margin: 0;
  min-height: 100vh;
  padding: 0.5em;
}

.container {
  max-width: 1000px;
  margin: 2em auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 2.5em;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

h1 {
  font-size: 2.5em;
  color: var(--primary);
  margin: 0 0 0.5em 0;
  font-weight: 800;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 1.8em;
  color: var(--primary);
  margin: 0 0 1.5em 0;
  font-weight: 700;
}

h3 {
  font-size: 1.1em;
  color: var(--text-primary);
  margin: 0;
  font-weight: 600;
}

h4 {
  font-size: 1em;
  color: var(--text-primary);
  margin: 0;
  font-weight: 600;
}

h5 {
  font-size: 0.95em;
  color: var(--primary);
  margin: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

h6 {
  font-size: 0.85em;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.desc {
  color: var(--text-secondary);
  font-size: 1.05em;
  margin: 0 0 2em 0;
  line-height: 1.6;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Form Styling */
form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  margin-bottom: 1.5em;
}

label {
  font-size: 0.95em;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.3px;
}

input[type="url"],
input[type="number"] {
  padding: 0.9em 1.1em;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1em;
  background: var(--bg-light);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

input[type="url"]:focus,
input[type="number"]:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input[type="url"]::placeholder,
input[type="number"]::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

button {
  padding: 0.95em 2em;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.3px;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.toggle-btn {
  padding: 0.7em 1.4em;
  font-size: 0.95em;
  background: var(--bg-lighter);
  color: var(--text-primary);
  border: 2px solid var(--border);
  transition: all 0.2s ease;
}

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

.back-btn {
  padding: 0.8em 1.6em;
  font-size: 0.95em;
  background: var(--accent);
}

/* Status and Spinner */
#status {
  margin-top: 1.5em;
  min-height: 1.5em;
  color: var(--text-secondary);
  font-size: 1.05em;
  text-align: center;
  font-weight: 500;
}

#spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5em;
}

.lds-dual-ring {
  display: inline-block;
  width: 50px;
  height: 50px;
}

.lds-dual-ring:after {
  content: " ";
  display: block;
  width: 40px;
  height: 40px;
  margin: 5px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  border-color: var(--primary) transparent var(--accent) transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Results Header */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2em;
  gap: 2em;
  flex-wrap: wrap;
}

.results-header h2 {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1em;
  flex-wrap: wrap;
}

.view-toggle {
  display: flex;
  gap: 0.5em;
}

/* Scan Title Section */
.scan-title-section {
  margin-bottom: 2.5em;
  padding-bottom: 1.5em;
  border-bottom: 2px solid var(--border);
}

.scan-title-section h2 {
  margin: 0 0 0.5em 0;
  color: var(--primary);
  font-size: 1.8em;
  font-weight: 700;
  word-break: break-word;
}

.scan-date-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1em;
  font-weight: 500;
}

/* Statistics */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2em;
  margin-bottom: 2.5em;
  padding-bottom: 2em;
  border-bottom: 2px solid var(--border);
}

.stat-item {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 1.5em;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  color: white;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 0.9em;
  opacity: 0.95;
  font-weight: 500;
}

.stat-value {
  font-size: 2.2em;
  font-weight: 800;
  letter-spacing: -1px;
}

/* Page Result Cards */
.page-result {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.2em;
  overflow: hidden;
  transition: all 0.2s ease;
}

.page-result:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.page-header {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 1.5em;
  background: var(--bg-lighter);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.2s ease;
}

.page-header:hover {
  background: var(--bg-light);
}

.page-header h3 {
  flex: 1;
  word-break: break-word;
  font-size: 1em;
  color: var(--text-primary);
}

.page-content {
  padding: 1.5em;
  border-top: 1px solid var(--border);
}

/* Badges */
.issue-count-badge,
.clean-badge,
.error-badge {
  display: inline-block;
  padding: 0.45em 0.95em;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.issue-count-badge {
  background: rgba(236, 72, 153, 0.1);
  color: var(--accent);
}

.clean-badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.error-badge {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.error-message {
  color: var(--error);
  font-weight: 600;
  margin: 0;
  padding: 1em 0;
}

/* Issue Cards */
.issues-container {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.issue-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.issue-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.issue-header {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 1.2em;
  background: var(--bg-lighter);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.2s ease;
  flex-wrap: wrap;
}

.issue-header:hover {
  background: var(--bg-light);
}

.issue-header h4 {
  flex: 1;
  min-width: 250px;
  color: var(--text-primary);
}

.issue-content {
  display: none;
  padding: 1.5em;
  border-top: 1px solid var(--border);
}

/* Collapse Buttons */
.collapse-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.1em;
  cursor: pointer;
  padding: 0.3em 0.5em;
  transition: color 0.2s ease;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.8em;
  height: 1.8em;
  flex-shrink: 0;
}

.collapse-btn:hover {
  color: var(--accent);
}

.collapse-btn.page-level {
  width: 1.5em;
  height: 1.5em;
  font-size: 1em;
}

.collapse-btn.group-level {
  width: 2em;
  height: 2em;
  font-size: 1.2em;
}

/* Impact Badges */
.impact-badge {
  display: inline-block;
  padding: 0.45em 0.95em;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.impact-critical {
  background: rgba(239, 68, 68, 0.15);
  color: #991b1b;
}

.impact-serious {
  background: rgba(249, 115, 22, 0.15);
  color: #92400e;
}

.impact-moderate {
  background: rgba(245, 158, 11, 0.15);
  color: #78350f;
}

.impact-minor {
  background: rgba(59, 130, 246, 0.15);
  color: #1e40af;
}

/* Conformance Badges */
.conformance-badge::after {
  background-color: #f9f4be;
  border-radius: 45px;
  margin-left: 0.4em;
}

.conformance-AAA::after {
  content: "🥇";
}

.conformance-AA::after {
  content: "🥈";
}

.conformance-A::after {
  content: "🥉";
}

/* Issue Details */
.issue-details {
  margin-bottom: 1.5em;
}

.detail-group {
  margin-bottom: 1.8em;
}

.detail-group:last-child {
  margin-bottom: 0;
}

.detail-group h5 {
  margin-bottom: 0.8em;
}

.detail-group p {
  margin: 0.6em 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Share Box */
.share-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 2em;
  border-radius: 12px;
  color: white;
  margin: 2em 0;
}

.share-box p {
  margin: 0 0 1em 0;
  font-size: 1.1em;
  font-weight: 600;
}

.view-results-btn {
  display: inline-block;
  margin-top: 1em;
  padding: 0.9em 1.8em;
  background: white;
  color: var(--primary);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.view-results-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Scan List */
.scans-search {
  margin-bottom: 1.5em;
}

.search-input {
  width: 100%;
  padding: 0.95em 1.2em;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1em;
  background: var(--bg-light);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.search-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.scan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
  padding: 1.2em;
  background: white;
  border: 2px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1em;
  transition: all 0.2s ease;
  flex-wrap: wrap;
}

.scan-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.scan-info {
  flex: 1;
  min-width: 200px;
}

.scan-info h4 {
  margin: 0 0 0.5em 0;
  color: var(--text-primary);
}

.scan-date {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9em;
}

.scan-badges {
  display: flex;
  gap: 0.8em;
  align-items: center;
}

.score-badge {
  display: inline-block;
  padding: 0.45em 0.95em;
  background: var(--primary);
  color: white;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
}

.scan-actions {
  display: flex;
  gap: 0.8em;
  align-items: center;
  white-space: nowrap;
}

.share-scan-btn {
  display: inline-block;
  padding: 0.7em 1.4em;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95em;
}

.share-scan-btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

.scan-link {
  display: inline-block;
  padding: 0.7em 1.4em;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.scan-link:hover {
  background: var(--primary-light);
  transform: translateX(3px);
}

/* Error Box */
.error-box {
  text-align: center;
  padding: 3em 2em;
  background: rgba(239, 68, 68, 0.05);
  border: 2px solid var(--error);
  border-radius: 12px;
  margin: 2em 0;
}

.error-box h2 {
  color: var(--error);
}

.error-box p {
  color: var(--text-secondary);
  margin: 1em 0 2em 0;
}

.detail-group code {
  background: var(--bg-lighter);
  padding: 0.3em 0.6em;
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--primary);
  word-break: break-all;
  font-family: 'Courier New', monospace;
}

/* Code Snippets */
.code-snippet {
  background: var(--bg-lighter);
  padding: 1.2em;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0.8em 0;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.code-snippet code {
  font-family: 'Courier New', monospace;
  color: var(--text-primary);
  font-size: 0.85em;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

/* Screenshots */
.screenshot-container {
  margin-top: 1.5em;
  padding-top: 1.5em;
  border-top: 1px solid var(--border);
}

.screenshot-container h5 {
  margin-bottom: 1em;
}

.issue-screenshot {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Help Link */
.help-link {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-top: 1em;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.help-link:hover {
  color: var(--accent);
  transform: translateX(3px);
}

/* Issue Groups (By-Issue View) */
.issue-group {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.2em;
  overflow: hidden;
  transition: all 0.2s ease;
}

.issue-group:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.group-header {
  padding: 1.5em;
  background: var(--bg-lighter);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 1em;
}

.group-header:hover {
  background: var(--bg-light);
}

.issue-title-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

.badge-group {
  display: flex;
  gap: 0.6em;
  flex-wrap: wrap;
  align-items: center;
}

.count-badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  padding: 0.45em 0.95em;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
}

.group-content {
  display: none;
  padding: 1.5em;
  border-top: 1px solid var(--border);
}

/* Affected Pages */
.affected-pages {
  margin-top: 2em;
}

.affected-pages h4 {
  color: var(--primary);
  margin-bottom: 1.2em;
  font-weight: 700;
}

.page-instance {
  background: var(--bg-lighter);
  border-left: 4px solid var(--accent);
  padding: 1.2em;
  margin-bottom: 1em;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.page-instance-header {
  display: flex;
  align-items: center;
  gap: 1em;
  width: 100%;
}

.page-instance:hover {
  background: var(--bg-light);
}

.page-instance h5 {
  display: flex;
  align-items: center;
  gap: 0.8em;
  word-break: break-word;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: normal;
  font-size: 1em;
  opacity: 1;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  margin: 0;
}

.page-instance p {
  margin: 0.8em 0 0 0;
  color: var(--text-secondary);
  font-size: 0.95em;
}

.page-instance-content {
  display: none;
  margin-top: 1.2em;
  padding-top: 1.2em;
  border-top: 1px solid var(--border);
}

.page-instance-content h6 {
  margin: 1.2em 0 0.8em 0;
  color: var(--primary);
}

/* No Issues State */
.no-issues {
  text-align: center;
  padding: 3em 2em;
  color: var(--success);
  font-size: 1.2em;
  font-weight: 600;
}

.no-issues p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8em;
}

/* Share Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 2em;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

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

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content h3 {
  margin: 0 0 0.5em 0;
  color: var(--primary);
  font-size: 1.5em;
}

.modal-content h2 {
  margin: 0 0 0.5em 0;
  color: var(--primary);
  font-size: 1.5em;
}

.modal-content p {
  margin: 0 0 1.5em 0;
  color: var(--text-secondary);
  font-size: 0.95em;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

#login-form label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4em;
}

#login-form input[type="password"] {
  padding: 0.9em 1.1em;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1em;
  background: var(--bg-light);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

#login-form input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: white;
}

#login-form button[type="submit"] {
  width: 100%;
  padding: 0.95em 1.5em;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

#login-form button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

#login-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5em;
  gap: 1em;
}

.header-bar h1 {
  margin: 0;
  flex: 1;
}

.logout-btn {
  padding: 0.7em 1.4em;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95em;
}

.logout-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

.share-input-group {
  display: flex;
  gap: 0.7em;
  margin-bottom: 1.5em;
}

.share-input-group input {
  flex: 1;
  padding: 0.9em 1.1em;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.9em;
  background: var(--bg-light);
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
}

.share-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.copy-btn {
  padding: 0.9em 1.5em;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.close-modal-btn {
  width: 100%;
  padding: 0.9em 1.5em;
  background: var(--bg-lighter);
  color: var(--text-primary);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-modal-btn:hover {
  background: var(--bg-light);
  border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1.5em;
    border-radius: 12px;
  }

  .header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1em;
  }

  .header-bar h1 {
    text-align: center;
  }

  .logout-btn {
    width: 100%;
  }

  h1 {
    font-size: 2em;
  }

  h2 {
    font-size: 1.4em;
  }

  .desc {
    font-size: 0.95em;
  }

  .results-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1em;
  }

  .results-header h2 {
    min-width: auto;
    margin-bottom: 0;
  }

  .header-controls {
    flex-direction: column;
  }

  .view-toggle {
    width: 100%;
  }

  .toggle-btn {
    flex: 1;
    padding: 0.8em 1em;
  }

  .back-btn {
    width: 100%;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 1em;
  }

  .page-header,
  .issue-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header h3,
  .issue-header h4 {
    width: 100%;
  }

  .issue-header {
    gap: 0.8em;
  }

  .group-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .badge-group {
    width: 100%;
  }

  .code-snippet {
    padding: 1em;
    font-size: 0.8em;
  }

  input[type="url"],
  input[type="number"] {
    font-size: 16px;
  }

  .modal-content {
    width: 95%;
    padding: 1.5em;
  }

  .share-input-group {
    flex-direction: column;
  }

  .copy-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1em;
  }

  h1 {
    font-size: 1.6em;
    margin-bottom: 0.3em;
  }

  h5 {
    font-size: 0.85em;
  }

  .collapse-btn {
    width: 1.4em;
    height: 1.4em;
    font-size: 0.9em;
  }

  .page-header,
  .issue-header {
    padding: 1em;
  }

  .impact-badge {
    font-size: 0.7em;
  }

  .stats {
    gap: 0.8em;
  }

  .stat-item {
    padding: 1.2em;
  }

  .stat-value {
    font-size: 1.8em;
  }
}