/*
  YouTube End Screen Simulator — Premium Redesign v3
  Thunder Motion Tool Page
  Professional Studio-Grade Design System
*/

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===== CUSTOM PROPERTIES ===== */
:root {
  --ess-bg-workspace: #060609;
  --ess-bg-panel: rgba(12, 12, 16, 0.92);
  --ess-bg-section: rgba(255, 255, 255, 0.02);
  --ess-border: rgba(255, 255, 255, 0.06);
  --ess-border-hover: rgba(255, 255, 255, 0.12);
  --ess-glow-subtle: rgba(255, 203, 5, 0.06);
  --ess-glow-medium: rgba(255, 203, 5, 0.12);
  --ess-radius-panel: 14px;
}

/* ===== TOOL LAYOUT ===== */
.ess-page {
  padding-top: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ess-bg-workspace);
}

/* ===== HERO TOOL HEADER ===== */
.ess-tool-header {
  padding: 2rem 0 1.8rem;
  border-bottom: 1px solid var(--ess-border);
  background: linear-gradient(180deg, rgba(10, 10, 14, 0.95) 0%, rgba(6, 6, 9, 0.98) 100%);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.ess-tool-header::before {
  content: '';
  position: absolute;
  top: -80%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(255, 203, 5, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.ess-tool-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.ess-tool-title {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ess-tool-title h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.2;
  font-family: var(--font-display, 'Outfit', sans-serif);
}

.ess-tool-title .tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.ess-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.ess-header-actions .badge {
  background: rgba(255, 203, 5, 0.06);
  border: 1px solid rgba(255, 203, 5, 0.12);
  backdrop-filter: blur(8px);
  font-size: 0.72rem;
  padding: 0.35rem 0.85rem;
  letter-spacing: 0.04em;
}

/* ===== WORKSPACE ===== */
.ess-workspace {
  display: grid;
  grid-template-columns: 1fr 360px;
  grid-template-rows: 1fr auto;
  flex: 1;
  min-height: 0;
  background: var(--ess-bg-workspace);
}

/* ===== CANVAS AREA ===== */
.ess-canvas-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 203, 5, 0.012) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(100, 100, 255, 0.008) 0%, transparent 40%),
    var(--ess-bg-workspace);
  min-height: 520px;
}

/* Subtle chess pattern (NLE style) */
.ess-canvas-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.008) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.008) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.008) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.008) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  pointer-events: none;
  opacity: 0.5;
}

.ess-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.7),
    0 0 160px rgba(255, 203, 5, 0.02);
  transition: max-width 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s ease;
  z-index: 1;
}

.ess-canvas-wrapper:hover {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 24px 80px rgba(0, 0, 0, 0.7),
    0 0 180px rgba(255, 203, 5, 0.03);
}

/* ===== MOBILE MODE ===== */
.ess-canvas-wrapper.ess-mobile-mode {
  max-width: 320px;
  border-radius: 24px;
  box-shadow:
    0 0 0 6px #222,
    0 0 0 8px #444,
    0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Video Element */
.ess-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

/* Replace Video Button */
.ess-replace-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  background: rgba(10, 10, 14, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.02em;
}

.ess-replace-btn:hover {
  background: rgba(255, 203, 5, 0.12);
  border-color: rgba(255, 203, 5, 0.3);
  color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.video-loaded .ess-replace-btn {
  display: flex;
}

/* Upload Dropzone */
.ess-dropzone {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  z-index: 20;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(6, 6, 9, 0.97);
  border: 2px dashed rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.ess-dropzone.hidden {
  opacity: 0;
  pointer-events: none;
}

.ess-dropzone.drag-over {
  border-color: var(--accent-primary);
  background: rgba(255, 203, 5, 0.03);
  border-style: solid;
}

.ess-dropzone.drag-over .ess-dropzone-icon {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(255, 203, 5, 0.15);
}

.ess-dropzone-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 203, 5, 0.08), rgba(255, 203, 5, 0.04));
  border: 1px solid rgba(255, 203, 5, 0.12);
  font-size: 2rem;
  color: var(--accent-primary);
  transition: all 0.4s ease;
  position: relative;
}

