/* Sherlock Rroga Detective Theme - Victorian & Mysterious */
:root {
  --detective-brown: #3d2817;
  --paper-cream: #f5f1e8;
  --ink-black: #1a1a1a;
  --accent-gold: #d4af37;
  --accent-red: #8b0000;
  --text-dark: #2c2c2c;
  --shadow-dark: rgba(0, 0, 0, 0.3);
  --glow-gold: rgba(212, 175, 55, 0.4);
}

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

body {
  font-family: "Cormorant Garamond", "Playfair Display", serif;
  background: linear-gradient(135deg, #2c1810 0%, #3d2817 50%, #2c1810 100%);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.8;
  position: relative;
  min-height: 100vh;
}

/* Paper Texture Canvas */
#paper-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
}

/* Main Layout */
main {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* Case Header */
.case-header {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--paper-cream);
  border: 3px double var(--detective-brown);
  box-shadow: 0 10px 40px var(--shadow-dark), inset 0 0 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 3rem;
  position: relative;
  animation: fadeInDown 1s ease-out;
}

.case-stamp {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-red);
  border: 2px solid var(--accent-red);
  padding: 0.5rem 1rem;
  transform: rotate(15deg);
  letter-spacing: 2px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 8px var(--shadow-dark);
}

.case-number {
  font-family: "Cinzel", serif;
  font-size: 1rem;
  color: var(--detective-brown);
  letter-spacing: 3px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.case-title {
  font-family: "Cinzel", serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--ink-black);
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.case-subtitle {
  font-size: 1.3rem;
  color: var(--detective-brown);
  font-style: italic;
  margin-bottom: 1rem;
}

.case-date {
  font-size: 1rem;
  color: var(--detective-brown);
  font-weight: 500;
  margin-top: 1rem;
}

/* Case Introduction */
.case-intro {
  background: var(--paper-cream);
  border: 2px solid var(--detective-brown);
  padding: 3rem 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 8px 30px var(--shadow-dark), inset 0 0 20px rgba(0, 0, 0, 0.03);
  text-align: center;
  animation: fadeInUp 1s ease-out;
}

.typewriter-container {
  margin-bottom: 2rem;
  min-height: 80px;
}

.typewriter-text {
  font-size: 1.4rem;
  color: var(--text-dark);
  line-height: 1.8;
  font-weight: 400;
}

.reveal-button {
  background: linear-gradient(135deg, var(--detective-brown), #4a3423);
  border: 2px solid var(--accent-gold);
  padding: 1rem 2.5rem;
  border-radius: 5px;
  color: var(--paper-cream);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Cinzel", serif;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--shadow-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.reveal-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-dark), 0 0 20px var(--glow-gold);
  background: linear-gradient(135deg, #4a3423, var(--detective-brown));
}

.button-icon {
  font-size: 1.3rem;
}

/* Clues Section */
.clues-section {
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease-out;
}

.section-title {
  font-family: "Cinzel", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  color: var(--accent-gold);
  margin-bottom: 3rem;
  text-shadow: 2px 2px 8px var(--shadow-dark), 0 0 20px var(--glow-gold);
  font-weight: 700;
}

.clue-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.clue-item {
  background: var(--paper-cream);
  border: 2px solid var(--detective-brown);
  padding: 2rem;
  box-shadow: 0 6px 25px var(--shadow-dark), inset 0 0 15px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.clue-item:hover {
  transform: translateX(5px);
  box-shadow: 0 8px 30px var(--shadow-dark), 0 0 15px var(--glow-gold);
}

.clue-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-gold);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.clue-item:hover::before {
  opacity: 1;
}

.clue-icon {
  font-size: 3rem;
  flex-shrink: 0;
  filter: drop-shadow(2px 2px 4px var(--shadow-dark));
}

.clue-content {
  flex: 1;
}

.clue-title {
  font-family: "Cinzel", serif;
  font-size: 1.5rem;
  color: var(--ink-black);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.clue-text {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-style: italic;
}

.clue-reveal {
  background: rgba(212, 175, 55, 0.1);
  border-left: 3px solid var(--accent-gold);
  padding: 1rem;
  margin-top: 1rem;
  animation: fadeIn 0.5s ease-out;
}

.clue-reveal p {
  font-size: 1.1rem;
  color: var(--text-dark);
  line-height: 1.6;
}

.clue-button {
  background: var(--detective-brown);
  border: 2px solid var(--accent-gold);
  color: var(--paper-cream);
  padding: 0.7rem 1.5rem;
  border-radius: 3px;
  cursor: pointer;
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  flex-shrink: 0;
  align-self: center;
}

.clue-button:hover {
  background: #4a3423;
  box-shadow: 0 0 15px var(--glow-gold);
  transform: scale(1.05);
}

.clue-button.examined {
  background: var(--accent-gold);
  color: var(--ink-black);
  cursor: default;
}

/* Deduction Section */
.deduction-section {
  background: var(--paper-cream);
  border: 3px double var(--detective-brown);
  padding: 3rem 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 8px 30px var(--shadow-dark), inset 0 0 20px rgba(0, 0, 0, 0.03);
  text-align: center;
  animation: fadeInUp 1s ease-out;
}

.deduction-box {
  max-width: 700px;
  margin: 0 auto;
}

.deduction-content {
  margin-bottom: 2rem;
}

.deduction-text {
  font-size: 1.4rem;
  color: var(--text-dark);
  line-height: 1.8;
  font-weight: 500;
}

.deduction-button {
  background: linear-gradient(135deg, var(--accent-red), #a00000);
  border: 2px solid var(--accent-gold);
  padding: 1.2rem 3rem;
  border-radius: 5px;
  color: var(--paper-cream);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  font-family: "Cinzel", serif;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px var(--shadow-dark);
  letter-spacing: 1px;
}

.deduction-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow-dark), 0 0 25px var(--glow-gold);
}

/* Proposal Section */
.proposal-section {
  background: var(--paper-cream);
  border: 4px double var(--accent-gold);
  padding: 4rem 3rem;
  margin-bottom: 3rem;
  box-shadow: 0 10px 40px var(--shadow-dark),
    inset 0 0 30px rgba(212, 175, 55, 0.1);
  position: relative;
  animation: fadeInUp 1s ease-out;
}

.proposal-stamp {
  position: absolute;
  top: 30px;
  right: 30px;
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold);
  border: 3px solid var(--accent-gold);
  padding: 0.8rem 1.5rem;
  transform: rotate(12deg);
  letter-spacing: 3px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px var(--shadow-dark);
}

.proposal-title {
  font-family: "Cinzel", serif;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  text-align: center;
  color: var(--ink-black);
  margin-bottom: 2rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.proposal-content {
  max-width: 700px;
  margin: 0 auto 3rem;
}

.proposal-text {
  font-size: 1.3rem;
  color: var(--text-dark);
  line-height: 2;
  text-align: left;
  font-weight: 400;
}

.proposal-text strong {
  color: var(--ink-black);
  font-weight: 600;
}

.signature {
  display: block;
  margin-top: 2rem;
  font-style: italic;
  color: var(--detective-brown);
  font-size: 1.2rem;
  text-align: right;
}

.proposal-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.accept-button,
.decline-button {
  background: linear-gradient(135deg, var(--accent-gold), #e5c84a);
  border: 3px solid var(--detective-brown);
  padding: 1.3rem 3rem;
  border-radius: 5px;
  color: var(--ink-black);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  font-family: "Cinzel", serif;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px var(--shadow-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 1px;
}

.accept-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px var(--shadow-dark), 0 0 30px var(--glow-gold);
  background: linear-gradient(135deg, #e5c84a, var(--accent-gold));
}

/* Success Section */
.success-section {
  background: linear-gradient(135deg, var(--paper-cream), #f9f6f0);
  border: 4px double var(--accent-gold);
  padding: 4rem 3rem;
  margin-bottom: 3rem;
  box-shadow: 0 10px 40px var(--shadow-dark),
    inset 0 0 30px rgba(212, 175, 55, 0.15);
  text-align: center;
  animation: fadeInUp 1s ease-out;
}

.success-content {
  max-width: 700px;
  margin: 0 auto;
}

.success-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  animation: bounce 1s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px var(--shadow-dark));
}

.success-title {
  font-family: "Cinzel", serif;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  color: var(--ink-black);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.success-text {
  font-size: 1.4rem;
  color: var(--text-dark);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.success-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.detail-item {
  background: rgba(212, 175, 55, 0.1);
  border: 2px solid var(--accent-gold);
  padding: 1.5rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease;
}

.detail-item:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 6px 20px var(--shadow-dark);
}

.detail-icon {
  font-size: 2.5rem;
}

.detail-text {
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 500;
  font-family: "Cinzel", serif;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--paper-cream);
  background: rgba(0, 0, 0, 0.3);
  border-top: 2px solid var(--accent-gold);
}

.footer-text {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-style: italic;
}

.footer-subtext {
  font-size: 1rem;
  opacity: 0.8;
  font-weight: 400;
}

.footer-icon {
  display: inline-block;
  animation: rotate 3s linear infinite;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

/* Typewriter Effect */
.typewriter-text::after {
  content: "|";
  animation: blink 1s infinite;
  color: var(--accent-gold);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  main {
    padding: 1rem;
  }

  .case-header {
    padding: 3rem 1.5rem;
  }

  .case-stamp {
    top: 10px;
    right: 10px;
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
  }

  .clue-item {
    flex-direction: column;
    text-align: center;
  }

  .clue-icon {
    margin: 0 auto;
  }

  .proposal-section,
  .success-section {
    padding: 2.5rem 1.5rem;
  }

  .proposal-stamp {
    top: 15px;
    right: 15px;
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }

  .proposal-buttons {
    flex-direction: column;
    align-items: center;
  }

  .accept-button,
  .decline-button {
    width: 100%;
    max-width: 300px;
  }

  .success-details {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .case-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .typewriter-text,
  .deduction-text,
  .proposal-text {
    font-size: 1.1rem;
  }

  .success-details {
    grid-template-columns: 1fr;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
