/* ===== Luke's Image Share — Global Styles (Orange Theme) ===== */
:root {
  --bg: #fff8f3;
  --card: #fff;
  --text: #241c15;
  --muted: #7a6f63;

  /* Orange primary palette */
  --accent: #f97316;            /* base orange */
  --accent-pressed: #ea580c;    /* darker orange */
  --border: #f2e5da;
  --ring: 0 0 0 4px rgba(249,115,22,.15);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(249,115,22,.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a120b;
    --card: #21160d;
    --text: #fff3e6;
    --muted: #d3bfa6;

    --accent: #fb923c;          /* softer orange in dark mode */
    --accent-pressed: #f97316;
    --border: #3c2a1b;
    --ring: 0 0 0 4px rgba(251,146,60,.22);
    --shadow: 0 10px 30px rgba(0,0,0,.45);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(249,115,22,.08), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(251,146,60,.08), transparent 60%),
    var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* ===== Layout ===== */
.wrap {
  width: 100%;
  max-width: 680px;
  padding: clamp(16px, 4vw, 32px);
  margin: auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 28px);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-1px); }

h1 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.8vw, 28px);
  text-align: center;
}
.subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

/* ===== Dropzone (index.php) ===== */
.dropzone {
  display: block;
  width: 100%;
  min-height: 160px;
  border: 2px dashed var(--border);
  border-radius: calc(var(--radius) - 6px);
  padding: clamp(18px, 3.5vw, 22px);
  background: rgba(249,115,22,.03);
  text-align: center;
  position: relative;
  transition: border-color .2s, background .2s, box-shadow .2s;
  cursor: pointer;
}
.dropzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  display: block;
}
.dropzone * { pointer-events: none; }
.dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(249,115,22,.06);
  box-shadow: var(--ring);
}

/* ===== Buttons (unified, including copy button) ===== */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
}

/* Base button — shared by .btn and .copy-button */
.btn,
.copy-button {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--accent), var(--accent-pressed));
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  transition: transform .05s, box-shadow .15s, opacity .2s, filter .2s;
  box-shadow: 0 6px 16px rgba(249,115,22,.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  gap: 8px;
}
.btn:hover,
.copy-button:hover {
  filter: brightness(1.05);
  text-decoration: none;
}
.btn:active,
.copy-button:active { transform: translateY(1px); }
.btn[disabled],
.copy-button[disabled] { opacity: .6; cursor: not-allowed; }

/* Secondary/ghost variant for Back/Home links */
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
  text-decoration: none;
}

/* Button rows */
.btn-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

/* Copy feedback + share block */
.copy-success {
  margin-top: 8px;
  color: var(--muted, #7a6f63);
  font-size: 14px;
  display: none;
}
.share-block { text-align: center; margin-top: 20px; }
.mt-10 { margin-top: 10px; }

/* ===== Preview (index.php) ===== */
.preview { display: none; }
.preview.show {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--card);
  padding: 0;
}
.preview img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  image-orientation: from-image;
  display: block;
  background:
    linear-gradient(45deg, #0000 25%, #0000000d 25% 50%, #0000 50% 75%, #0000000d 75%) 0 0/20px 20px,
    linear-gradient(0deg,  #0000 25%, #0000000d 25% 50%, #0000 50% 75%, #0000000d 75%) 0 0/20px 20px,
    #fff;
  background-clip: content-box;
}

/* ===== Text + Status ===== */
.hint {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 8px;
}
.status {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

/* ===== Footer ===== */
footer {
  width: 100%;
  margin-top: auto;
  padding: 20px 0 28px;
  text-align: center;
  color: var(--muted);
}

/* ===== Image View (share.php) ===== */
.image-container { overflow: auto; text-align: center; }
.uploaded-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.header-row .title { font-weight: 700; font-size: 18px; }
.util-links { display: flex; gap: 10px; }

/* ===== Messages (upload.php) ===== */
.message { text-align: center; color: var(--text); }
.small   { font-size: 13px; color: var(--muted); }

/* ===== Utility ===== */
.linklike { color: #fff; text-decoration: none; }