.ess-dropzone-icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: conic-gradient(from 180deg, transparent, rgba(255, 203, 5, 0.15), transparent 60%);
  z-index: -1;
  animation: icon-rotate 6s linear infinite;
  opacity: 0.6;
}

@keyframes icon-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ess-dropzone h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  font-family: var(--font-display, 'Outfit', sans-serif);
  letter-spacing: -0.02em;
}

.ess-dropzone p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.ess-dropzone-btn {
  margin-top: 0.75rem;
  padding: 0.7rem 2rem;
  border-radius: 100px;
  background: var(--accent-primary);
  color: #111;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.ess-dropzone-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.ess-dropzone-btn:hover::before {
  left: 100%;
}

.ess-dropzone-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 203, 5, 0.35);
}

/* ===== OVERLAY LAYER ===== */
.ess-overlay-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.ess-element {
  pointer-events: auto !important;
}

/* ===== YOUTUBE BOUNDARY OVERLAY ===== */
.ess-yt-boundary {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ess-yt-boundary.visible {
  opacity: 1;
}

.ess-yt-boundary-bar {
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 4px,
    rgba(0, 0, 0, 0.25) 4px,
    rgba(0, 0, 0, 0.25) 8px
  );
  pointer-events: auto;
  cursor: not-allowed;
}

.ess-yt-boundary-inner {
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

/* ===== GRID OVERLAY ===== */
.ess-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ess-grid-overlay.visible {
  opacity: 1;
}

.ess-grid-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.05);
}

.ess-grid-v {
  width: 1px;
}

.ess-grid-h {
  height: 1px;
}

.ess-grid-center-v {
  position: absolute;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.ess-grid-center-h {
  position: absolute;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* ===== ELEMENTS ===== */
.ess-element {
  position: absolute;
  cursor: grab;
  user-select: none;
  pointer-events: auto;
  transition: box-shadow 0.2s ease, opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3rem;
}

.ess-element:active {
  cursor: grabbing;
}

.ess-element.selected {
  z-index: 100;
}

.ess-element .selection-ring {
  position: absolute;
  inset: -3px;
  border: 2px solid var(--accent-primary);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 0 16px rgba(255, 203, 5, 0.2);
}

.ess-element.selected .selection-ring {
  opacity: 1;
}

.ess-element.ess-overlap-warning {
  border-color: #ff4444 !important;
  background-color: rgba(255, 68, 68, 0.15) !important;
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.2);
}

.ess-element.ess-overlap-warning .el-icon,
.ess-element.ess-overlap-warning .el-label {
  color: #ff4444 !important;
}

/* Resize Handles */
.ess-resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent-primary);
  border: 2px solid #111;
  border-radius: 2px;
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.ess-element.selected .ess-resize-handle {
  opacity: 1;
  pointer-events: auto;
}

.ess-resize-handle.nw { top: -5px; left: -5px; cursor: nw-resize; }
.ess-resize-handle.ne { top: -5px; right: -5px; cursor: ne-resize; }
.ess-resize-handle.sw { bottom: -5px; left: -5px; cursor: sw-resize; }
.ess-resize-handle.se { bottom: -5px; right: -5px; cursor: se-resize; }

/* Element Types */
.ess-el-subscribe {
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.12);
  border: 2px solid rgba(255, 0, 0, 0.45);
}

.ess-el-subscribe .selection-ring { border-radius: 50%; }
.ess-el-subscribe .el-icon { font-size: 1.4rem; color: #ff4444; }
.ess-el-subscribe .el-label { font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255, 68, 68, 0.8); font-weight: 700; }

.ess-el-video {
  border-radius: 8px;
  background: rgba(30, 144, 255, 0.07);
  border: 2px solid rgba(30, 144, 255, 0.35);
}

.ess-el-video .el-icon { font-size: 1.6rem; color: rgba(30, 144, 255, 0.7); }
.ess-el-video .el-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(30, 144, 255, 0.6); font-weight: 700; }

.ess-el-playlist {
  border-radius: 8px;
  background: rgba(0, 200, 83, 0.07);
  border: 2px solid rgba(0, 200, 83, 0.35);
}

