:root {
  --bg-color: #0f172a;
  --surface-color: rgba(30, 41, 59, 0.7);
  --surface-hover: rgba(51, 65, 85, 0.8);
  --border-color: rgba(148, 163, 184, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-color: #8b5cf6;
  --accent-hover: #7c3aed;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Glassmorphism utility */
.glass {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Navbar */
header {
  padding: 1.5rem 0;
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--accent-color);
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 4rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #f8fafc, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Form */
.scan-form {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  gap: 1rem;
  position: relative;
}

.scan-input {
  flex: 1;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

.scan-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  color: white;
  box-shadow: 0 4px 14px 0 rgba(139, 92, 246, 0.39);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.23);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--surface-hover);
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin-top: 2rem;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

th {
  text-align: left;
  padding: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 1rem;
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

td:first-child {
  border-left: 1px solid var(--border-color);
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}

td:last-child {
  border-right: 1px solid var(--border-color);
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

tr.scan-row {
  transition: var(--transition);
}

tr.scan-row:hover td {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

/* Badges */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.pending, .badge.running {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-color);
}

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

.badge.failed {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger-color);
}

/* Result Page */
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.score-container {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-bottom: 3rem;
}

.score-circle {
  width: 160px;
  height: 160px;
  min-width: 160px;
  min-height: 160px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--accent-color) calc(var(--score) * 1%), rgba(255, 255, 255, 0.05) 0);
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.05);
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 30px var(--accent-color), inset 0 0 10px rgba(255, 255, 255, 0.05); }
  100% { box-shadow: 0 0 50px var(--accent-color), inset 0 0 20px rgba(255, 255, 255, 0.1); }
}

.score-circle::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--bg-color);
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.5);
}

.score-value {
  position: relative;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.score-label {
  position: relative;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.score-info h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.score-info p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.checks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.check-card {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
}

.check-card:hover {
  transform: translateY(-5px);
  background: linear-gradient(145deg, rgba(51, 65, 85, 0.6), rgba(30, 41, 59, 0.8));
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.check-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.check-icon.pass {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-color);
}

.check-icon.warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-color);
}

.check-icon.fail {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger-color);
}

.check-icon.pending {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.check-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.check-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

#loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .scan-form { flex-direction: column; }
  .btn { width: 100%; }
  .score-container { flex-direction: column; text-align: center; gap: 1.5rem; }
}

/* Feedback Overlay */
.feedback-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.feedback-overlay.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.feedback-card {
    max-width: 480px;
    width: 90%;
    padding: 2.5rem;
    text-align: center;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.feedback-stars-section h2 { margin-bottom: 0.5rem; font-size: 1.5rem; }
.feedback-stars-section p { color: var(--text-secondary); margin-bottom: 1.5rem; }

.feedback-stars {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.feedback-stars i {
    font-size: 2.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.feedback-stars i:hover,
.feedback-stars i.active { color: #f59e0b; }

.feedback-card textarea {
    width: 100%;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    resize: none;
    margin-bottom: 1rem;
}
.feedback-card textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Review & Saran Card */
.review-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(30, 41, 59, 0.9));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.1), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.review-quote-icon {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: rgba(139, 92, 246, 0.15);
}

.review-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.review-label {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.review-suggestions {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.review-suggestions li {
    padding: 0.6rem 0.75rem 0.6rem 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
    border-left: 2px solid rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.03);
    border-radius: 0 8px 8px 0;
}

.review-suggestions li::before {
    content: "→";
    position: absolute;
    left: 0.4rem;
    color: var(--accent-color);
    font-style: normal;
}

.review-footer {
    margin-top: 1.5rem;
    text-align: right;
    color: rgba(139, 92, 246, 0.5);
    font-size: 0.85rem;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* Site Footer */
.site-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Legal Pages */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.legal-updated {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.legal-card {
    padding: 2rem 2.5rem;
    border-radius: var(--radius);
}

.legal-card h2 {
    font-size: 1.15rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.legal-card h2:first-child {
    margin-top: 0;
}

.legal-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.legal-card ul {
    color: var(--text-secondary);
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.legal-card ul li {
    margin-bottom: 0.35rem;
}

.legal-card code {
    background: rgba(139, 92, 246, 0.15);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-color);
}
