:root {
  /* Color Palette - Premium & Modern */
  --bg-primary: #0a0a0c;
  --bg-secondary: #141416;
  --bg-tertiary: #1e1e21;
  --accent: #6c5ce7;
  --accent-soft: rgba(108, 92, 231, 0.15);
  --text-main: #ffffff;
  --text-dim: #a1a1aa;
  --text-mute: #71717a;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(20, 20, 22, 0.7);
  --glass-blur: blur(12px);

  /* Safe Area for Mobile */
  --safe-bottom: env(safe-area-inset-bottom, 20px);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow: hidden;
}

/* Glassmorphism Classes */
.glass {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
}

.clickable {
  cursor: pointer;
  transition: var(--transition);
}

.clickable:active {
  transform: scale(0.96);
}

/* Scrollbar Hide */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logoPulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

.animate-fade {
  animation: fadeIn 0.4s ease forwards;
}

/* Layout Panels */
#layers-panel {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease-in-out;
  transform: translateX(100%);
  display: flex !important;
  box-shadow: none; /* Sem sombra inicialmente */
}

#layers-panel.open {
  transform: translateX(0);
  box-shadow: -10px 0 30px rgba(0,0,0,0.5); /* Sombra aparece ao abrir */
}

.history-entry {
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 6px;
}

.history-entry:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.format-card {
  transition: var(--transition);
  border: 2px solid var(--border) !important;
}

.format-card:hover {
  background: var(--bg-tertiary);
  transform: translateY(-4px);
}

.format-card.active {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
}

.layer-item {
    transition: var(--transition);
    border: 1px solid transparent;
}

.layer-item:hover {
    background: var(--bg-tertiary);
}