/* ==========================================================================
   CANTINHO DISPLAY — APLICAÇÃO DE VISUALIZAÇÃO IMERSIVA E SEGURA (LIGHT MODE)
   Exposição Pura do Mural sem Ferramentas de Edição ou Painéis
   ========================================================================== */

:root {
  /* Paleta Light Mode */
  --bg-canvas: #f8f6f0;
  --bg-surface: #ffffff;
  --bg-surface-warm: #fcfbf9;
  
  /* Tinta e Contraste */
  --ink-primary: #2c2825;
  --ink-secondary: #6e6761;
  --ink-muted: #9e978f;
  --ink-faint: #e2ded9;
  
  /* Acentos */
  --accent-terracotta: #c46d4e;
  --accent-terracotta-light: #fbeee8;
  --accent-sage: #6e8472;
  
  /* Bordas e Sombras */
  --border-delicate: rgba(180, 168, 153, 0.28);
  --shadow-subtle: 0 2px 12px rgba(45, 35, 25, 0.04);
  --shadow-floating: 0 10px 30px -4px rgba(40, 30, 20, 0.08), 0 2px 6px rgba(0, 0, 0, 0.02);
  
  /* Tipografia */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  
  --transition-smooth: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Custom Scrollbar em Light Mode */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: rgba(180, 168, 153, 0.4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-terracotta);
}

/* ==========================================================================
   CANVAS FULL-VIEWPORT
   ========================================================================== */

.display-viewport {
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.display-container {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.display-sections-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.display-section-bg {
  width: 100%;
  height: 100vh;
  position: relative;
  transition: background-color 0.25s ease;
  background-position: 0 calc(-1 * var(--sec-order, 0) * 100vh);
  background-repeat: repeat;
}

/* Texturas de Fundo das Seções (Idênticas ao Editor com Destaque Nítido) */
.pattern-paper-grid {
  background-image: 
    linear-gradient(to right, rgba(120, 100, 80, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 100, 80, 0.22) 1px, transparent 1px);
  background-size: 24px 24px;
}

.pattern-paper-dots {
  background-image: radial-gradient(rgba(110, 90, 70, 0.28) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
}

.pattern-ruled {
  background-image: linear-gradient(to bottom, rgba(120, 100, 80, 0.22) 1px, transparent 1px);
  background-size: 100% 28px;
}

.pattern-plain {
  background-image: none;
}

.display-sections-dividers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  display: none;
}

.display-divider-line {
  display: none;
}

.display-items-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: auto;
}

/* ==========================================================================
   RENDERIZAÇÃO PURA DOS 3 ELEMENTOS (100% IDÊNTICA AO PREVIEW)
   ========================================================================== */

.cantinho-item {
  position: absolute;
  user-select: none;
  transform-origin: center center;
  will-change: transform, left, top, width;
  cursor: default;
}

/* 1. Imagem Pura com Suporte Nativo a Pixel Art */
.item-pure-image {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* 2. Elemento de Texto Puro */
.item-pure-text {
  width: 100%;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-primary);
  word-break: break-word;
  white-space: pre-wrap;
  padding: 2px;
}

/* 3. Elemento de Botão Puro (Imagem com Link Clicável e Ativo) */
.item-pure-button {
  display: block;
  width: 100%;
  text-decoration: none;
  user-select: none;
  -webkit-user-drag: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.item-pure-button img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.item-pure-button:hover {
  opacity: 0.88;
}

/* ==========================================================================
   ESTADO VAZIO (NENHUM CANTINHO ENCONTRADO)
   ========================================================================== */

.display-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
}

.display-empty-card {
  text-align: center;
  max-width: 380px;
  padding: 2.5rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-delicate);
  border-radius: 16px;
  box-shadow: var(--shadow-floating);
}

.display-empty-icon {
  color: var(--accent-terracotta);
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.display-empty-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 0.5rem;
}

.display-empty-desc {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.5;
}
