/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff5e6;
  background-image:
    radial-gradient(circle at 20% 30%, #ffcc66 0%, transparent 3%),
    radial-gradient(circle at 80% 70%, #ff9933 0%, transparent 3%),
    radial-gradient(circle at 40% 60%, #ffcc66 0%, transparent 2.5%),
    radial-gradient(circle at 60% 20%, #ff9933 0%, transparent 2.5%),
    radial-gradient(circle at 10% 80%, #ffcc66 0%, transparent 2%),
    radial-gradient(circle at 90% 10%, #ff9933 0%, transparent 2%);
  background-size: 200px 200px;
  background-position: 0 0;
  animation: popcornBg 20s linear infinite;
}

@keyframes popcornBg {
  0% { background-position: 0 0; }
  100% { background-position: 200px 200px; }
}

/* Header Styles */
header {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 10px 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.breadcrumb {
  font-size: 14px;
  color: #666;
}

.breadcrumb a {
  color: #ff7700;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Popcorn Logo H1 */
.popcorn-logo {
  text-align: center;
  font-size: 2.8em;
  font-weight: 900;
  color: #ff6600;
  margin: 40px 0;
  letter-spacing: -1px;
  line-height: 1.1;
  font-family: 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
}

.popcorn-logo::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, transparent, #ff9933, transparent);
}

/* Table of Contents */
.toc {
  background-color: #fff8e6;
  border: 2px solid #ff9933;
  border-radius: 10px;
  padding: 20px;
  margin: 30px 0;
}

.toc h2 {
  color: #ff6600;
  margin-bottom: 15px;
}

.toc ul {
  list-style: none;
}

.toc li {
  padding: 5px 0;
}

.toc a {
  color: #ff7700;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s;
}

.toc a:hover {
  transform: translateX(5px);
  text-decoration: underline;
}

/* Section Styles */
section {
  margin: 40px 0;
  padding: 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

h2 {
  color: #ff6600;
  margin-bottom: 20px;
  font-size: 1.8em;
  position: relative;
  padding-left: 30px;
}

h2::before {
  content: "🍿";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
}

h3 {
  color: #ff7700;
  margin: 15px 0;
  font-size: 1.3em;
}

/* Images */
.main-image {
  text-align: center;
  margin: 20px 0;
}

.main-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

figcaption {
  color: #666;
  font-size: 0.9em;
  margin-top: 10px;
}

/* Character Dialogue */
.character-dialogue {
  display: flex;
  align-items: center;
  margin: 30px 0;
  gap: 15px;
}

.character-avatar {
  text-align: center;
  flex-shrink: 0;
}

.character-avatar img {
  width: 96px;
  height: 96px;
  display: block;
  margin: 0 auto 5px;
  border-radius: 50%;
}

.character-name {
  font-weight: bold;
  color: #ff6600;
  font-size: 0.85em;
}

.speech-bubble {
  background-color: #fff8e6;
  border: 2px solid #ff9933;
  border-radius: 20px;
  padding: 15px 20px;
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  flex: 1;
}

.speech-bubble::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 15px 10px 0;
  border-color: transparent #ff9933 transparent transparent;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 14px 9px 0;
  border-color: transparent #fff8e6 transparent transparent;
}

/* Theater List */
.theater-list {
  background-color: #fff8e6;
  padding: 20px;
  border-radius: 10px;
}

.theater-list dt {
  font-weight: bold;
  color: #ff6600;
  margin-top: 15px;
}

.theater-list dd {
  margin-left: 20px;
  margin-bottom: 10px;
}

/* Tables */
.ranking-table,
.menu-table,
.links-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ranking-table th,
.menu-table th,
.links-table th {
  background-color: #ff9933;
  color: white;
  padding: 15px;
  text-align: left;
}

.ranking-table td,
.menu-table td,
.links-table td {
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.ranking-table .rank {
  font-weight: bold;
  color: #ff6600;
  font-size: 1.2em;
}

.ranking-table tr:nth-child(1) .rank {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #333;
  padding: 10px 15px;
  border-radius: 5px;
}

.menu-table th {
  width: 40%;
  background-color: #ffcc66;
  color: #333;
}

/* Links */
a {
  color: #ff7700;
}

a:hover {
  color: #ff9933;
}

/* Related Links */
.related-links {
  background-color: #fff8e6;
  padding: 30px;
  margin-top: 50px;
  border-radius: 10px;
}

.related-links h2 {
  color: #ff6600;
  margin-bottom: 20px;
}

.related-links ul {
  list-style: none;
}

.related-links li {
  padding: 8px 0;
}

.related-links a {
  color: #ff7700;
  text-decoration: none;
}

.related-links a:hover {
  text-decoration: underline;
}

/* Footer */
footer.copy {
  background-color: #ff9933;
  color: white;
  padding: 30px 20px;
  margin-top: 50px;
}

footer.copy a {
  color: #fff8e6;
}

footer.copy a:hover {
  color: white;
}

.contact-info,
.usage-terms,
.copyright {
  margin: 15px 0;
}

.copyright {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 15px;
  margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .popcorn-logo {
    font-size: 2em;
    letter-spacing: -0.5px;
  }

  .popcorn-logo::after {
    width: 80px;
    height: 3px;
  }

  h2 {
    font-size: 1.5em;
  }

  h3 {
    font-size: 1.2em;
  }

  .character-dialogue {
    gap: 10px;
  }

  .character-avatar {
    width: 80px;
  }

  .character-avatar img {
    width: 80px;
    height: 80px;
  }

  .character-name {
    font-size: 0.8em;
  }

  .speech-bubble {
    padding: 12px 15px;
    font-size: 0.95em;
  }

  table {
    font-size: 0.9em;
  }

  th, td {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 10px;
  }

  section {
    padding: 15px;
  }

  .popcorn-logo {
    font-size: 1.4em;
    letter-spacing: -0.5px;
    margin: 25px 0;
  }

  .popcorn-logo::after {
    width: 60px;
    height: 3px;
    bottom: -8px;
  }

  .character-dialogue {
    gap: 8px;
  }

  .character-avatar {
    width: 60px;
  }

  .character-avatar img {
    width: 60px;
    height: 60px;
  }

  .character-name {
    font-size: 0.75em;
  }

  .speech-bubble {
    padding: 10px 12px;
    font-size: 0.85em;
  }

  .speech-bubble::before {
    left: -10px;
    border-width: 8px 10px 8px 0;
  }

  .speech-bubble::after {
    left: -8px;
    border-width: 7px 9px 7px 0;
  }
}

/* Hover Animation */
.main-image img:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

/* Print Styles */
@media print {
  body {
    background: white;
  }

  header, footer {
    display: none;
  }

  main {
    box-shadow: none;
  }

  .toc {
    page-break-after: always;
  }
}
