:root {
  --paper: #FDFCF9;
  --ink: #1A1A1A;
  --line: #333333;
  --blue: #1E90FF;
  --pink: #FF69B4;
  --cyan: #00FFFF;
  --yellow: #FFFACD;
  --margin: 6vw;
}

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

body {
  background-color: var(--paper);
  background-image: radial-gradient(#d0d0d0 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--ink);
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Typography */
h1, h2, h3 {
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  text-shadow: 4px 4px 0px var(--pink), -2px -2px 0px var(--blue);
  position: relative;
  z-index: 2;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: var(--cyan);
  opacity: 0.5;
  z-index: -1;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

p {
  font-size: 1rem;
  color: #444;
  margin-bottom: 1rem;
}

/* Header/Nav */
header {
  padding: 1.5rem var(--margin);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(253, 252, 249, 0.95);
  backdrop-filter: blur(5px);
  z-index: 100;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: bold;
  font-size: 1.2rem;
}

.logo-group img {
  height: 36px;
  width: auto;
  border-radius: 4px;
}

nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  font-size: 0.9rem;
  font-weight: bold;
}

nav a:hover {
  color: var(--blue);
  text-decoration: underline wavy var(--pink);
}

/* Hero */
.hero {
  padding: 4rem var(--margin);
  text-align: center;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-bottom: 2px dashed var(--line);
}

.hero-tags {
  font-family: "Comic Sans MS", cursive, sans-serif;
  color: var(--blue);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  transform: rotate(-2deg);
}

.hero p {
  max-width: 600px;
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
}

.btn-download {
  display: inline-block;
  background: #fff;
  border: 2px solid var(--line);
  padding: 1rem 3rem;
  font-size: 1.4rem;
  font-weight: bold;
  border-radius: 40px;
  position: relative;
  box-shadow: 6px 6px 0 var(--blue);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.btn-download::before {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 15px solid var(--line);
  z-index: 1;
}

.btn-download::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 21px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 12px solid #fff;
  z-index: 2;
}

.btn-download:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--pink);
}

/* Sections */
section {
  padding: 5rem var(--margin);
  border-bottom: 1px solid var(--line);
}

/* Explore Section (Masonry) */
.explore-tags {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tag {
  font-family: "Comic Sans MS", cursive, sans-serif;
  padding: 0.3rem 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  transform: rotate(-1deg);
}
.tag:nth-child(2n) { transform: rotate(2deg); border-color: var(--pink); color: var(--pink); }
.tag:nth-child(3n) { transform: rotate(-3deg); border-color: var(--blue); color: var(--blue); }

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.comic-card {
  background: #fff;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.comic-card:nth-child(2n) { margin-top: 2rem; }
.comic-card:nth-child(3n) { margin-top: 1rem; }

.comic-card:hover {
  transform: rotate(2deg) scale(1.02);
  z-index: 10;
}

.comic-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border: 2px solid var(--line);
}

.comic-card::after {
  content: 'NEW!';
  position: absolute;
  top: 10px;
  right: -10px;
  background: var(--cyan);
  color: #000;
  font-weight: 900;
  padding: 2px 10px;
  border: 2px solid var(--line);
  transform: rotate(15deg);
  opacity: 0;
  transition: opacity 0.2s;
  font-family: "Comic Sans MS", cursive;
}

.comic-card:hover::after {
  opacity: 1;
}

/* Features Section */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.feature-card {
  border: 1px solid var(--line);
  padding: 2rem;
  background: #fff;
  position: relative;
  border-radius: 2px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border: 2px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-weight: bold;
  font-size: 1.2rem;
  background: var(--yellow);
}

/* Advantages Section */
.advantages-bg {
  background-color: #F9F8F2;
}

.advantage-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.adv-item {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.adv-title {
  flex: 0 0 200px;
  background: #fff;
  border: 2px solid var(--line);
  padding: 1rem;
  font-weight: bold;
  border-radius: 24px;
  position: relative;
  text-align: center;
  box-shadow: 3px 3px 0 var(--blue);
}

.adv-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid var(--line);
}

.adv-title::before {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 21px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid #fff;
  z-index: 1;
}

.adv-desc {
  flex: 1;
  padding-top: 0.5rem;
}

/* Ranks/Daily */
.notebook-paper {
  background: #fff;
  padding: 2rem;
  border: 1px solid var(--line);
  background-image: repeating-linear-gradient(transparent, transparent 31px, #eee 31px, #eee 32px);
  line-height: 32px;
}

.rank-list {
  list-style: none;
}

.rank-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.rank-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--pink);
  border-radius: 50%;
  font-weight: bold;
  color: var(--pink);
  transform: rotate(-10deg);
}

.rank-circle.blue { border-color: var(--blue); color: var(--blue); transform: rotate(5deg); }
.rank-circle.cyan { border-color: var(--cyan); color: #008B8B; transform: rotate(-5deg); }

.rank-title { font-weight: bold; }
.rank-arrow { color: green; font-size: 0.8rem; }
.rank-star { color: gold; }

/* Comments Section */
.comment-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.comment-item {
  display: flex;
  gap: 1rem;
}

.avatar {
  width: 50px;
  height: 50px;
  border: 2px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper);
}

.bubble {
  background: #fff;
  border: 2px solid var(--line);
  padding: 1rem 1.5rem;
  border-radius: 20px;
  border-top-left-radius: 0;
  position: relative;
  flex: 1;
}

.bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: -10px;
  width: 0;
  height: 0;
  border-bottom: 10px solid var(--line);
  border-left: 10px solid transparent;
}

/* FAQ Section */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  border-top: 2px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 1.5rem 0;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  color: var(--ink);
}

.faq-btn::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--blue);
}

.faq-item.active .faq-btn::after {
  content: '-';
  color: var(--pink);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: #FAFAFA;
  border-left: 3px solid var(--blue);
}

.faq-content p {
  padding: 1.5rem;
  margin: 0;
}

/* Footer/Download */
.footer-bookmark {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border: 2px solid var(--line);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  box-shadow: 8px 8px 0 var(--yellow);
}

.footer-bookmark::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 50%;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}

.step {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.step-num {
  width: 28px;
  height: 28px;
  background: var(--pink);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

footer {
  padding: 3rem var(--margin);
  text-align: center;
  color: #888;
  font-size: 0.85rem;
  border-top: 2px dashed var(--line);
  background: var(--paper);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-box {
  background: #fff;
  padding: 2rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  max-width: 90%;
  width: 400px;
  text-align: center;
  box-shadow: 6px 6px 0 var(--pink);
}

.modal-box p { margin-bottom: 1rem; }

.copy-input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border-radius: 4px;
}

.modal-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
  .masonry-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    font-size: 0.85rem;
  }
  .hero {
    padding: 3rem 1rem;
    min-height: auto;
  }
  section {
    padding: 3rem 1rem;
  }
  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .comic-card:nth-child(n) { margin-top: 0; }
  .adv-item {
    flex-direction: column;
    gap: 0.5rem;
  }
  .adv-title {
    flex: none;
    width: 100%;
  }
  .adv-title::after, .adv-title::before {
    display: none;
  }
}