/* -------------------------
   🌌 Global Styles
-------------------------- */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: linear-gradient(to bottom right, #0a0a17, #14142b);
  color: #e6e6e6;
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  text-align: center;
}

a {
  color: #ffaf40;
  text-decoration: none;
}

a:hover {
  color: #ffd580;
  text-shadow: 0 0 2px #fff3;
}

.centered-caption {
  text-align: center;
  font-style: italic;
  margin-top: 0.5rem;
  color: var(--caption-color, #888);
}


/* -------------------------
   ✨ Layout & Containers
-------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  overflow: visible !important;
  text-align: center;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

main {
  flex: 1;
}

/* -------------------------
   🧠 Typography
-------------------------- */
h1, h2, h3 {
  color: #ffe16b;
  text-shadow: 1px 1px 2px #ff0077;
  text-align: center;
}

p, li, blockquote {
  text-align: center;
}


@keyframes pulseGlow {
  0% { text-shadow: 0 0 5px #ff99cc; }
  50% { text-shadow: 0 0 15px #ff66ff; }
  100% { text-shadow: 0 0 5px #ff99cc; }
}

/* -------------------------
   🌠 Home Page Grid Layout
-------------------------- */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.intro-column {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
}

.intro-column h2 {
  font-size: 2.2rem;
  color: #ff66cc;
  text-shadow: 0 0 5px #ff99cc, 0 0 10px #ff66ff;
  animation: pulseGlow 2.5s infinite ease-in-out;
  margin-bottom: 1rem;
}

.intro-column p {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 650px;
  margin-bottom: 1rem;
  text-align: center;
}

.category-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.emoji-row {
  font-size: 1.5rem;
  margin-top: 1rem;
  text-align: center;
}

/* -------------------------
   🔠 Header & Footer
-------------------------- */
header {
  background: #1a1a2f;
  padding: 1rem;
  text-align: center;
  border-top: 2px solid #ffaf40;
  border-bottom: 2px solid #ffaf40;
}

footer {
  background: #1a1a2f;
  padding: 1rem;
  text-align: center;
  border-top: 2px solid #ffaf40;
  border-bottom: none;
  width: 100%;
  position: relative;
  left: 0;
}

/* -------------------------
   📌 Navigation
-------------------------- */
nav {
  margin: 1rem 0;
}

nav a {
  margin: 0 1rem;
  font-weight: bold;
}

/* -------------------------
   🖼️ Logo
-------------------------- */
.logo {
  max-width: 220px;
  height: auto;
  margin-bottom: 1.5rem;
  border-radius: 1rem;
  box-shadow:
    0 0 20px #ff33cc,
    0 0 40px #ff66ff,
    0 0 60px #ff99ff;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.logo:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 25px #ff33cc,
    0 0 50px #ff66ff,
    0 0 80px #ffffff;
}

/* -------------------------
   🎴 Card Layouts
-------------------------- */
.category-column .card {
  background: #14142b;
  border: 1px solid #00ffcc;
  border-radius: 10px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 
    0 0 10px #00ffcc,
    0 0 20px #00ffcc55,
    0 0 30px #00ffcc33;
  transition: transform 0.3s, box-shadow 0.3s;
}

.category-column .card:hover {
  transform: scale(1.02);
  box-shadow:
    0 0 15px #00ffee,
    0 0 30px #00ffee88,
    0 0 45px #00ffee44;
}


/* -------------------------
   📄 Articles
-------------------------- */
.article-content,
.article-content p,
.article-content li,
.article-content ul,
.article-content ol,
.article-content blockquote {
  text-align: left !important;
}

.article-content {
  max-width: 850px;
  margin: 2rem auto;
  padding: 2rem;
  line-height: 1.8;
  font-size: 1.05rem;
  background: rgba(26, 26, 47, 0.9);
  border: 1px solid #ff66cc33;
  border-radius: 20px;
  box-shadow: 0 0 20px 4px #ff33cc44;
  backdrop-filter: blur(6px);
}

.article-list {
  list-style: none;
  padding-left: 0;
  text-align: center;
  margin-top: 1rem;
}

.article-list li {
  margin-bottom: 2rem;
}

.article-text {
  padding: 1rem;
  text-align: center;
}

.article-text h3 {
  margin-top: 0;
  color: #ffe16b;
  text-shadow: 1px 1px 2px #ff0077;
}

.article-text p {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  color: #ccc;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  justify-content: center;
}


.article-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background-color: #14142b;
  border: 1px solid #00ffcc55;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 20px rgba(0,255,204,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}


.article-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(0,255,204,0.3);
}

.article-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-bottom: 1px solid #00ffcc33;
}

.article-image-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.article-header-image {
  max-width: 100%;
  width: 400px; 
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 12px #ff33cc44;
}

/* -------------------------
   🌟 Extras
-------------------------- */
.centered-line {
  text-align: center;
  margin-top: 1rem;
}

.back-button {
  text-align: center;
  margin: 3rem auto 1rem;
}

.back-button a {
  display: inline-block;
  font-weight: bold;
  text-decoration: none;
  color: #ffaf40;
  border: 2px solid #ffaf40;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.back-button a:hover {
  background: #ffaf40;
  color: #1a1a2f;
}

.references a {
  word-break: break-word;
}


/* -------------------------
   🌌 Star Background
-------------------------- */
.star-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(#ffe16bff 1.2px, transparent 1.2px),
    radial-gradient(#ffeb80cc 1.5px, transparent 1.5px),
    radial-gradient(#fff6d199 2px, transparent 2px);
  background-size: 40px 40px, 80px 80px, 120px 120px;
  background-position: 0 0, 20px 20px, 60px 60px;
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
  animation: waveTwinkle 10s ease-in-out infinite;
  filter: 
    drop-shadow(0 0 3px #ffe16b) 
    drop-shadow(0 0 6px #ffd24d) 
    drop-shadow(0 0 8px #fff1a3);
}

@keyframes waveTwinkle {
  0% { transform: translateY(0px) scale(1); opacity: 0.4; }
  25% { transform: translateY(1px) scale(1.01); opacity: 0.6; }
  50% { transform: translateY(2px) scale(1.02); opacity: 0.8; }
  75% { transform: translateY(1px) scale(1.01); opacity: 0.6; }
  100% { transform: translateY(0px) scale(1); opacity: 0.4; }
}


/* -------------------------
   📱 Responsive (Mobile)
-------------------------- */
@media screen and (max-width: 768px) {
  * {
    box-sizing: border-box;
  }

  .container {
    padding: 1rem;
    max-width: 95%;
  }

  a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
  }



  .article-header-image {
    width: 90%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
  }

  .article-content {
    padding: 1.5rem 1rem;
    margin: 1.5rem auto;
    font-size: 1rem;
    line-height: 1.7;
    border-radius: 16px;
    max-width: 95%;
  }

  pre {
    border: 1px solid #ffaf40;
    border-radius: 8px;
    box-shadow: 0 0 8px #ffaf40aa;
    background-color: #0d0d1a;
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
  }

  pre, code {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.9rem;
    max-width: 100%;
  }

  .home-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 2rem;
  }

  h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin-top: 1rem;
  }

  .category-column .card {
    margin: 0 auto 1.5rem;
    width: 90%;
    text-align: center;
  }

  .logo {
    max-width: 180px;
  }

  .emoji-row {
    font-size: 1.3rem;
  }

  .article-image-wrapper {
    margin: 1rem auto;
  }

  footer {
    padding: 1.2rem 0.5rem;
    font-size: 0.9rem;
  }
}