.ess-el-playlist .el-icon { font-size: 1.4rem; color: rgba(0, 200, 83, 0.7); }
.ess-el-playlist .el-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(0, 200, 83, 0.6); font-weight: 700; }

.ess-el-link {
  border-radius: 8px;
  background: rgba(255, 203, 5, 0.07);
  border: 2px solid rgba(255, 203, 5, 0.35);
}

.ess-el-link .el-icon { font-size: 1.4rem; color: rgba(255, 203, 5, 0.7); }
.ess-el-link .el-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255, 203, 5, 0.6); font-weight: 700; }

/* ===== SAFE AREA OVERLAY ===== */
.ess-safe-area {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ess-safe-area.visible { opacity: 1; }

/* ===== ALIGNMENT GUIDES ===== */
.ess-guide {
  position: absolute;
  background: rgba(255, 203, 5, 0.6);
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.ess-guide.visible { opacity: 1; }
.ess-guide.horizontal { height: 1px; left: 0; right: 0; }
.ess-guide.vertical { width: 1px; top: 0; bottom: 0; }

/* ===== MOBILE CROP OVERLAY ===== */
.ess-mobile-crop {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ess-mobile-crop.visible { opacity: 1; }

.ess-mobile-crop-bar {
  position: absolute;
  background: rgba(0, 0, 0, 0.75);
}

.ess-mobile-crop-bar.left {
  top: 0; left: 0; bottom: 0; width: 25%;
  border-right: 1px dashed rgba(255, 200, 0, 0.4);
}

.ess-mobile-crop-bar.right {
  top: 0; right: 0; bottom: 0; width: 25%;
  border-left: 1px dashed rgba(255, 200, 0, 0.4);
}

.ess-mobile-crop-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 203, 5, 0.6);
  font-weight: 700;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.7);
  padding: 3px 8px;
  border-radius: 4px;
}

/* ===== TIMELINE ===== */
.ess-timeline {
  grid-column: 1 / -1;
  background: rgba(10, 10, 14, 0.98);
  border-top: 1px solid var(--ess-border);
  padding: 1rem 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
}

.ess-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 203, 5, 0.1) 50%, transparent 100%);
}

.ess-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.25rem;
}

.ess-timeline-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ess-timeline-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px rgba(255, 203, 5, 0.4);
}

.ess-timeline-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  font-family: 'JetBrains Mono', monospace;
}

.ess-timeline-track {
  height: 36px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
  cursor: pointer;
}

.ess-timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.1));
  pointer-events: none;
  transition: width 0.05s linear;
}

.ess-timeline-endzone {
  position: absolute;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.18));
  border-left: 2px solid rgba(59, 130, 246, 0.45);
  pointer-events: none;
  border-radius: 0 4px 4px 0;
}

.ess-timeline-endzone-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #60a5fa;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.8;
}

.ess-timeline-playhead {
  position: absolute;
  top: -2px;
  width: 2px;
  height: calc(100% + 4px);
  background: #fff;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  z-index: 5;
  transition: left 0.05s linear;
  border-radius: 1px;
}

.ess-timeline-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ess-tl-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 1rem;
}

.ess-tl-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-1px);
}

.ess-tl-btn:active {
  transform: scale(0.96);
}

/* ===== CONTROL PANEL ===== */
.ess-panel {
  background: var(--ess-bg-panel);
  border-left: 1px solid var(--ess-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(16px);
  position: relative;
}

.ess-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 203, 5, 0.15) 0%, transparent 40%, transparent 60%, rgba(255, 203, 5, 0.08) 100%);
  z-index: 2;
}

.ess-panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--ess-border);
  background: rgba(8, 8, 12, 0.7);
  flex-shrink: 0;
  position: relative;
}

