
:root {
  --bg: #f8f6ff;
  --fg: #2a1b3d;
  --link: #8b5cf6;
  --link-hover: #7c3aed;
  --header-bg: linear-gradient(135deg, #4c1d95 0%, #7c3aed 50%, #a855f7 100%);
  --header-fg: #fef3c7;
  --menu-bg: rgba(255, 255, 255, 0.1);
  --menu-fg: #fef3c7;
  --section-heading: #4c1d95;
  --accent-gold: #f59e0b;
  --accent-dragon: #dc2626;
  --text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0a1a;
    --fg: #e2e8f0;
    --link: #a855f7;
    --link-hover: #c084fc;
    --header-bg: linear-gradient(135deg, #1e1b4b 0%, #3730a3 50%, #6366f1 100%);
    --header-fg: #fef3c7;
    --menu-bg: rgba(0, 0, 0, 0.2);
    --menu-fg: #fef3c7;
    --section-heading: #c084fc;
    --accent-gold: #fbbf24;
    --accent-dragon: #ef4444;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure proper emoji rendering */
.oshi-mark {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols', 'EmojiOne Mozilla', 'Twemoji Mozilla', 'Segoe UI Symbol', Arial, sans-serif;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

a:hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-dragon));
  transform: scaleX(0);
  animation: linkUnderline 0.3s ease forwards;
}

@keyframes linkUnderline {
  to {
    transform: scaleX(1);
  }
}

header {
  background: var(--header-bg);
  color: var(--header-fg);
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: var(--box-shadow);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dragon-scales" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dragon-scales)"/></svg>');
  opacity: 0.3;
}

header h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

header h1 a {
  color: var(--header-fg);
  text-decoration: none;
}

header h1 a:hover {
  color: var(--accent-gold);
  text-shadow: 0 0 10px var(--accent-gold);
}

nav {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.menu li {
  display: inline;
}

.menu a {
  color: var(--menu-fg);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  background: var(--menu-bg);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.menu a:hover {
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

main {
  padding: 3rem 2rem;
  max-width: 900px;
  margin: auto;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  margin-top: 2rem;
  box-shadow: var(--box-shadow);
}

@media (prefers-color-scheme: dark) {
  main {
    background: rgba(0, 0, 0, 0.2);
  }
}

h1, h2, h3, h4, h5, h6 {
  color: var(--section-heading);
  text-shadow: var(--text-shadow);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-dragon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem;
  border-left: 4px solid var(--accent-gold);
  padding-left: 1rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--accent-dragon);
}

p {
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

footer {
  background: var(--header-bg);
  color: var(--header-fg);
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 3rem;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dragon-scales-footer" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dragon-scales-footer)"/></svg>');
  opacity: 0.3;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.footer-section p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  margin-top: 1rem;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

footer p {
  position: relative;
  z-index: 1;
  margin: 0.5rem 0;
}

footer a {
  color: var(--accent-gold);
  font-weight: 600;
}

footer a:hover {
  color: var(--header-fg);
  text-shadow: 0 0 5px var(--accent-gold);
}

/* Special styling for content sections */
.taxonomy-page, .terms-page {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 10px;
  margin: 1rem 0;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

@media (prefers-color-scheme: dark) {
  .taxonomy-page, .terms-page {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
  }
}

.taxonomy-pages ul, .terms-list ul {
  list-style: none;
  padding: 0;
}

.taxonomy-pages li, .terms-list li {
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border-left: 3px solid var(--accent-gold);
  transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .taxonomy-pages li, .terms-list li {
    background: rgba(0, 0, 0, 0.3);
  }
}

.taxonomy-pages li:hover, .terms-list li:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.date {
  color: var(--accent-dragon);
  font-size: 0.9rem;
  font-weight: 600;
}

.count {
  color: var(--accent-gold);
  font-weight: 600;
}

.section-page {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 10px;
  margin: 1rem 0;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

@media (prefers-color-scheme: dark) {
  .section-page {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
  }
}

.section-content {
  margin-bottom: 2rem;
}

.section-pages h2 {
  color: var(--accent-dragon);
  margin-bottom: 1rem;
}

.section-pages ul {
  list-style: none;
  padding: 0;
}

.section-pages li {
  padding: 1rem;
  margin: 0.5rem 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border-left: 3px solid var(--accent-gold);
  transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .section-pages li {
    background: rgba(0, 0, 0, 0.3);
  }
}

.section-pages li:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.section-pages .description {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
  opacity: 0.8;
  font-style: italic;
}

.oshi-mark {
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  margin: 1rem 0;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  backdrop-filter: blur(5px);
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols', 'EmojiOne Mozilla', 'Twemoji Mozilla', 'Segoe UI Symbol', Arial, sans-serif;
  color: var(--accent-gold);
}

.oshi-mark em {
  font-style: normal;
  color: var(--accent-dragon);
  font-weight: 800;
}

/* Responsive design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  main {
    padding: 2rem 1rem;
    margin: 1rem;
  }
  
  .menu {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .menu a {
    display: block;
    text-align: center;
  }
}
