/* ══════════════════════════════════════════════════════════
   CARDNAL RG // WORLD OF TOOLS ENGINE THEME
   Brutalist, 100% client-side tool interface
══════════════════════════════════════════════════════════ */
:root {
  --bg: #0d0d0d;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --border: #2a2a2a;
  --border-bright: #444444;
  --text: #f0ece1;
  --text-dim: #8a867c;
  --accent: var(--app-color, #ff4d00);
  --success: #00ffcc;
  --danger: #ff3355;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.wot-main {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  flex: 1;
}

.wot-hero {
  border-bottom: 2px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.wot-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.wot-cat-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bg);
  background: var(--accent);
  padding: 0.2rem 0.55rem;
  font-weight: 700;
}

.wot-privacy-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  border: 1px solid var(--border);
  padding: 0.18rem 0.55rem;
}

.wot-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.wot-subtitle {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 720px;
}

/* WORKSPACE CARD */
.wot-card {
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}

/* DROPZONE */
.wot-dropzone {
  border: 2px dashed var(--border-bright);
  background: rgba(255, 255, 255, 0.015);
  padding: 2.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
}

.wot-dropzone:hover,
.wot-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(255, 77, 0, 0.05);
}

.wot-dropzone-icon {
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.wot-dropzone-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.wot-dropzone-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.wot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #0d0d0d;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, opacity 0.15s ease, background 0.15s ease;
}

.wot-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.wot-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wot-btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-bright);
}

.wot-btn--ghost:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.wot-btn--success {
  background: var(--success);
  border-color: var(--success);
  color: #0d0d0d;
}

/* RULER / TARGET BAR */
.wot-ruler {
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.wot-ruler-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.wot-ruler-track {
  height: 10px;
  background: #0a0a0a;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.wot-ruler-fill {
  height: 100%;
  background: var(--accent);
  width: 40%;
  transition: width 0.2s ease;
}

/* CONTROLS GRID */
.wot-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.wot-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.wot-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.wot-input,
.wot-select,
.wot-textarea {
  background: #0f0f0f;
  border: 2px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.65rem 0.8rem;
  width: 100%;
}

.wot-input:focus,
.wot-select:focus,
.wot-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.wot-textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.55;
}

.wot-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
  padding: 0.35rem 0;
}

.wot-checkbox-row input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

/* FILE BANNER & QUEUE */
.wot-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.wot-queue-list {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wot-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.wot-queue-actions {
  display: flex;
  gap: 0.4rem;
}

.wot-mini-btn {
  background: #0d0d0d;
  border: 1px solid var(--border-bright);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}

.wot-mini-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* PROGRESS & OUTPUT */
.wot-progress {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #0f0f0f;
  border: 1px solid var(--border);
}

.wot-progress-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.wot-progress-bar {
  height: 8px;
  background: var(--surface-2);
  overflow: hidden;
}

.wot-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.15s ease;
}

.wot-result-box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(0, 255, 204, 0.04);
  border: 2px solid var(--success);
}

.wot-result-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.wot-preview-wrap {
  margin: 1rem 0;
  max-height: 440px;
  overflow: auto;
  background: #080808;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.wot-preview-wrap img,
.wot-preview-wrap video,
.wot-preview-wrap canvas {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

/* INTERACTIVE CROP STAGE */
.wot-crop-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  background: #050505;
  border: 1px solid var(--border);
  user-select: none;
  overflow: hidden;
}

.wot-crop-stage img {
  display: block;
  max-width: 100%;
  max-height: 450px;
}

.wot-crop-box {
  position: absolute;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62);
  cursor: move;
}

.wot-crop-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  cursor: nwse-resize;
}

/* STATS COUNTER CARDS (WORD COUNTER / CALCULATORS) */
.wot-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.wot-stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1rem;
}

.wot-stat-val {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.wot-stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.wot-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.wot-error {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--danger);
  background: rgba(255, 51, 85, 0.08);
  color: #ff8fa3;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* SEO INFO & RELATED TOOLS */
.wot-info-section {
  border-top: 2px solid var(--border);
  padding-top: 2rem;
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.wot-info-block h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.wot-info-block p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.wot-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.wot-related-link {
  display: block;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.wot-related-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