.ess-panel-tab {
  flex: 1;
  padding: 1.1rem 0.4rem 0.9rem;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ess-panel-tab i {
  font-size: 1.1rem;
  transition: transform 0.25s ease;
}

.ess-panel-tab:hover {
  opacity: 0.85;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.ess-panel-tab:hover i {
  transform: translateY(-1px);
}

.ess-panel-tab.active {
  opacity: 1;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.ess-panel-tab.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  border-radius: 0 0 2px 2px;
}

.ess-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.3rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
}

.ess-panel-content::-webkit-scrollbar {
  width: 5px;
}

.ess-panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.ess-panel-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
}

.ess-tab-pane { display: none; }
.ess-tab-pane.active { display: block; }

/* ===== PANEL SECTIONS ===== */
.ess-section {
  margin-bottom: 1.75rem;
}

.ess-tab-pane > .ess-section:first-child {
  margin-top: 0;
}

.ess-section-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ess-section-title i {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Canvas Settings */
.ess-canvas-settings {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.ess-canvas-settings .ess-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ess-canvas-settings label {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ess-canvas-settings input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  color: #fff;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  width: 100%;
  outline: none;
  transition: all 0.25s ease;
}

.ess-canvas-settings input:focus {
  border-color: rgba(255, 203, 5, 0.35);
  background: rgba(255, 203, 5, 0.04);
  box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.06);
}

.ess-canvas-presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ess-preset-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.3px;
}

.ess-preset-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  transform: translateY(-1px);
}

.ess-preset-btn.active {
  background: rgba(255, 203, 5, 0.1);
  border-color: rgba(255, 203, 5, 0.25);
  color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(255, 203, 5, 0.08);
}

.ess-info-text {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.5;
  opacity: 0.7;
}

/* Add Element Buttons */
.ess-add-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ess-add-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-sans);
  text-align: left;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.ess-add-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(255, 255, 255, 0.02));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ess-add-btn:hover::before {
  opacity: 1;
}

.ess-add-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.ess-add-btn:active {
  transform: scale(0.98);
}

.ess-add-btn i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.ess-add-btn.subscribe i { color: #ff4444; }
.ess-add-btn.video i { color: #1e90ff; }
.ess-add-btn.playlist i { color: #00c853; }
.ess-add-btn.link i { color: #ffcb05; }

/* Element List */
.ess-element-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ess-element-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ess-element-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.ess-element-item.active {
  border-color: rgba(255, 203, 5, 0.25);
  background: rgba(255, 203, 5, 0.04);
  box-shadow: 0 0 12px rgba(255, 203, 5, 0.04);
}

.ess-element-item .item-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.ess-element-item .item-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
}

.ess-element-item .item-delete {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.7rem;
  opacity: 0;
  transition: all 0.2s ease;
}

.ess-element-item:hover .item-delete { opacity: 1; }
.ess-element-item .item-delete:hover { color: #ff4444; background: rgba(255, 0, 0, 0.08); }

/* ===== CONTROLS ===== */
.ess-control-group { margin-bottom: 1rem; }

.ess-control-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ess-control-value {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 203, 5, 0.06);
  border-radius: 4px;
}

/* Custom Range Slider */
.ess-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
  cursor: pointer;
  position: relative;
}

.ess-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: grab;
  border: 2px solid #111;
  box-shadow: 0 0 10px rgba(255, 203, 5, 0.3);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ess-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.ess-slider::-webkit-slider-thumb:active {
  transform: scale(1.25);
  cursor: grabbing;
}

.ess-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: grab;
  border: 2px solid #111;
  box-shadow: 0 0 10px rgba(255, 203, 5, 0.3);
}

/* Toggle Switch */
.ess-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ess-toggle:last-child { border-bottom: none; }

.ess-toggle-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.ess-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.ess-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ess-switch-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ess-switch-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.ess-switch input:checked + .ess-switch-slider {
  background: var(--accent-primary);
  box-shadow: 0 0 12px rgba(255, 203, 5, 0.2);
}

.ess-switch input:checked + .ess-switch-slider::before {
  transform: translateX(18px);
  background: #111;
}

/* ===== VIEW MODE BUTTONS ===== */
.ess-view-modes { display: flex; gap: 0.5rem; }

.ess-view-btn {
  flex: 1;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.ess-view-btn i { font-size: 0.9rem; }
.ess-view-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }

.ess-view-btn.active {
  background: rgba(255, 203, 5, 0.08);
  border-color: rgba(255, 203, 5, 0.2);
  color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(255, 203, 5, 0.06);
}

/* ===== EXPORT BUTTONS ===== */
.ess-export-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ess-export-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-align: left;
  width: 100%;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.ess-export-btn::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(270deg, rgba(255, 203, 5, 0.04), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ess-export-btn:hover {
  background: rgba(255, 203, 5, 0.04);
  border-color: rgba(255, 203, 5, 0.15);
  transform: translateX(2px);
}

.ess-export-btn:hover::after {
  opacity: 1;
}

.ess-export-btn:active {
  transform: scale(0.98);
}

.ess-export-btn i {
  font-size: 1.2rem;
  color: var(--accent-primary);
  width: 22px;
  text-align: center;
}

.ess-export-btn .export-desc {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 0.2rem;
  letter-spacing: 0.02em;
}

/* ===== JSON PREVIEW ===== */
.ess-json-preview {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
}

/* ===== AE INTEGRATION SECTION ===== */
.ess-ae-section {
  background: linear-gradient(180deg, rgba(8, 8, 12, 0.9) 0%, rgba(14, 14, 18, 0.6) 50%, rgba(8, 8, 12, 0.9) 100%);
  border-top: 1px solid var(--ess-border);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.ess-ae-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 203, 5, 0.15), transparent);
}

