* {
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;

  background: linear-gradient(135deg,#667eea,#764ba2);

  display: flex;
  justify-content: center;
  align-items: center;
}

/* App */

.app {
  width: 100%;
  max-width: 420px;

  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(15px);

  padding: 30px;
  border-radius: 20px;

  text-align: center;
  color: white;

  box-shadow: 0 25px 40px rgba(0,0,0,0.2);
}

/* Head */

h1 {
  margin: 0;
  font-size: 26px;
}

.subtitle {
  margin-bottom: 25px;
  opacity: 0.8;
}

/* Upload */

.upload-box {
  position: relative;

  height: 180px;

  border: 2px dashed rgba(255,255,255,0.5);
  border-radius: 15px;

  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;

  transition: 0.3s;
}

.upload-box:hover {
  background: rgba(255,255,255,0.1);
}

.upload-box input {
  position: absolute;
  width: 100%;
  height: 100%;

  opacity: 0;
  cursor: pointer;
}

/* Upload Text */

.upload-content {
  text-align: center;
  pointer-events: none;
}

.icon {
  font-size: 32px;
}

/* Preview */

#previewImage {
  position: absolute;

  width: 100%;
  height: 100%;

  object-fit: contain;

  border-radius: 15px;

  display: none;
}

/* Button */

button {
  width: 100%;

  margin-top: 20px;
  padding: 14px;

  border: none;
  border-radius: 12px;

  background: linear-gradient(135deg,#00f2fe,#4facfe);

  color: white;
  font-size: 16px;
  font-weight: 600;

  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  opacity: 0.9;
}

/* Loader */

.loader {
  width: 35px;
  height: 35px;

  border: 4px solid rgba(255,255,255,0.3);
  border-top: 4px solid white;

  border-radius: 50%;

  margin: 20px auto;

  animation: spin 1s linear infinite;

  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Result */

.result {
  margin-top: 20px;
}

.result img {
  width: 100%;
  border-radius: 12px;
  margin-top: 10px;
}

/* Download */

#downloadBtn {
  display: inline-block;

  margin-top: 15px;

  padding: 10px 18px;

  background: white;
  color: #444;

  border-radius: 10px;

  text-decoration: none;
  font-weight: 600;

  transition: 0.3s;
}

#downloadBtn:hover {
  background: #eee;
}

/* Utility */

.hidden {
  display: none;
}
