/* ============================================================
   ShowUp — PIRATE Night 2026 Style System
   Neo-Brutalist, Highly Polished, Opinionated.
   ============================================================ */

/* --- TOKENS --- */
:root {
  --bg:           #0a0a0a;
  --surface:      #161616;
  --surface-2:    #222222;
  --border:       #333333;
  --border-strong: #555555;
  --accent:       #FFD130; /* matches the PIRATE brush asset */
  --accent-hover: #FFF04D;
  --text:         #FFFFFF;
  --text-2:       #BBBBBB;
  --text-3:       #777777;
  --green:        #22C55E;
  
  --transition:   0.2s ease-out;
}

/* --- RESET & TYPOGRAPHY --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: var(--text-2); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
svg { display: block; flex-shrink: 0; }

.font-marker {
  font-family: 'Permanent Marker', cursive;
  letter-spacing: 1px;
}

/* --- NAV --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 16px; }
.nav-logo-img { height: 36px; width: auto; }
.logo-text { font-family: 'Permanent Marker', cursive; font-size: 20px; color: var(--text); transform: translateY(2px); }
.logo-text em { font-style: normal; color: var(--accent); }
.privacy-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--green);
  background: rgba(34, 197, 94, 0.1); padding: 8px 16px;
  border: 2px solid rgba(34, 197, 94, 0.2); border-radius: 4px;
}

/* --- HERO --- */
.hero { padding: 32px 24px 56px; text-align: center; position: relative; }
.hero-inner { max-width: 800px; margin: 0 auto; }
.hero-eyebrow {
  font-family: 'Permanent Marker', cursive; font-size: 16px; color: var(--accent);
  margin-bottom: 8px; transform: rotate(-2deg); display: inline-block;
}
.hero-headline {
  font-size: clamp(40px, 6vw, 72px); font-weight: 400; color: var(--text);
  line-height: 1; margin-bottom: 16px; text-transform: uppercase;
}
.hero-sub { font-size: 16px; color: var(--text-2); max-width: 500px; margin: 0 auto; line-height: 1.5; }

/* --- WORKSPACE LAYOUT --- */
.workspace {
  max-width: 1200px; margin: 0 auto; padding: 0 32px 100px;
  display: grid; grid-template-columns: 500px 1fr; gap: 64px; align-items: start;
}

/* LEFT: CANVAS & UPLOAD */
.workspace-left { position: sticky; top: 100px; }
.canvas-container {
  width: 100%; aspect-ratio: 1; position: relative;
  background: var(--surface);
  border: 4px solid var(--border-strong);
  box-shadow: 8px 8px 0px var(--border-strong);
  transition: all var(--transition);
  overflow: hidden;
}
.canvas-container.portrait-mode { aspect-ratio: 4 / 5; }
.canvas-container.drag-over {
  border-color: var(--accent); box-shadow: 8px 8px 0px var(--accent);
}

#canvas { width: 100%; height: 100%; display: block; object-fit: contain; cursor: grab; }
#canvas:active { cursor: grabbing; }

.drag-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
  font-size: 32px; color: var(--accent); pointer-events: none;
}
.canvas-container.drag-over .drag-overlay { display: flex; }

.canvas-hint {
  margin: 0 0 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; border: none;
  padding: 0 8px; font-size: 13px; font-weight: 700; color: var(--accent);
  white-space: normal;
}

/* UPLOAD CONTROLS (Below Canvas) */
.upload-controls { margin-top: 14px; text-align: center; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.action-cell { min-width: 0; }
.action-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 64px; padding: 18px 20px; font-size: 18px; font-weight: 800;
  text-transform: none; letter-spacing: 0; line-height: 1;
  transition: all var(--transition);
  border: 3px solid var(--border-strong);
  box-shadow: 5px 5px 0 var(--border-strong);
}
.action-btn-upload { color: var(--text); background: var(--surface-2); }
.action-btn-download { color: #000; background: var(--accent); border-color: var(--accent); box-shadow: 5px 5px 0 var(--border-strong); }
.action-btn:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--border-strong); }
.action-btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--border-strong); }
.action-btn:disabled {
  color: var(--text-2);
  background: var(--surface);
  border-color: var(--border-strong);
  cursor: not-allowed;
  box-shadow: 5px 5px 0 var(--border-strong);
}
.upload-hint { font-size: 14px; color: var(--text-3); margin-top: 12px; font-weight: 500; }