.ess-ae-section::after {
  content: '';
  position: absolute;
  top: 30%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 203, 5, 0.015) 0%, transparent 70%);
  pointer-events: none;
}

/* Why Use This - Feature Cards */
.ess-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.ess-feature-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 2.2rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.ess-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.ess-feature-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.ess-feature-card:hover::before {
  opacity: 1;
}

.ess-feature-card .card-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(255, 203, 5, 0.1), rgba(255, 203, 5, 0.04));
  border: 1px solid rgba(255, 203, 5, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
  font-size: 1.2rem;
  color: var(--accent-primary);
  transition: transform 0.3s ease;
}

.ess-feature-card:hover .card-icon {
  transform: scale(1.08);
}

.ess-feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ess-feature-card p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 0;
}

/* AE Grid */
.ess-ae-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.ess-ae-info h2 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  letter-spacing: -0.03em;
}

.ess-ae-info p {
  font-size: 0.95rem;
  line-height: 1.75;
}

.ess-ae-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.ess-ae-step {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  transition: transform 0.2s ease;
}

.ess-ae-step:hover {
  transform: translateX(4px);
}

.ess-ae-step-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 203, 5, 0.12), rgba(255, 203, 5, 0.04));
  border: 1px solid rgba(255, 203, 5, 0.15);
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ess-ae-code {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.8rem;
  overflow: auto;
  position: relative;
}

.ess-ae-code::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 203, 5, 0.1), transparent);
}

.ess-ae-code pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
  white-space: pre;
}

.ess-ae-code .code-header {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ess-ae-code .code-header i { color: var(--accent-primary); }

/* ===== EXTENSION CTA CARD ===== */
.ess-extension-card {
  margin-top: 1.5rem;
  padding: 1.4rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 203, 5, 0.05), rgba(255, 203, 5, 0.015));
  border: 1px solid rgba(255, 203, 5, 0.1);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  transition: all 0.3s ease;
}

.ess-extension-card:hover {
  border-color: rgba(255, 203, 5, 0.2);
  background: linear-gradient(135deg, rgba(255, 203, 5, 0.07), rgba(255, 203, 5, 0.02));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ess-extension-card .ext-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 203, 5, 0.15), rgba(255, 203, 5, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.ess-extension-card .ext-info {
  flex: 1;
}

.ess-extension-card .ext-info h4 {
  font-size: 0.92rem;
  margin: 0 0 0.3rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.ess-extension-card .ext-info p {
  font-size: 0.72rem;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Full-Width Promo Banner */
.ess-promo-banner {
  background: linear-gradient(90deg, rgba(255, 203, 5, 0.03), rgba(255, 203, 5, 0.06), rgba(255, 203, 5, 0.03));
  border-bottom: 1px solid rgba(255, 203, 5, 0.08);
  padding: 0.7rem 0;
  overflow: hidden;
  position: relative;
}

.ess-promo-banner::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 203, 5, 0.15), transparent);
}

