:root {
  --cosmos-bg: #0b0d17;
  --cosmos-card: #15192b;
  --starlight: #e2e8f0;
  --nebula-purple: #7c3aed;
  --nebula-blue: #3b82f6;
  --nebula-pink: #db2777;
  --void-black: #020205;
  --font-heading: "Orbitron", "Exo", sans-serif;
  --font-body: "Rajdhani", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--cosmos-bg);
  color: var(--starlight);
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 3px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  background-position: 0 0, 40px 60px, 130px 270px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--starlight);
  font-size: 1.4rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.brand img {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 5px var(--nebula-blue));
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links a {
  color: rgba(226, 232, 240, 0.7);
  position: relative;
}

.nav-links a:hover {
  color: var(--starlight);
  text-shadow: 0 0 8px var(--starlight);
}

.nav-links a::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--nebula-blue);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
}

.nav-links a:hover::before {
  opacity: 1;
}

/* Hero */
.hero {
  padding: 50px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 60px;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  align-items: center;
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nebula-blue);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--nebula-blue);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(40px, 6vw, 72px);
  margin: 0 0 24px;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--starlight) 0%, var(--nebula-blue) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 18px;
  color: rgba(226, 232, 240, 0.8);
  margin: 0 0 40px;
  max-width: 500px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--nebula-blue), var(--nebula-purple));
  color: white;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--nebula-purple), var(--nebula-pink));
  z-index: -1;
  transition: opacity 0.3s;
  opacity: 0;
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn.ghost:hover {
  border-color: var(--starlight);
  background: rgba(255,255,255,0.05);
}

.btn-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.hero-media {
  position: relative;
  width: fit-content;
  max-width: 560px;
  margin: 0 auto;
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: -20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-image {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  position: relative;
  z-index: 1;
}

/* Sections */
.section-title {
  font-family: var(--font-heading);
  text-align: center;
  margin: 0 0 60px;
  font-size: 32px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--starlight);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--nebula-blue), transparent);
  margin: 15px auto 0;
}

.features, .posts, .promotions, .comments, .gallery {
  padding: 50px 0;
}

/* Cards (Cosmos Style) */
.feature-grid, .comment-grid, .post-grid, .gallery-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feature-card, .comment-card, .post-card {
  background: rgba(21, 25, 43, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before, .comment-card::before, .post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--nebula-blue), var(--nebula-purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.feature-card:hover, .comment-card:hover, .post-card:hover {
  transform: translateY(-5px);
  background: rgba(21, 25, 43, 0.9);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.feature-card:hover::before, .comment-card:hover::before, .post-card:hover::before {
  transform: scaleX(1);
}

.feature-title, .comment-title, .post-title {
  font-family: var(--font-heading);
  color: var(--starlight);
  margin: 0 0 15px;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.feature-desc, .comment-desc {
  color: rgba(226, 232, 240, 0.6);
  font-size: 1rem;
  line-height: 1.7;
}

/* Gallery */
.gallery-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  justify-items: center;
}

.gallery-img {
  width: auto;
  max-width: 315px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s;
  filter: saturate(0.8);
}

.gallery-img:hover {
  filter: saturate(1.2);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Posts/Carousel */
.carousel-container {
  position: relative;
}

.carousel-track-container {
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.carousel-track-container::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  display: flex;
  gap: 30px;
  padding: 20px 5px;
  margin: 0;
  list-style: none;
}

.carousel-slide {
  flex: 0 0 320px;
  scroll-snap-align: center;
}

.post-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-title a {
  color: var(--starlight);
}

.post-title a:hover {
  color: var(--nebula-blue);
}

.post-meta {
  color: var(--nebula-purple);
  font-size: 0.9rem;
  margin-bottom: 15px;
  font-family: var(--font-heading);
}

.post-summary {
  flex: 1;
  color: rgba(226, 232, 240, 0.6);
  margin-bottom: 20px;
}

.post-link {
  color: var(--nebula-blue);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.post-link:hover {
  text-shadow: 0 0 5px var(--nebula-blue);
}



/* Promotions */
.promotion-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

.promotion-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--nebula-purple);
}

.promotion-icon {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

.promotion-title {
  color: var(--starlight);
  font-size: 1.1rem;
  margin: 0;
  font-family: var(--font-heading);
}

/* Footer */
.footer {
  padding: 60px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: rgba(226, 232, 240, 0.5);
  background: var(--void-black);
  font-size: 0.9rem;
}

/* Single Page */
.article {
  padding: 80px 0;
}

.article-card {
  background: var(--cosmos-card);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 50px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.article-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--starlight);
}

.article-meta {
  color: var(--nebula-blue);
  margin-bottom: 40px;
  font-family: var(--font-heading);
  letter-spacing: 1px;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(226, 232, 240, 0.9);
}

.article-content h2 {
  font-family: var(--font-heading);
  color: var(--nebula-pink);
  margin-top: 40px;
  border-left: 3px solid var(--nebula-pink);
  padding-left: 15px;
}

/* CTA */
.cta {
  padding: 50px 0;
}

.cta-card {
  background: linear-gradient(135deg, rgba(21, 25, 43, 0.8), rgba(21, 25, 43, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(124, 58, 237, 0.1), transparent 50%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--starlight);
  margin: 0 0 16px;
}

.cta-desc {
  color: rgba(226, 232, 240, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cta-card {
    flex-direction: column;
    text-align: center;
    padding: 40px;
  }
  
  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .cta-buttons .btn {
    width: 100%;
  }

  .hero-title { font-size: 2.5rem; }
  .section-title { font-size: 1.8rem; }
  .nav-links { display: none; }
  .carousel-slide { flex: 0 0 280px; }
}
