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

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  color: #1e293b;
  min-height: 100vh;
}

.app {
  width: 100%;
  max-width: 900px;
  margin: auto;
  padding: 30px 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

header p {
  font-size: 18px;
  color: #64748b;
}

section {
  background: white;
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

h2 {
  margin-bottom: 12px;
}

h3 {
  margin: 20px 0 10px;
}

.hint {
  color: #64748b;
  margin-bottom: 20px;
}

.upload-button,
.compare-button {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 10px;
  background: #4f46e5;
  color: white;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 20px;
}

.upload-button:hover,
.compare-button:hover {
  opacity: 0.9;
}

.preview-container {
  min-height: 180px;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0 20px;
  overflow: hidden;
  color: #94a3b8;
}

.preview-container img {
  max-width: 100%;
  max-height: 350px;
  object-fit: contain;
  border-radius: 10px;
}

.analyze-button,
.compare-action {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: #0f172a;
  color: white;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
}

.analyze-button:disabled,
.compare-action:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

.result-summary {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.result-box {
  flex: 1;
  padding: 20px;
  border-radius: 14px;
  text-align: center;
}

.result-box span {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.result-box strong {
  font-size: 32px;
}

.real {
  background: #dcfce7;
  color: #166534;
}

.fake {
  background: #fee2e2;
  color: #991b1b;
}

.graph {
  width: 100%;
  height: 35px;
  background: #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
}

.fake-bar {
  width: 0%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ef4444;
  color: white;
  font-weight: bold;
  transition: width 0.8s ease;
}

.features {
  margin-top: 15px;
}

.features ul {
  padding-left: 25px;
}

.features li {
  margin: 10px 0;
}

.compare-toggle {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  border: 2px dashed #4f46e5;
  border-radius: 10px;
  background: transparent;
  color: #4f46e5;
  font-weight: bold;
  cursor: pointer;
}

.compare-toggle:hover {
  background: #eef2ff;
}

.compare-result {
  margin-top: 20px;
  padding: 18px;
  border-radius: 12px;
  background: #f1f5f9;
}

.hidden {
  display: none;
}

footer {
  text-align: center;
  color: #64748b;
  font-size: 13px;
  margin-top: 20px;
}

@media (max-width: 600px) {

  .app {
    padding: 20px 12px;
  }

  header h1 {
    font-size: 28px;
  }

  header p {
    font-size: 15px;
  }

  section {
    padding: 18px;
  }

  .result-summary {
    flex-direction: column;
  }

  .result-box strong {
    font-size: 28px;
  }
}