:root {
  --vintage-cream: #fdf5e6;
  --vintage-sepia: #3d2b1f;
  --vintage-brown: #8b4513;
  --vintage-tan: #d2b48c;
}

body {
  font-family: 'Special Elite', system-ui, serif;
  background-color: #1a110a;
  color: var(--vintage-sepia);
  overflow-x: hidden;
  min-height: 100vh;
}

.desk-surface {
  background-color: #2c1e14;
  background-image: url("https://www.transparenttextures.com/patterns/dark-wood.png");
  background-attachment: fixed;
}

.font-cursive { font-family: 'Dancing Script', cursive; }
.font-serif { font-family: 'Playfair Display', serif; }
.font-typewriter { font-family: 'Special Elite', monospace; }
.font-handwriting { font-family: 'Homemade Apple', cursive; }
.font-elegant { font-family: 'Pinyon Script', cursive; }

/* Atmosphere */
@keyframes flicker {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.candlelight {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 40%, rgba(210, 180, 140, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 5;
  animation: flicker 4s infinite ease-in-out;
}

/* Grid/List View Card */
.paper-sheet {
  background-color: var(--vintage-cream);
  background-image: url("https://www.transparenttextures.com/patterns/p6.png");
  box-shadow: 
    1px 1px 2px rgba(0,0,0,0.1), 
    5px 5px 15px rgba(0,0,0,0.2),
    inset 0 0 40px rgba(210, 180, 140, 0.1);
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
  transition: all 0.4s ease;
}
.paper-sheet:hover {
  transform: translateY(-8px) rotate(0deg) scale(1.02) !important;
  z-index: 50;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* MANUSCRIPT VIEW */
.manuscript-parchment {
  background-color: #f4f1e6;
  background-image: url("https://www.transparenttextures.com/patterns/p6.png");
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
  min-height: 100vh;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 40px;
  position: relative;
}

/* Pill Buttons */
.pill-btn-back {
  background-color: #fdf5e6;
  color: #8b4513;
  border: 1px solid #d2b48c;
  border-radius: 9999px;
  padding: 12px 24px;
  font-weight: bold;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: all 0.2s;
}
.pill-btn-back:hover {
  background-color: #fff;
  transform: scale(1.03);
}

.pill-btn-burn {
  background-color: #311612;
  color: #e53e3e;
  border: 1px solid rgba(139, 0, 0, 0.3);
  border-radius: 9999px;
  padding: 12px 24px;
  font-weight: bold;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: all 0.2s;
}
.pill-btn-burn:hover {
  background-color: #4a1c17;
  transform: scale(1.03);
}

.btn-vintage {
  background-color: #8b4513;
  color: #fdf5e6;
  border: 1px solid #5c2d0c;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-vintage:hover {
  background-color: #a0522d;
}

/* Archive Stamp */
.archive-stamp {
  border: 2px dashed rgba(139, 69, 19, 0.3);
  padding: 8px 12px;
  display: inline-block;
  text-align: center;
  color: rgba(139, 69, 19, 0.4);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Special Elite', monospace;
  line-height: 1.5;
}

/* Illuminated Drop Cap */
.illuminated-drop-cap::first-letter {
  float: left;
  font-family: 'Pinyon Script', cursive;
  font-size: 6rem;
  line-height: 0.7;
  margin-right: 0.5rem;
  margin-top: 0.8rem;
  color: var(--vintage-brown);
  font-weight: normal;
}

.ink-bleed {
  text-shadow: 0.5px 0.5px 1px rgba(61,43,31,0.1);
}

@keyframes drift {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% { transform: translate(100px, -100vh) rotate(45deg); opacity: 0; }
}
.dust-particle {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  animation: drift 20s linear infinite;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #1a110a; }
::-webkit-scrollbar-thumb { background: #8b4513; border-radius: 3px; }
