* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: #f9f9f9;
  color: #333;
  min-height: 100vh;
}

header {
  background: #fff;
  padding: 10px; /* Reduced padding for mobile */
  position: fixed;
  width: 100%;
  top: 0;
  border-bottom: 1px solid #ddd;
}

header img.logo {
  width: 50px; /* Slightly smaller for mobile */
  height: auto;
  display: block;
  margin: 0 auto 8px;
}

header h1 {
  font-size: 1.3em; /* Reduced for mobile */
  text-align: center;
  font-weight: 600;
}

header p.tagline {
  font-size: 0.8em; /* Reduced for mobile */
  text-align: center;
  color: #666;
  margin: 4px 0;
}

.contract-container {
  background: #ffe066;
  padding: 6px;
  border-radius: 6px;
  font-size: 0.8em; /* Slightly smaller for mobile */
  margin: 8px auto;
  max-width: 95%; /* Slightly wider for mobile */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.contract-text {
  flex-grow: 1;
  word-break: break-all;
}

.copy-btn {
  background: #333;
  color: #fff;
  border: none;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  cursor: pointer;
  margin-left: 6px;
}

.copy-btn:hover {
  background: #555;
}

.price-display {
  font-size: 0.9em;
  text-align: center;
  margin: 8px 0;
  color: #333;
}

.price-display.loading {
  color: #666;
  font-style: italic;
}

.main-content {
  padding: 10px; /* Reduced for mobile */
  margin-top: 150px; /* Fallback for no JavaScript */
}

.community-posts {
  margin-bottom: 15px;
}

.community-posts h2 {
  font-size: 1.2em; /* Reduced for mobile */
  text-align: center;
  font-weight: 600;
  margin-bottom: 8px;
}

.community-instructions {
  font-size: 0.85em; /* Slightly smaller for mobile */
  text-align: center;
  color: #666;
  margin-bottom: 8px;
}

.community-links {
  max-height: 100px; /* Reduced slightly for mobile */
  overflow-y: auto;
  background: #fff;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
  max-width: 95%; /* Match contract-container */
  margin: 0 auto;
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.1);
}

.community-links::-webkit-scrollbar {
  width: 6px; /* Thinner for mobile */
}

.community-links::-webkit-scrollbar-thumb {
  background: #ffe066;
  border-radius: 4px;
}

.community-links::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.community-links a {
  display: block;
  font-size: 0.85em; /* Slightly smaller for mobile */
  color: #007bff;
  text-decoration: underline;
  background: #f5f5f5;
  padding: 4px 6px;
  border-radius: 4px;
  margin: 4px 0;
  word-break: break-all;
  transition: background 0.2s, color 0.2s;
}

.community-links a:hover {
  color: #0056b3;
  background: #e0e0e0;
  text-decoration: underline;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px; /* Slightly smaller for mobile */
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

footer {
  background: #fff;
  padding: 10px; /* Reduced for mobile */
  border-top: 1px solid #ddd;
  text-align: center;
}

.description {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 8px;
}

.cta {
  display: inline-block;
  padding: 6px 12px; /* Reduced for mobile */
  background: #ffe066;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.85em;
  margin: 4px;
}

.cta:hover {
  background: #ffd633;
}

.socials {
  margin-top: 8px;
}

.social-icon {
  font-size: 1.6em; /* Slightly smaller for mobile */
  margin: 0 8px;
  color: #333;
  text-decoration: none;
  transition: transform 0.2s, color 0.2s;
}

.social-icon:hover {
  transform: scale(1.2);
  color: #000;
}

@media (min-width: 600px) {
  header {
    padding: 15px;
  }
  header img.logo {
    width: 60px;
    margin-bottom: 10px;
  }
  header h1 {
    font-size: 1.5em;
  }
  header p.tagline {
    font-size: 0.9em;
    margin: 5px 0;
  }
  .contract-container {
    padding: 8px;
    font-size: 0.85em;
    margin: 10px auto;
    max-width: 90%;
  }
  .copy-btn {
    padding: 6px 10px;
    font-size: 0.8em;
    margin-left: 8px;
  }
  .price-display {
    font-size: 1em;
    margin: 10px 0;
  }
  .main-content {
    padding: 15px;
  }
  .community-posts h2 {
    font-size: 1.3em;
    margin-bottom: 10px;
  }
  .community-instructions {
    font-size: 0.9em;
    margin-bottom: 10px;
  }
  .community-links {
    max-height: 120px;
    padding: 10px;
    max-width: 90%;
  }
  .community-links a {
    font-size: 0.9em;
    padding: 5px 8px;
    margin: 5px 0;
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  footer {
    padding: 15px;
  }
  .description {
    font-size: 0.9em;
    margin-bottom: 10px;
  }
  .cta {
    padding: 8px 15px;
    font-size: 0.9em;
    margin: 5px;
  }
  .social-icon {
    font-size: 1.8em;
    margin: 0 10px;
  }
}