/* RIGHT: CONTROLS */
.workspace-right { display: flex; flex-direction: column; gap: 56px; padding-top: 16px; }

.control-group {}
.control-label {
  font-size: 24px; font-weight: 700; color: var(--text);
  margin-bottom: 8px; display: flex; align-items: baseline; gap: 12px;
}
.control-num { font-size: 28px; color: var(--accent); opacity: 0.9; }
.control-desc { font-size: 15px; color: var(--text-2); margin-bottom: 20px; }

/* SEGMENTED CONTROL */
.segmented-control {
  display: flex; background: var(--surface); border: 3px solid var(--border-strong);
  padding: 4px; box-shadow: 6px 6px 0px var(--border-strong);
}
.seg-btn {
  flex: 1; padding: 12px; font-size: 15px; font-weight: 700; color: var(--text-2);
  transition: all var(--transition); border: 2px solid transparent;
}
.seg-btn:hover:not(.active) { color: var(--text); }
.seg-btn.active {
  background: var(--surface-2); border-color: var(--border-strong); color: var(--text);
}

/* FRAMES GRID */
.frames-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; }
.frame-card {
  aspect-ratio: 1; border: 3px solid var(--border-strong); background: var(--surface);
  cursor: pointer; position: relative; transition: all var(--transition); overflow: hidden;
}
.frame-card:hover { border-color: var(--text-2); transform: translate(-2px, -2px); box-shadow: 4px 4px 0px var(--border-strong); }
.frame-card.active { border-color: var(--accent); transform: translate(-2px, -2px); box-shadow: 4px 4px 0px var(--accent); }
.frame-card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

/* STICKERS */
.stickers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.sticker-card {
  min-height: 82px; border: 3px solid var(--border-strong); background: var(--surface);
  cursor: pointer; position: relative; transition: all var(--transition); overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 8px;
}
.sticker-card:hover { border-color: var(--text-2); transform: translate(-2px, -2px); box-shadow: 4px 4px 0px var(--border-strong); }
.sticker-card.active { border-color: var(--accent); transform: translate(-2px, -2px); box-shadow: 4px 4px 0px var(--accent); }
.sticker-preview {
  width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: center;
  padding: 12px 16px; color: #000; font-family: 'Permanent Marker', cursive;
  font-size: 18px; line-height: 1.05; text-align: center; text-transform: uppercase;
  background: var(--accent);
  border: 2px solid rgba(0,0,0,0.18);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.35);
  transform: rotate(-1deg);
  pointer-events: none;
}
.sticker-preview-multiline { font-size: 12px; }
.sticker-card-none { color: var(--text-2); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.sticker-tools {
  margin-top: 18px; padding: 14px; background: var(--surface);
  border: 3px solid var(--border-strong); box-shadow: 4px 4px 0px var(--border-strong);
}
.sticker-tools.disabled { opacity: 0.45; }
.sticker-tools-label {
  margin-bottom: 10px; color: var(--text-2); font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.sticker-tools-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sticker-tool-btn {
  min-height: 44px; background: var(--bg); border: 2px solid var(--border-strong);
  color: var(--text); font-size: 22px; font-weight: 800; transition: all var(--transition);
}
.sticker-tool-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); transform: translate(-1px, -1px); }
.sticker-tool-btn:active:not(:disabled) { transform: translate(1px, 1px); }
.sticker-tool-btn:disabled { cursor: not-allowed; color: var(--text-3); }
.sticker-tool-reset { font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }

