* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #b91c1c;
  --bg: #f9fafb;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --text-secondary: #6b7280;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.disclaimer {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  padding: 1rem;
  margin: 2rem 0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.disclaimer strong {
  display: block;
  margin-bottom: 0.5rem;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem;
}

.upload-section {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.upload-instructions {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.upload-box {
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  background: var(--bg);
}

.upload-box input {
  display: none;
}

.upload-file {
  margin-bottom: 1rem;
}

.upload-file:last-child {
  margin-bottom: 0;
}

.upload-label {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  background: var(--primary);
  color: white;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
  font-weight: 500;
  height: 48px;
  line-height: 32px;
}

.upload-label:hover {
  background: var(--primary-dark);
}

.divider {
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

button {
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  font-weight: 500;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  height: 52px;
  line-height: 32px;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f3f4f6;
  color: var(--text);
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  margin-left: 0.5rem;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.file-list {
  margin-bottom: 1.5rem;
}

.file-item {
  padding: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-item.success {
  background: #ecfdf5;
  border-color: #d1fae5;
  color: #065f46;
}

.file-item.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.file-item-text {
  flex: 1;
  font-size: 0.95rem;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
}

thead {
  background: #f3f4f6;
  border-bottom: 2px solid var(--border);
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

th {
  font-weight: 600;
  color: var(--text);
}

tbody tr:hover {
  background: var(--bg);
}

.number {
  text-align: right;
  font-family: "Monaco", "Courier New", monospace;
}

.flag-possible {
  background: #fff7ed;
  color: #92400e;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.flag-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.cta-box {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 2px solid #1d4ed8;
  padding: 2.5rem 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  margin: 2rem 0;
  display: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.cta-box h3 {
  margin-bottom: 0.5rem;
  color: white;
  font-size: 1.25rem;
}

.cta-description {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.cta-button {
  background: white;
  color: #2563eb;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  width: 100%;
  height: 52px;
  line-height: 32px;
  margin-bottom: 0;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
  background: #f0f0f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.section {
  margin: 2rem 0;
}

h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.competitor-table {
  margin-top: 2rem;
}

.competitor-table table {
  font-size: 0.85rem;
}

.competitor-table {
  overflow-x: auto;
}

.competitor-table table {
  min-width: 100%;
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .competitor-table {
    font-size: 0.75rem;
  }
  .competitor-table th,
  .competitor-table td {
    padding: 0.5rem 0.25rem;
  }
}

.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.25em;
  margin-right: 0.25em;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.modal-subheader {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.modal-features {
  background: #f0f7ff;
  border-left: 4px solid var(--primary);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.modal-features ul {
  margin: 0;
  padding-left: 1.25rem;
}

.modal-features li {
  margin-bottom: 0.5rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-form input {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
}

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

.modal-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.modal-buttons button {
  flex: 1;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.modal-btn-submit:hover {
  background: var(--primary-dark);
}

.modal-btn-cancel {
  background: var(--border);
  color: var(--text);
}

.modal-btn-cancel:hover {
  background: #d1d5db;
}

.modal-privacy {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  line-height: 1.4;
}

.modal-success {
  text-align: center;
}

.modal-success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.modal-success-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 0.5rem;
}

.modal-success-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
