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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e5e7eb;
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
}

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

/* Header */
header {
  text-align: center;
  margin-bottom: 48px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.subtitle {
  color: #94a3b8;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
}

/* Card */
.card {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 32px);
  margin-bottom: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Controls */
.controls {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .controls {
    grid-template-columns: 1fr auto auto;
  }
}

input[type="file"] {
  background: rgba(30, 41, 59, 0.5);
  border: 2px dashed #475569;
  padding: 16px;
  color: #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

input[type="file"]:hover {
  border-color: #3b82f6;
  background: rgba(30, 41, 59, 0.8);
}

button {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  font-size: 1rem;
  white-space: nowrap;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

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

button.secondary {
  background: linear-gradient(135deg, #10b981, #059669);
}

button.secondary:hover:not(:disabled) {
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

/* Loader */
.loader {
  margin: 24px 0;
  display: none;
}

.loader.active {
  display: block;
}

.progress {
  width: 100%;
  height: 12px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  font-size: 0.9rem;
  color: #94a3b8;
  text-align: center;
  display: block;
}

/* Results Summary */
.results-summary {
  display: none;
  padding: 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  margin-bottom: 24px;
}

.results-summary.active {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.results-summary .stats {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Issue Card */
.issue {
  background: rgba(15, 23, 42, 0.8);
  border-left: 4px solid #ef4444;
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.issue:hover {
  background: rgba(15, 23, 42, 0.95);
  transform: translateX(4px);
}

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

.issue-line {
  font-weight: 700;
  color: #fca5a5;
  font-size: 0.95rem;
}

.issue-content {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.invalid-char {
  background: rgba(239, 68, 68, 0.3);
  color: #fecaca;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 600;
}

.suggestion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(59, 130, 246, 0.1);
  padding: 12px;
  border-radius: 8px;
  gap: 12px;
  flex-wrap: wrap;
}

.suggestion-text {
  color: #93c5fd;
  font-size: 0.9rem;
  flex: 1;
}

.suggestion-text strong {
  color: #60a5fa;
}

.fix-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 8px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 10px 16px;
  font-size: 0.9rem;
  min-width: 44px;
}

.pagination .page-info {
  color: #94a3b8;
  font-size: 0.95rem;
  padding: 0 12px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #94a3b8;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
  color: #64748b;
  font-size: 0.9rem;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

/* Responsive */
@media (max-width: 640px) {
  body {
    padding: 12px;
  }

  .card {
    padding: 16px;
  }

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