:root {

  --grid-color: #FF0099;
  --mount-color: #00CCFF;
  --sun-start: #FFEE66;
  --sun-end: #FF44AA;
  --sky-top: #2E004F;
  --sky-bottom: #10001A;
  --text-color: #ffffff;

}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-color);

  overflow-x: hidden;
}

.title {
  text-align: center;
  font-size: 2rem;
  margin: 1.5rem 0 0.5rem;
}


.scene {
  position: fixed;
  inset: 0;

  background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom));
  overflow: hidden;
  z-index: -1;
}

.sun {
  position: absolute;
  left: 50%;
  top: 20vh;
  width: 35vmin;
  height: 35vmin;
  background: linear-gradient(to right, var(--sun-start), var(--sun-end));
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 40px var(--sun-end);
  overflow: hidden;
}
.sun::after {
  content: "";
  position: absolute;
  top: 50%;
  bottom: 0;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(
    to bottom,
    var(--grid-color) 0 2px,
    transparent 2px 8px
  );
  border-radius: 50%;
}

.mountains {
  position: absolute;
  bottom: 50vh;
  left: 0;
  width: 100%;
  height: 30vh;
  pointer-events: none;
}
.mountains svg {
  width: 100%;
  height: 100%;
}
.mountains polyline {
  fill: none;
  stroke: var(--mount-color);
  stroke-width: 2;
}

.grid {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 200vw;
  height: 50vh;
  transform: translateX(-50%) perspective(600px) rotateX(65deg);
  background:
    repeating-linear-gradient(to right, var(--grid-color) 0 2px, transparent 2px 100px),
    repeating-linear-gradient(to top, var(--grid-color) 0 2px, transparent 2px 100px);
  opacity: 0.6;
}

.detect-container {
  max-width: 900px;
  margin: 4rem auto 2rem;

  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 1rem;
  position: relative;

}

.upload-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;

  border: 2px dashed rgba(255,255,255,0.7);
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  transition: background 0.2s, border-color 0.2s;
}
.upload-zone.drag {
  background: rgba(255,255,255,0.15);
  border-color: #fff;

}

#analyze-button {
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;

  background: var(--grid-color);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
#analyze-button:disabled {
  background: #666;
  cursor: not-allowed;

}

.preview-area {
  position: relative;

  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 6px;

  min-height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255,255,255,0.05);

}
.preview-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0.5rem;
  text-align: center;
  font-weight: bold;
  color: #fff;
  display: none;
  backdrop-filter: blur(3px);
}
.overlay.real { background: rgba(39,174,96,0.7); }
.overlay.ai { background: rgba(231,76,60,0.7); }

#result {
  grid-column: 1/-1;
  background: rgba(0,0,0,0.5);

  border-radius: 6px;

  padding: 1rem;
  min-height: 3rem;
}

.about-box,
.warning-box {
  grid-column: 1/-1;
  background: rgba(0,0,0,0.5);
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
}

#size-warning {
  margin-top: 1rem;
  color: #e67e22;
  font-weight: bold;
  display: none;
}