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

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: #ffffff;
  color: #222222;
  min-height: 100vh;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: all 0.5s ease;
}

.app-container.has-bg {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Links */
a {
  text-decoration: none;
  color: #0000ee;
}

a:visited {
  color: #551a8b;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.header {
  border-bottom: 1px solid #ccc;
  background-color: #f5f5f5;
  width: 100%;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 18px;
}

.logo {
  font-weight: bold;
  font-size: 24px;
  letter-spacing: -0.5px;
  cursor: pointer;
  color: #000;
}

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

.breadcrumb-sep {
  color: #999;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 2px 4px;
  color: #0000ee;
}

.nav-btn:hover {
  background-color: #e0e0e0;
}

.nav-btn.active {
  font-weight: bold;
  color: #000;
}

.nav-sep {
  color: #ccc;
}

.header-tag {
  margin-left: auto;
  font-size: 14px;
  color: #888;
}

@media (max-width: 640px) {
  .header-tag {
    display: none;
  }
}

/* Main Content */
.main-content {
  flex: 1;
}

.view {
  display: block;
}

.view.hidden {
  display: none;
}

/* Randomizer */
.randomizer-container {
  width: 100%;
  max-width: 720px;
  margin: 24px auto;
  padding: 24px;
  background: #f0f0f0;
  border: 1px solid #ccc;
}

.randomizer-box {
  text-align: center;
  padding: 32px 0;
}

.randomizer-title {
  font-weight: bold;
  font-size: 30px;
  margin-bottom: 24px;
  color: #222;
}

.randomizer-inner {
  border: 1px solid #999;
  background: #fff;
  padding: 32px;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.randomizer-text {
  margin-bottom: 24px;
  font-size: 18px;
}

.shuffle-btn {
  background: #eee;
  border: 1px solid #999;
  color: #000;
  padding: 12px 32px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
}

.shuffle-btn:hover {
  background: #ddd;
}

.shuffle-btn:active {
  background: #ccc;
}

.shuffle-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.site-count {
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}

/* Directory */
.directory-header {
  background: #eee;
  border-bottom: 1px solid #ccc;
  padding: 4px 8px;
  text-align: center;
  margin-bottom: 16px;
}

.directory-header h2 {
  font-size: 14px;
  font-weight: bold;
}

.directory-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px 48px;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 24px;
}

@media (min-width: 640px) {
  .directory-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .directory-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .directory-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
}

.category-block {
  margin-bottom: 8px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
}

.category-icon {
  width: 14px;
  height: 14px;
  color: #666;
}

.category-name {
  font-weight: bold;
  font-size: 14px;
  text-transform: lowercase;
  color: #222;
}

.category-name:hover {
  text-decoration: underline;
}

.site-list {
  list-style: none;
  font-size: 14px;
}

.site-list li {
  line-height: 1.4;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.site-list a {
  color: #0000ee;
}

.site-list a:visited {
  color: #551a8b;
}

.site-list a:hover {
  text-decoration: underline;
}

/* Info Pages */
.info-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.info-box {
  background: #fff;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  min-height: 50vh;
  padding: 32px;
}

@media (min-width: 640px) {
  .info-box {
    padding: 32px 48px;
  }
}

.info-title {
  font-size: 20px;
  font-weight: bold;
  border-bottom: 1px solid #ccc;
  padding-bottom: 8px;
  margin-bottom: 24px;
}

.info-content {
  line-height: 1.6;
}

.info-content p {
  margin-bottom: 16px;
}

.info-list {
  list-style: disc;
  padding-left: 20px;
  line-height: 1.6;
}

.info-list li {
  margin-bottom: 12px;
}

.link-text {
  color: #0000ee;
}

/* Feedback */
.feedback-form-container {
  background: #f7f7f7;
  padding: 24px;
  border: 1px solid #ccc;
  margin-top: 16px;
}

.feedback-form {
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.submit-btn {
  background: #eee;
  border: 1px solid #999;
  color: #000;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
}

.submit-btn:hover {
  background: #ddd;
}

.submit-btn:active {
  background: #ccc;
}

.form-note {
  font-size: 10px;
  color: #888;
  margin-top: 8px;
}

.comments-section {
  border-top: 1px solid #ccc;
  padding-top: 16px;
}

.comments-section h3 {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 12px;
}

.no-comments {
  font-size: 12px;
  color: #888;
}

.comment-item {
  background: #fff;
  border: 1px solid #ccc;
  padding: 12px;
  font-size: 12px;
  margin-bottom: 12px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comment-name {
  font-weight: bold;
}

.comment-date {
  font-size: 10px;
  color: #888;
}

.comment-text {
  white-space: pre-wrap;
}

/* Terms */
.terms-box {
  font-size: 12px;
  text-transform: uppercase;
  font-family: monospace;
  background: #f9f9f9;
  padding: 16px;
  border: 1px solid #e0e0e0;
  line-height: 1.8;
}

.terms-box p {
  margin-bottom: 16px;
}

/* Footer */
.footer {
  border-top: 1px solid #ccc;
  padding: 24px 8px;
  text-align: center;
  background: #fff;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  font-size: 12px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.footer-links button {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 2px 4px;
  color: #0000a8;
}

.footer-links button:hover {
  text-decoration: underline;
  background: #f0f0f0;
}

.fun-btn {
  font-weight: bold;
  color: #7c3aed !important;
}

.fun-btn:hover {
  background: #f3e8ff !important;
}

.footer-credit {
  color: #666;
  margin-bottom: 12px;
}

.footer-credit a {
  color: #0000a8;
}

.footer-copy {
  color: #999;
}

/* Fun Mode (Background GIF) */
.app-container.has-bg .header {
  background: rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.2);
}

.app-container.has-bg .header-inner {
  color: #fff;
}

.app-container.has-bg .logo {
  color: #fff;
}

.app-container.has-bg .nav-btn {
  color: rgba(255,255,255,0.9);
}

.app-container.has-bg .nav-btn.active {
  color: #fff;
}

.app-container.has-bg .breadcrumb-sep,
.app-container.has-bg .nav-sep {
  color: rgba(255,255,255,0.5);
}

.app-container.has-bg .header-tag {
  color: rgba(255,255,255,0.6);
}

.app-container.has-bg .footer {
  background: rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.2);
}

.app-container.has-bg .footer-links button {
  color: rgba(255,255,255,0.9);
}

.app-container.has-bg .footer-links button:hover {
  background: rgba(255,255,255,0.1);
}

.app-container.has-bg .fun-btn {
  color: #f9a8d4 !important;
}

.app-container.has-bg .fun-btn:hover {
  background: rgba(236,72,153,0.2) !important;
}

.app-container.has-bg .footer-credit {
  color: rgba(255,255,255,0.8);
}

.app-container.has-bg .footer-credit a {
  color: #fff;
}

.app-container.has-bg .footer-copy {
  color: rgba(255,255,255,0.5);
}

/* SVG Icons (inline) */
.icon-svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

