@import url('https://fonts.googleapis.com/css2?family=Nova+Flat&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: #16213e;
  color: #222;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

h1 {
  text-align: center;
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 20px;
}

#dropzone {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px;
  border: 2px dashed #999;
  background: #fff;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

canvas {
  display: block;
  margin: 20px auto;
  max-width: 100%;
  border: 1px solid #ccc;
}

#controls {
  max-width: 700px;
  margin: 20px auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

button, input[type='text'], input[type='range'], select {
  padding: 10px 15px;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

button {
  background: #007bff;
  color: #fff;
  cursor: pointer;
}

button:hover {
  background: #0056b3;
}

@media (max-width: 600px) {
  #controls {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Handles style */
.handle {
  width: 18px;
  height: 18px;
  background: #007bff;
  border: 3px solid #fff;
  border-radius: 4px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.rotate-handle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ff5722;
  border: 4px solid #fff;
  cursor: grab;
  box-shadow: 0 0 12px 4px rgba(255, 87, 34, .9);
  touch-action: none;
  user-select: none;
}

/* Header */
header {
  width: 100%;
  background: #1a1a2e;
  border-bottom: 1px solid #3a3a5e;
  padding: 12px 24px;
  text-align: center;
}

header a {
  font-family: 'Nova Flat', cursive;
  font-size: 22px;
  color: #ffd700;
  text-decoration: none;
}

header a:hover {
  text-decoration: none;
}

p {
  font-size: 20px;
  text-align: center;
}

/* Main content */
main {
  flex: 1;
  width: 100%;
  max-width: 700px;
  margin: 0 auto 3rem;
  padding: 3rem 1rem;
  background: white;
  color: #000;
  border-radius: 16px;
  border: 1px solid #3a3a5e;
  box-shadow: 0 8px 24px rgb(0 71 171 / .15);
}

/* Footer */
footer {
  width: 100%;
  margin-top: 40px;
  background: #1a1a2e;
  border-top: 1px solid #3a3a5e;
  color: white;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
  Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

footer .left a, footer .right a {
  color: #0dcaf0;
  text-decoration: none;
  margin: 0 .6rem;
}

footer .left a:hover, footer .right a:hover {
  text-decoration: none;
}

footer .left {
  flex: 1 1 40%;
  text-align: left;
}

footer .right {
  flex: 1 1 50%;
  text-align: right;
}

@media (max-width: 480px) {
  header a {
    font-size: 22px;
  }
}

/* Responsive */
@media (max-width: 480px) {
  footer {
    flex-direction: column;
    gap: .5rem;
    font-size: 13px;
    text-align: center;
  }

  footer .left, footer .right {
    flex: unset;
    text-align: center;
  }

  footer .right a {
    margin: 0 .4rem;
  }
}