/* DOWNLOAD BUTTON */
.btn-download {
  width: 100%; padding: 24px; color: #000; font-size: 24px; font-weight: 800; 
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 8px;
  transition: all var(--transition);
  
  /* Brush Style */
  position: relative; z-index: 1; border: none; background: transparent;
}
.btn-download::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-color: var(--accent);
  -webkit-mask-image: url('images/ui/Vector1-1.svg');
  mask-image: url('images/ui/Vector1-1.svg');
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  transition: filter var(--transition), background-color var(--transition);
}
.btn-download:hover:not(:disabled) { transform: translate(-2px, -2px); }
.btn-download:hover:not(:disabled)::before { filter: brightness(1.1); }
.btn-download:active:not(:disabled) { transform: translate(4px, 4px); }
.btn-download:disabled { color: var(--text-3); cursor: not-allowed; }
.btn-download:disabled::before { background-color: var(--surface-2); }
.btn-download.success { color: #fff; }
.btn-download.success::before { background-color: var(--green); }
.action-btn-download.success { color: #fff; background: var(--green); border-color: var(--green); }

/* GRUNGE DIVIDER */
.divider-brush {
  position: absolute; left: 0; right: 0; width: 100%; z-index: 40; pointer-events: none;
  height: 8vw; min-height: 40px; max-height: 120px;
}
.divider-brush-bottom {
  bottom: -2px;
  background-image: url('images/ui/grunge-divider-1.svg');
  background-size: 100% 100%; background-repeat: no-repeat;
  transform: scaleY(-1);
}

/* SNIPPETS */
.snippets-list { display: flex; flex-direction: column; gap: 16px; }
.snippet-card { background: var(--surface); border: 3px solid var(--border-strong); }
.snippet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 2px solid var(--border-strong);
}
.snippet-platform { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.snippet-icon {
  width: 28px; height: 28px; background: var(--bg); border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}
.btn-copy {
  padding: 6px 12px; background: var(--bg); border: 2px solid var(--border-strong);
  font-size: 13px; font-weight: 700; color: var(--text); transition: all var(--transition);
}
.btn-copy:hover { border-color: var(--accent); color: var(--accent); }
.btn-copy.copied { border-color: var(--green); color: var(--green); }
.snippet-body { padding: 16px; }
.snippet-text {
  width: 100%; background: none; border: none; color: var(--text-2); font-size: 14px;
  line-height: 1.5; resize: none; outline: none; font-family: inherit;
}

/* HASHTAG STRIP */
.hashtag-strip {
  margin-top: 16px; padding: 24px; background: var(--surface); border: 3px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  box-shadow: 6px 6px 0px var(--border-strong);
}
.hashtag-main { font-size: 24px; color: var(--accent); }
.hashtag-sep { color: var(--text-3); font-weight: 700; }
.hashtag-handle { font-size: 18px; font-weight: 700; color: var(--text); }
.hashtag-handle:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* FOOTER */
.footer { padding: 48px 32px; border-top: 2px solid var(--border); }
.footer-inner { max-width: 800px; margin: 0 auto; text-align: center; }
.footer-privacy { font-size: 14px; color: var(--text-3); margin-bottom: 24px; }
.footer-links { display: flex; justify-content: center; gap: 16px; font-size: 14px; font-weight: 600; }

/* RESPONSIVE */
@media (max-width: 960px) {
  .workspace { grid-template-columns: 1fr; gap: 48px; }
  .workspace-left, .workspace-right { max-width: 600px; margin: 0 auto; width: 100%; position: static; }
  .hero-headline { font-size: 48px; }
  .privacy-badge span { display: none; }
}
@media (max-width: 480px) {
  .hero { padding: 48px 20px 32px; }
  .action-row { grid-template-columns: 1fr; }
  .frames-grid { grid-template-columns: repeat(3, 1fr); }
  .btn-download { font-size: 20px; padding: 20px; }
  .hashtag-strip { flex-direction: column; gap: 8px; }
  .hashtag-sep { display: none; }
}
