/* ===== GLOBAL ===== */
body {
    font-family: 'Inter', sans-serif;
    background: #0f172a;
    color: #fff;
    margin: 0;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 600px;
    margin: 60px auto;
    text-align: center;
}

/* ===== HEADINGS ===== */
h1 {
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #94a3b8;
    margin-bottom: 30px;
}

/* ===== UPLOAD BOX ===== */
.upload-box {
    border: 2px dashed #334155;
    padding: 40px;
    border-radius: 12px;
    background: #1e293b;
    cursor: pointer;
    transition: 0.3s;
}

.upload-box:hover {
    border-color: #6366f1;
    background: #1e293b;
}
/* ===== PREVIEW WRAPPER ===== */

.preview-wrapper {
    width: 100%;
    display: none;
    justify-content: center;
    margin-top: 20px;
}

/* ===== FIXED PREVIEW AREA ===== */

.preview-container {
    position: relative;

    width: 500px;
    height: 500px;

    border-radius: 12px;

    background: #0f172a;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;
}

/* ===== IMAGE ===== */

.preview-container img {

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    display: none;
}

/* ===== CANVAS ===== */

#editCanvas {
    position: absolute;
    top: 0;
    left: 0;
    touch-action: none;
}

/* ===== BUTTON ===== */
button {
    margin-top: 20px;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    background: #6366f1;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #4f46e5;
}

/* ===== STATUS ===== */
#status {
    margin-top: 15px;
    color: #22c55e;
}

[popover] {
  padding: 25px;
  border: none;
  border-radius: 14px;
  background: #0f172a;
  color: white;

  width: 320px;

  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* layout */
[popover]:popover-open {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

/* backdrop */
[popover]::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
}

/* inputs */
[popover] input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: white;
}

/* button */
.submit-btn {
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #6366f1;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:hover {
  background: #4f46e5;
}

