/* CSS Clip-Path Editor — Vibrant Coral theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #FF6B6B;
  --primary-dim: rgba(255,107,107,0.12);
  --secondary: #FFA07A;
  --accent: #4ECDC4;
  --accent-dim: rgba(78,205,196,0.12);
  --bg: #0D0D12;
  --bg-card: #16161F;
  --border: rgba(255,107,107,0.12);
  --text: #F0E8E8;
  --text-dim: #B89A9A;
  --text-muted: #6B4F4F;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }

.header { border-bottom: 1px solid var(--border); background: rgba(22,22,31,0.95); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 700px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }

.main { max-width: 700px; margin: 0 auto; padding: 20px; }

.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.preset-btn { padding: 5px 12px; font-family: var(--font); font-size: 0.72rem; font-weight: 500; color: var(--text-dim); background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: all var(--transition); }
.preset-btn:hover, .preset-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-dim); }

.editor-area { margin-bottom: 12px; }
.canvas-wrap { position: relative; width: 500px; height: 500px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.canvas-wrap canvas { position: absolute; top: 0; left: 0; z-index: 2; cursor: crosshair; }
.shape-preview { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #FF6B6B, #FFA07A, #4ECDC4); z-index: 1; transition: clip-path 0.3s ease; }

.output-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.panel-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.btn-copy { padding: 3px 10px; font-family: var(--font); font-size: 0.68rem; font-weight: 500; color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(78,205,196,0.2); border-radius: 4px; cursor: pointer; }
.code-output { padding: 12px 14px; font-family: var(--mono); font-size: 0.78rem; color: var(--secondary); white-space: pre-wrap; word-break: break-all; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 4px 24px rgba(0,0,0,0.5); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 540px) {
  .canvas-wrap { width: 100%; height: 0; padding-bottom: 100%; }
  .canvas-wrap canvas { width: 100%; height: 100%; }
}