.ess-promo-link {
  text-decoration: none;
  display: block;
}

.ess-promo-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.ess-promo-badge {
  background: var(--accent-primary);
  color: #000;
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.04em;
}

.ess-promo-text {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.ess-promo-action {
  color: var(--accent-primary);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ess-promo-link:hover .ess-promo-action {
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .ess-promo-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
  .ess-promo-text { font-size: 0.72rem; }
}

/* ===== NOTIFICATION TOAST ===== */
.ess-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  padding: 0.8rem 1.6rem;
  background: rgba(16, 16, 22, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 203, 5, 0.15);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.ess-toast.visible { transform: translateX(-50%) translateY(0); }
.ess-toast i { color: var(--accent-primary); }

/* ===== EMPTY STATE ===== */
.ess-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.ess-empty-state i { font-size: 2rem; margin-bottom: 0.75rem; display: block; opacity: 0.2; }

/* Status Area */
.ess-status-area {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.status-clear { color: #00c853; }
.status-warning { color: #ffcb05; }
.status-error { color: #ff4444; }
.ess-status-area i { font-size: 1rem; }

/* Template Grid */
.ess-template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.ess-template-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.7rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.ess-template-card:hover {
  background: rgba(255, 203, 5, 0.05);
  border-color: rgba(255, 203, 5, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.ess-template-card span {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.ess-template-card:hover span { color: var(--text-secondary); }

.template-thumb {
  height: 44px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Mini shapes for thumbs */
.template-thumb::before, .template-thumb::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.thumb-v-s::before { width: 14px; height: 8px; left: 4px; top: 16px; }
.thumb-v-s::after { width: 8px; height: 8px; right: 4px; top: 16px; border-radius: 50%; }

.thumb-v-v::before { width: 14px; height: 8px; left: 4px; top: 16px; }
.thumb-v-v::after { width: 14px; height: 8px; right: 4px; top: 16px; }

.thumb-v-p::before { width: 14px; height: 8px; left: 4px; top: 16px; }
.thumb-v-p::after { width: 14px; height: 8px; right: 4px; top: 16px; background: rgba(0, 200, 83, 0.12); }

.thumb-p-s::before { width: 8px; height: 8px; left: 4px; top: 16px; border-radius: 50%; background: rgba(255, 68, 68, 0.12); }
.thumb-p-s::after { width: 14px; height: 8px; right: 4px; top: 16px; background: rgba(0, 200, 83, 0.12); }

.thumb-v-p-s::before { width: 10px; height: 6px; left: 2px; top: 18px; }
.thumb-v-p-s::after { width: 10px; height: 6px; right: 2px; top: 18px; background: rgba(0, 200, 83, 0.12); }
.thumb-v-p-s { display: flex; align-items: center; justify-content: center; }
.thumb-v-p-s .dot { width: 6px; height: 6px; background: rgba(255, 68, 68, 0.15); border-radius: 50%; }

/* ===== KEYBOARD SHORTCUTS ===== */
.ess-shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ess-shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.35rem 0;
}

.ess-shortcut-row kbd {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  font-size: 0.62rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 36px;
  text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .ess-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .ess-panel {
    border-left: none;
    border-top: 1px solid var(--ess-border);
    max-height: 420px;
  }
  .ess-panel::before {
    display: none;
  }
  .ess-canvas-area { min-height: 380px; }
  .ess-feature-grid { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 768px) {
  .ess-tool-header .container {
    flex-direction: column;
    text-align: center;
  }
  .ess-canvas-area {
    padding: 1rem;
    min-height: 280px;
  }
  .ess-ae-grid { grid-template-columns: 1fr; gap: 2rem; }
  .ess-timeline { padding: 0.75rem 1rem; }
  .ess-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .ess-panel-tab { font-size: 0.55rem; padding: 0.65rem 0.25rem; }
  .ess-panel-tab i { font-size: 0.9rem; }
}
