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

body {
  font-family: 'Newsreader', 'Linux Libertine', 'Georgia', serif;
  background: #f6f6f6;
  color: #202122;
  line-height: 1.6;
  font-size: 15px;
}

.wiki-link {
  color: #0645AD;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}

.wiki-link:hover {
  text-decoration: underline;
}

.wiki-link .tooltip-box {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #a2a9b1;
  border-radius: 3px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  width: 260px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 1000;
  color: #333;
  pointer-events: none;
}

.wiki-link:hover .tooltip-box {
  display: block;
}

.wiki-red-link {
  color: #BA0000;
  text-decoration: none;
  cursor: pointer;
}

.wiki-red-link:hover {
  text-decoration: underline;
}

.citation {
  color: #0645AD;
  font-size: 11px;
  vertical-align: super;
  cursor: pointer;
}

.citation:hover {
  text-decoration: underline;
}

.dubious {
  color: #0645AD;
  font-size: 11px;
  vertical-align: super;
  cursor: help;
  font-style: italic;
}

.edit-link {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  color: #54595d;
  margin-left: 8px;
  cursor: pointer;
}

.edit-link:hover {
  color: #0645AD;
}

.infobox {
  float: right;
  clear: right;
  margin: 0 0 16px 20px;
  border: 1px solid #a2a9b1;
  background: #FFFDE7;
  width: 280px;
  font-size: 13px;
}

.infobox-title {
  background: #FFE135;
  text-align: center;
  padding: 8px;
  font-weight: 700;
  font-size: 16px;
}

.infobox-image {
  text-align: center;
  padding: 8px;
  background: #FFFEF5;
}

.infobox-image img {
  width: 100%;
  max-width: 260px;
  border: 1px solid #ddd;
}

.infobox-caption {
  font-size: 12px;
  color: #555;
  text-align: center;
  padding: 4px 8px 8px;
  font-style: italic;
}

.infobox table {
  width: 100%;
  border-collapse: collapse;
}

.infobox th {
  text-align: left;
  padding: 4px 8px;
  background: #FFF8DC;
  border-top: 1px solid #ddd;
  font-weight: 600;
  width: 40%;
  vertical-align: top;
}

.infobox td {
  padding: 4px 8px;
  border-top: 1px solid #ddd;
  vertical-align: top;
}

.article-image {
  border: 1px solid #a2a9b1;
  background: #FFFEF5;
  padding: 5px;
  margin: 12px 0;
  display: inline-block;
}

.article-image img {
  display: block;
  max-width: 100%;
}

.article-image-caption {
  font-size: 12px;
  color: #555;
  padding: 4px 2px 0;
  max-width: 300px;
  line-height: 1.4;
}

.article-image.float-right {
  float: right;
  margin: 0 0 12px 16px;
}

.article-image.float-left {
  float: left;
  margin: 0 16px 12px 0;
}

blockquote {
  border-left: 3px solid #FFE135;
  margin: 16px 0 16px 20px;
  padding: 8px 16px;
  background: #FFFEF5;
  font-style: italic;
  color: #444;
}

blockquote cite {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 13px;
  color: #666;
}

.toc-item {
  cursor: pointer;
  color: #0645AD;
  padding: 2px 0;
  font-family: 'Source Sans 3', sans-serif;
}

.toc-item:hover {
  text-decoration: underline;
}

.toc-sub {
  padding-left: 16px;
}

.clock-widget {
  background: #FFFDE7;
  border: 2px solid #FFE135;
  border-radius: 12px;
  padding: 24px;
  margin: 20px auto;
  max-width: 420px;
  text-align: center;
}

.clock-face {
  width: 220px;
  height: 220px;
  margin: 0 auto 16px;
  position: relative;
}

.lemon-rain {
  position: fixed;
  top: -40px;
  font-size: 28px;
  z-index: 10000;
  pointer-events: none;
  animation: lemonFall linear forwards;
}

@keyframes lemonFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

.hatnote {
  font-style: italic;
  padding: 4px 0 12px 0;
  color: #555;
  font-size: 14px;
  border-bottom: 1px solid #eee;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .infobox {
    float: none;
    width: 100%;
    margin: 0 0 16px 0;
  }
  
  .article-image.float-right,
  .article-image.float-left {
    float: none;
    margin: 12px 0;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #c8c8c8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}