/* ==========================================================================
   XYZ Tools - Specific Styles for Utilities (Diff Split, Color Picker, Sorteios & Board Game Dice)
   ========================================================================== */

/* ==========================================================================
   1. Text Converter Tool
   ========================================================================== */
.tool-text-converter { display: flex; flex-direction: column; gap: var(--space-md); }
.transform-actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 6px; }

.btn-transform {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-sm);
  padding: 8px 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0.65rem;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  text-align: left;
}

.btn-transform:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--cat-text);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-transform .icon {
  color: var(--cat-text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(var(--cat-text-rgb), 0.12);
}

/* ==========================================================================
   2. Text Diff (Comparador de Textos - Unificada e Lado a Lado)
   ========================================================================== */
.tool-text-diff { display: flex; flex-direction: column; gap: var(--space-md); }

.diff-output-container {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 0.65rem;
  max-height: 440px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* Unified View */
.diff-line {
  display: flex;
  align-items: flex-start;
  padding: 3px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  word-break: break-all;
}

.diff-sign { width: 20px; flex-shrink: 0; font-weight: 700; user-select: none; }
.diff-content { flex: 1; }
.diff-add { background-color: rgba(16, 185, 129, 0.12); color: #34d399; }
.diff-del { background-color: rgba(239, 68, 68, 0.12); color: #f87171; }
.diff-same { color: var(--text-secondary); }
.diff-words-flow { padding: 12px; line-height: 1.8; }
.diff-word { padding: 2px 5px; border-radius: 4px; }

/* Side-by-Side (Split) View */
.diff-split-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

@media (max-width: 768px) {
  .diff-split-container {
    grid-template-columns: 1fr;
  }
}

.diff-split-col {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  min-width: 0;
}

.diff-split-col:last-child { border-right: none; }

.diff-split-header {
  padding: 8px 12px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.diff-split-body {
  display: flex;
  flex-direction: column;
}

.diff-split-row {
  display: flex;
  align-items: flex-start;
  padding: 3px 8px;
  min-height: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  word-break: break-all;
}

.diff-split-num {
  width: 28px;
  flex-shrink: 0;
  color: var(--text-muted);
  user-select: none;
  font-size: 0.72rem;
}

.diff-split-text { flex: 1; }
.diff-empty { background: rgba(0, 0, 0, 0.15); }

/* ==========================================================================
   3. Stopwatch Tool
   ========================================================================== */
.tool-stopwatch { display: flex; flex-direction: column; align-items: center; gap: var(--space-lg); }

.stopwatch-display-card {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 1rem;
  padding: var(--space-xl) var(--space-md);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stopwatch-time {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  user-select: none;
}

.stopwatch-ms { font-size: 1.9rem; color: var(--cat-time); margin-left: 2px; }
.stopwatch-controls { display: flex; gap: var(--space-sm); margin-top: var(--space-md); width: 100%; max-width: 360px; justify-content: center; }
.laps-container { width: 100%; max-width: 540px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 0.75rem; overflow: hidden; }
.laps-header { display: flex; justify-content: space-between; align-items: center; padding: 10px var(--space-md); background: var(--bg-surface-elevated); border-bottom: 1px solid var(--border-subtle); font-weight: 600; font-size: 0.84rem; }
.laps-list { max-height: 240px; overflow-y: auto; list-style: none; }
.lap-row { display: flex; align-items: center; justify-content: space-between; padding: 8px var(--space-md); border-bottom: 1px solid var(--border-subtle); font-family: var(--font-mono); font-size: 0.84rem; }
.lap-row:last-child { border-bottom: none; }
.lap-fastest { color: var(--color-success); background-color: rgba(16, 185, 129, 0.08); }
.lap-slowest { color: var(--color-danger); background-color: rgba(239, 68, 68, 0.08); }

/* ==========================================================================
   4. Pomodoro Timer Tool
   ========================================================================== */
.tool-pomodoro { display: flex; flex-direction: column; align-items: center; gap: var(--space-lg); }
.pomodoro-modes { display: flex; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); padding: 3px; gap: 2px; }
.pomodoro-mode-btn { padding: 6px 14px; border-radius: var(--radius-full); font-size: 0.84rem; font-weight: 500; color: var(--text-secondary); transition: all var(--transition-fast); }
.pomodoro-mode-btn.active { background-color: var(--cat-time); color: #ffffff; font-weight: 600; box-shadow: 0 1px 6px rgba(var(--cat-time-rgb), 0.35); }
.pomodoro-ring-container { position: relative; width: 240px; height: 240px; display: flex; align-items: center; justify-content: center; }
.pomodoro-ring-svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.pomodoro-ring-circle-bg { fill: none; stroke: var(--bg-surface-elevated); stroke-width: 8; }
.pomodoro-ring-circle { fill: none; stroke: var(--cat-time); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.4s ease, stroke var(--transition-fast); }
.pomodoro-center-content { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pomodoro-countdown { font-family: var(--font-mono); font-size: 2.8rem; font-weight: 700; color: var(--text-primary); line-height: 1; letter-spacing: -0.03em; }
.pomodoro-status-text { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px; }

/* ==========================================================================
   5. Password Generator Tool
   ========================================================================== */
.tool-password-generator { display: flex; flex-direction: column; gap: var(--space-md); max-width: 740px; margin: 0 auto; }
.pwd-mode-tabs { display: flex; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 0.75rem; padding: 3px; gap: 3px; }
.pwd-mode-tab { flex: 1; padding: 7px 12px; border-radius: 0.6rem; font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); text-align: center; transition: all var(--transition-fast); }
.pwd-mode-tab:hover { color: var(--text-primary); }
.pwd-mode-tab.active { background: var(--bg-surface-elevated); color: var(--text-primary); font-weight: 600; border: 1px solid var(--border-subtle); box-shadow: var(--shadow-sm); }
.password-output-box { display: flex; align-items: center; justify-content: space-between; background-color: var(--bg-surface-elevated); border: 1px solid var(--border-medium); border-radius: 0.75rem; padding: 12px 16px; gap: var(--space-md); box-shadow: var(--shadow-sm); }
.password-text-display { font-family: var(--font-mono); font-size: 1.2rem; font-weight: 600; word-break: break-all; letter-spacing: 0.04em; user-select: all; line-height: 1.4; }
.pwd-char-letter { color: #ffffff; }
.pwd-char-num { color: #38bdf8; }
.pwd-char-sym { color: #f43f5e; }
.pwd-char-sep { color: #64748b; font-weight: 700; }
.pwd-syntax-legend { display: flex; align-items: center; gap: 14px; font-size: 0.75rem; color: var(--text-muted); flex-wrap: wrap; padding: 0 2px; }
.pwd-legend-item { display: flex; align-items: center; gap: 5px; }
.pwd-legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.password-strength-container { display: flex; flex-direction: column; gap: 5px; }
.strength-meter-bar { height: 4px; background-color: var(--border-subtle); border-radius: var(--radius-full); overflow: hidden; }
.strength-meter-fill { height: 100%; width: 0%; border-radius: var(--radius-full); transition: width 0.3s ease, background-color 0.3s ease; }
.strength-meter-fill.weak { width: 25%; background-color: var(--color-danger); }
.strength-meter-fill.fair { width: 50%; background-color: var(--color-warning); }
.strength-meter-fill.good { width: 75%; background-color: var(--cat-security); }
.strength-meter-fill.strong { width: 100%; background-color: var(--color-success); }
.pwd-grid-2x2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pwd-full-col { grid-column: 1 / -1; }
@media (max-width: 540px) { .pwd-grid-2x2 { grid-template-columns: 1fr; } }

/* ==========================================================================
   6. Text Editor / Markdown Scratchpad Tool
   ========================================================================== */
.tool-text-editor { display: flex; flex-direction: column; gap: var(--space-sm); height: 100%; }
.editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 0.75rem; padding: 6px 10px; gap: 4px; }
.editor-toolbar-group { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.editor-toolbar-divider { width: 1px; height: 18px; background-color: var(--border-medium); margin: 0 4px; }
.editor-workspace { display: grid; grid-template-columns: 1fr; gap: var(--space-md); min-height: 400px; }
.editor-textarea { width: 100%; height: 100%; min-height: 400px; padding: var(--space-md); background-color: var(--bg-input); border: 1px solid var(--border-medium); border-radius: 0.75rem; color: var(--text-primary); font-family: var(--font-sans); font-size: 0.95rem; line-height: 1.7; resize: none; outline: none; transition: border-color var(--transition-fast); }
.editor-textarea:focus { border-color: var(--accent-primary); background-color: var(--bg-input-focus); }
.editor-preview { display: none; padding: var(--space-md); background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 0.75rem; overflow-y: auto; min-height: 400px; line-height: 1.7; font-size: 0.95rem; }
.editor-preview.active { display: block; }
.editor-preview table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.88rem; }
.editor-preview th, .editor-preview td { border: 1px solid var(--border-medium); padding: 8px 12px; text-align: left; }
.editor-preview th { background-color: var(--bg-surface-elevated); font-weight: 600; }
.editor-status-bar { display: flex; align-items: center; justify-content: space-between; font-size: 0.8125rem; color: var(--text-muted); padding: 0 2px; }
.autosave-indicator { display: flex; align-items: center; gap: 6px; }
.autosave-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--color-success); }

/* ==========================================================================
   7. Divisor de Conta Tool
   ========================================================================== */
.tool-bill-splitter { display: flex; flex-direction: column; gap: var(--space-md); }
.input-prefix-wrapper { position: relative; display: flex; align-items: center; }
.input-prefix { position: absolute; left: 12px; font-family: var(--font-mono); font-weight: 700; color: var(--text-muted); pointer-events: none; }
.input-with-prefix { padding-left: 42px !important; }
.stepper-input-group { display: flex; align-items: center; gap: 6px; }
.stepper-input { text-align: center; font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; max-width: 100px; }
.tip-chips-container { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tip-chip { padding: 6px 12px; border-radius: 0.65rem; font-size: 0.78rem; font-weight: 500; background: var(--btn-bg); border: 1px solid var(--btn-border); color: var(--btn-text); cursor: pointer; transition: all var(--transition-fast); }
.tip-chip:hover { background: var(--btn-bg-hover); border-color: var(--cat-finance); color: var(--text-primary); }
.tip-chip.active { background: rgba(var(--cat-finance-rgb), 0.15); border-color: var(--cat-finance); color: var(--cat-finance); font-weight: 600; }
.result-highlight-card { background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%); border: 1px solid rgba(16, 185, 129, 0.3); text-align: center; padding: var(--space-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.result-highlight-value { font-family: var(--font-mono); font-size: 2.5rem; font-weight: 800; color: var(--cat-finance); line-height: 1.1; margin: 6px 0; letter-spacing: -0.03em; }
.result-breakdown-list { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 0.84rem; }
.breakdown-row { display: flex; align-items: center; justify-content: space-between; color: var(--text-secondary); }
.breakdown-total { padding-top: 6px; border-top: 1px dashed var(--border-medium); font-weight: 700; color: var(--text-primary); font-size: 0.92rem; }
.whatsapp-preview-box { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: 0.65rem; padding: 12px; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.5; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; max-height: 180px; overflow-y: auto; }
.btn-whatsapp { background-color: #16a34a !important; border-color: #15803d !important; color: #ffffff !important; }
.btn-whatsapp:hover { background-color: #22c55e !important; border-color: #16a34a !important; }

/* ==========================================================================
   8. Image Kit Tool
   ========================================================================== */
.tool-image-kit { display: flex; flex-direction: column; gap: var(--space-md); }
.img-dropzone-card { padding: var(--space-2xl) var(--space-lg); border: 2px dashed var(--border-medium); border-radius: 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; cursor: pointer; background-color: var(--bg-surface); transition: all var(--transition-fast); }
.img-dropzone-card:hover, .img-dropzone-card.drag-over { border-color: var(--cat-media); background-color: rgba(236, 72, 153, 0.04); }
.img-preview-box { width: 100%; max-height: 240px; border-radius: 0.65rem; background: var(--bg-input); border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px; }
.img-preview-box img { max-width: 100%; max-height: 220px; object-fit: contain; border-radius: 4px; }

/* ==========================================================================
   9. Color Picker & Palette Tool (Seletor de Cores)
   ========================================================================== */
.tool-color-picker { display: flex; flex-direction: column; gap: var(--space-md); }

.color-hero-banner {
  min-height: 140px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  position: relative;
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-fast);
}

.color-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.color-hero-hex-tag {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.color-hero-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.native-color-picker-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.color-matrix-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.color-matrix-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
}

.color-matrix-label {
  font-weight: 700;
  color: var(--text-muted);
  width: 70px;
  font-size: 0.75rem;
}

.color-matrix-val {
  font-family: var(--font-mono);
  color: var(--text-primary);
  flex: 1;
  word-break: break-all;
}

.color-shades-scale {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  height: 48px;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.shade-swatch {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2px;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.shade-swatch:hover { transform: scaleY(1.15); z-index: 2; }
.shade-label { font-size: 0.65rem; font-family: var(--font-mono); font-weight: 700; color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }

.harmony-palettes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.wcag-contrast-box {
  padding: 10px 14px;
  border-radius: 0.65rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

.wcag-ratio-badge {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-success);
}

.wcag-badge {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.wcag-badge.pass { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.wcag-badge.fail { background: rgba(239, 68, 68, 0.15); color: #f87171; }

/* ==========================================================================
   10. Sorteador de Nomes (Roleta & Palco Animado)
   ========================================================================== */
.tool-draw-names { display: flex; flex-direction: column; gap: var(--space-md); }

.roulette-stage-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.06) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  text-align: center;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.roulette-drum {
  width: 100%;
  max-width: 380px;
  padding: 16px 20px;
  border-radius: 0.75rem;
  background: var(--bg-surface);
  border: 2px solid var(--cat-utilities);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.roulette-drum.spinning {
  animation: drumShake 0.1s infinite alternate;
  border-color: #38bdf8;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
}

@keyframes drumShake {
  0% { transform: translateY(-2px) scale(1.01); }
  100% { transform: translateY(2px) scale(0.99); }
}

.roulette-drum-text {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.winner-podium-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  animation: winnerCardPop 0.4s ease-out;
}

.winner-podium-card.first-place {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(234, 179, 8, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

@keyframes winnerCardPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.winner-rank-badge { font-weight: 700; font-size: 0.84rem; color: #f59e0b; display: flex; align-items: center; }
.winner-name-text { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }

/* ==========================================================================
   11. Gerador de Números (Reels Giratórios)
   ========================================================================== */
.tool-draw-numbers { display: flex; flex-direction: column; gap: var(--space-md); }

.numbers-reel-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 10px;
}

.animated-num-bubble {
  min-width: 52px;
  height: 52px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-medium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.animated-num-bubble.rolling {
  border-color: var(--cat-utilities);
  color: var(--cat-utilities);
  animation: numBubblePulse 0.15s infinite alternate;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.animated-num-bubble.locked {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  transform: scale(1.05);
}

@keyframes numBubblePulse {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.04); }
}

/* ==========================================================================
   12. Divisor de Grupos (Distribuição de Cartas)
   ========================================================================== */
.tool-draw-groups { display: flex; flex-direction: column; gap: var(--space-md); }

.groups-stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: var(--space-sm) 0;
  max-height: 380px;
  overflow-y: auto;
}

.team-column-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.team-column-header {
  padding: 8px 12px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--cat-utilities);
}

.team-member-count {
  font-size: 0.72rem;
  background: rgba(139, 92, 246, 0.15);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.team-members-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.team-member-item {
  padding: 5px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-primary);
  font-weight: 500;
}

.team-member-item.dealt {
  animation: cardSlideIn 0.25s ease-out;
}

@keyframes cardSlideIn {
  0% { transform: translateY(-10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   13. Cara ou Coroa & Decisão
   ========================================================================== */
.tool-coin-flip, .tool-dice-roller { display: flex; flex-direction: column; gap: var(--space-md); }

/* 3D Coin CSS */
.coin-3d-wrapper { perspective: 800px; width: 110px; height: 110px; }
.coin-3d { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 1s cubic-bezier(0.2, 0.8, 0.3, 1); }
.coin-face { position: absolute; width: 100%; height: 100%; border-radius: 50%; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-family: var(--font-mono); font-size: 0.85rem; border: 4px solid #eab308; box-shadow: 0 0 20px rgba(234, 179, 8, 0.35), inset 0 0 10px rgba(0, 0, 0, 0.4); }
.coin-front { background: linear-gradient(135deg, #fef08a 0%, #ca8a04 100%); color: #713f12; }
.coin-back { background: linear-gradient(135deg, #cbd5e1 0%, #475569 100%); color: #0f172a; border-color: #94a3b8; transform: rotateY(180deg); box-shadow: 0 0 20px rgba(148, 163, 184, 0.35); }
.coin-3d.spinning-heads { animation: flipToHeads 1s ease-out forwards; }
.coin-3d.spinning-tails { animation: flipToTails 1s ease-out forwards; }

@keyframes flipToHeads { 0% { transform: translateY(0) rotateY(0); } 50% { transform: translateY(-70px) rotateY(900deg) scale(1.15); } 100% { transform: translateY(0) rotateY(1800deg); } }
@keyframes flipToTails { 0% { transform: translateY(0) rotateY(0); } 50% { transform: translateY(-70px) rotateY(900deg) scale(1.15); } 100% { transform: translateY(0) rotateY(1980deg); } }

.coin-history-strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; }
.coin-history-pill { padding: 3px 8px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.coin-history-pill.heads { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.coin-history-pill.tails { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

/* ==========================================================================
   14. Rolador de Dados RPG & Tabuleiro (Arte Visual dos Dados)
   ========================================================================== */
.dice-type-selector { display: flex; gap: 6px; flex-wrap: wrap; }
.dice-chip { padding: 8px 16px; border-radius: 0.65rem; font-size: 0.86rem; font-weight: 700; background: var(--btn-bg); border: 1px solid var(--btn-border); color: var(--btn-text); cursor: pointer; transition: all var(--transition-fast); }
.dice-chip:hover { background: var(--btn-bg-hover); color: var(--text-primary); }
.dice-chip.active { background: rgba(var(--cat-utilities-rgb), 0.18); border-color: var(--cat-utilities); color: var(--cat-utilities); }

/* Visual Dice Tray */
.dice-visual-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 110px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
}

.die-card {
  width: 58px;
  height: 58px;
  border-radius: 0.75rem;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-medium);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

.die-card.rolling {
  animation: dieShake 0.1s infinite alternate;
  border-color: var(--cat-utilities);
  color: var(--cat-utilities);
}

@keyframes dieShake {
  0% { transform: rotate(-6deg) scale(0.96); }
  100% { transform: rotate(6deg) scale(1.04); }
}

.die-val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.die-type-tag {
  position: absolute;
  bottom: 2px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.die-card.crit-success {
  border-color: var(--color-success);
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}
.die-card.crit-success .die-val { color: var(--color-success); }

.die-card.crit-fail {
  border-color: var(--color-danger);
  background: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}
.die-card.crit-fail .die-val { color: var(--color-danger); }

.dice-calc-box {
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
}

/* ==========================================================================
   QR-Code Generator Styles
   ========================================================================== */
.qr-canvas-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
  max-width: 100%;
}

.qr-canvas-stage.dark-bg {
  background-color: #121316;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 16px 16px;
}

.qr-canvas-stage.light-bg {
  background-color: #f1f5f9;
  background-image: radial-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 0);
  background-size: 16px 16px;
}

.qr-canvas-stage canvas {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   JSON Validator Styles
   ========================================================================== */
.json-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 0.75rem;
  border: 1px solid var(--border-medium);
  transition: all var(--transition-fast);
  flex-wrap: wrap;
  gap: 10px;
}

.json-status-banner.neutral {
  background-color: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}
.json-status-banner.neutral .json-status-icon {
  color: var(--text-muted);
}

.json-status-banner.valid {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--color-success);
}
.json-status-banner.valid #json-status-title {
  color: var(--color-success);
}

.json-status-banner.invalid {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--color-danger);
}
.json-status-banner.invalid #json-status-title {
  color: var(--color-danger);
}

.json-stats-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}

.json-code-textarea {
  width: 100%;
  min-height: 380px;
  padding: 14px 16px;
  background-color: var(--bg-input);
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  outline: none;
  resize: vertical;
}

/* ==========================================================================
   Encoder / Decoder & Lorem Ipsum Styles
   ========================================================================== */
.tool-encoder-decoder,
.tool-lorem-ipsum,
.tool-json-validator,
.tool-qrcode-gen {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}


.dice-equation-text {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-all;
}

.decision-big-result { font-family: var(--font-sans); font-size: 2.2rem; font-weight: 800; color: var(--color-success); margin-top: 8px; }
.decision-big-result.pulse { animation: decisionPulse 0.12s infinite alternate; color: var(--cat-utilities); }
@keyframes decisionPulse { 0% { transform: scale(0.95); } 100% { transform: scale(1.05); } }

/* Hash & Cryptography Cards */
.hash-row-card {
  padding: 10px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hash-display-box {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-primary);
  word-break: break-all;
  user-select: all;
  background: var(--bg-input);
  padding: 6px 8px;
  border-radius: 4px;
}

/* Percentage Calculator 2x2 Layout */
.calc-percentage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.calc-percentage-card-full {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .calc-percentage-grid {
    grid-template-columns: 1fr;
  }
}


