* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --manila: #f5e6c8;
  --manila-dark: #e6d4a8;
  --ink: #1a1a1a;
  --red-stamp: #c41e3a;
  --blue-stamp: #1e4a7c;
  --coffee: rgba(139, 90, 43, 0.15);
  --paper-shadow: rgba(0, 0, 0, 0.1);
}

body {
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
  min-height: 100vh;
  padding: 2rem;
  font-family: 'Courier Prime', 'Courier New', monospace;
  color: var(--ink);
  position: relative;
}

.document {
  max-width: 850px;
  margin: 0 auto;
  background: var(--manila);
  padding: 3rem;
  box-shadow:
    0 0 0 1px var(--manila-dark),
    0 10px 40px rgba(0, 0, 0, 0.4),
    inset 0 0 80px var(--paper-shadow);
  position: relative;
  overflow: hidden;
}

.document::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(0, 0, 0, 0.02) 28px,
      rgba(0, 0, 0, 0.02) 29px
    );
  pointer-events: none;
}

/* Coffee stains */
.coffee-stain {
  position: fixed;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, transparent 40%, var(--coffee) 45%, var(--coffee) 50%, transparent 55%);
  top: 15%;
  right: 10%;
  transform: rotate(15deg);
  pointer-events: none;
  opacity: 0.6;
}

.coffee-stain-2 {
  position: fixed;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--coffee) 0%, transparent 60%);
  bottom: 20%;
  left: 8%;
  pointer-events: none;
  opacity: 0.4;
}

/* Header */
.doc-header {
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 3px double var(--ink);
  margin-bottom: 2rem;
  position: relative;
}

.logo {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

h1 {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 2.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 0 var(--manila-dark);
}

.subtitle {
  font-size: 0.9rem;
  letter-spacing: 0.4em;
  color: #555;
  margin-bottom: 2rem;
}

/* Stamps */
.stamp {
  position: absolute;
  padding: 0.5rem 1.5rem;
  border: 4px solid;
  border-radius: 4px;
  font-family: 'Special Elite', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  transform: rotate(-12deg);
  opacity: 0.85;
}

.classified-stamp {
  top: 10px;
  left: -10px;
  color: var(--red-stamp);
  border-color: var(--red-stamp);
  transform: rotate(-15deg);
}

.eyes-only-stamp {
  top: 15px;
  right: -5px;
  color: var(--blue-stamp);
  border-color: var(--blue-stamp);
  transform: rotate(8deg);
  font-size: 0.9rem;
}

/* Meta info */
.meta-info {
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.3);
  padding: 1.5rem;
  border: 1px dashed var(--ink);
}

.meta-row {
  display: flex;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.meta-row:last-child {
  margin-bottom: 0;
}

.label {
  font-weight: bold;
  min-width: 180px;
}

.value {
  flex: 1;
}

.status-badge {
  color: #2e7d32;
  font-weight: bold;
}

.threat {
  color: var(--red-stamp);
  font-weight: bold;
}

/* Warning banner */
.warning-banner {
  background: repeating-linear-gradient(
    45deg,
    #f5d742,
    #f5d742 10px,
    #1a1a1a 10px,
    #1a1a1a 20px
  );
  color: white;
  text-align: center;
  padding: 1rem;
  margin-bottom: 2rem;
  font-weight: bold;
  font-size: 0.85rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.warning-banner .small {
  font-size: 0.75rem;
  font-weight: normal;
  font-style: italic;
  opacity: 0.9;
}

/* Sections */
.section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.25);
  border-left: 4px solid var(--ink);
  position: relative;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ink);
}

.section-title {
  font-family: 'Special Elite', monospace;
  font-size: 1.4rem;
  letter-spacing: 0.15em;
}

.section-classification {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border: 2px solid var(--red-stamp);
  color: var(--red-stamp);
  font-weight: bold;
}

/* Notes */
.note {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--manila-dark);
  position: relative;
}

.note:last-child {
  margin-bottom: 0;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.note-item {
  font-weight: bold;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.note-importance {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: var(--ink);
  color: var(--manila);
  font-weight: bold;
}

.note-importance.critical {
  background: var(--red-stamp);
}

.note-importance.high {
  background: #e65100;
}

.note-importance.pending {
  background: #7b7b7b;
}

.note-detail {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.note-date {
  font-size: 0.75rem;
  color: #666;
  text-align: right;
  font-style: italic;
}

/* Redacted effect */
.redacted {
  background: var(--ink);
  color: var(--ink);
  padding: 0 0.25rem;
  user-select: none;
}

/* Footer */
.doc-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 3px double var(--ink);
  text-align: center;
  position: relative;
}

.footer-stamp {
  display: inline-block;
  padding: 0.5rem 2rem;
  border: 3px solid var(--ink);
  font-family: 'Special Elite', monospace;
  font-size: 1rem;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}

#footer-text {
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 1rem;
  font-style: italic;
  color: #444;
}

.classification-footer {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: #666;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .document {
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.8rem;
    letter-spacing: 0.15em;
  }

  .stamp {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
  }

  .classified-stamp {
    top: 5px;
    left: 5px;
  }

  .eyes-only-stamp {
    top: 5px;
    right: 5px;
  }

  .meta-row {
    flex-direction: column;
  }

  .label {
    min-width: auto;
    margin-bottom: 0.25rem;
  }

  .section-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .coffee-stain,
  .coffee-stain-2 {
    display: none;
  }
}

/* Fun hover effects */
.note:hover {
  transform: translateX(4px);
  transition: transform 0.2s ease;
}

.section:hover .section-classification {
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* Typewriter cursor effect for loading */
.loading::after {
  content: '|';
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
