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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0f0f13;
  color: #e2e8f0;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 15, 19, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e1e2a;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(90deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  perspective: 1000px;
}

.logo img {
  height: 50px;
  width: auto;
  display: block;
  animation: spin3d 6s infinite linear;
}

@keyframes spin3d {
  0% {
    transform: rotateY(0deg) rotateX(5deg);
  }
  100% {
    transform: rotateY(360deg) rotateX(5deg);
  }
}

nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

nav a {
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: #a78bfa;
}

/* Buttons */
/* Red/black glossy buttons (matches the logo) */
.btn,
.back-button,
.social-card a {
  display: inline-block;
  background: linear-gradient(180deg, #ff3b30 0%, #d10000 45%, #8a0000 100%);
  color: #fff;
  border: 1px solid #3a0000;
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn {
  padding: 0.9rem 2.2rem;
}

.btn:hover,
.back-button:hover,
.social-card a:hover {
  transform: translateY(-3px);
  filter: brightness(1.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 25px rgba(220, 20, 20, 0.45);
}

/* Hero */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1.5rem;
  background: #0f0f13;
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 950;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  font-family: 'Trebuchet MS', 'Arial Black', sans-serif;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2em;
  word-spacing: 0.3em;
}

.hero h1 span {
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 50%, #1f2937 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  opacity: 0;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px) skewX(10deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) skewX(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(30px);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes rotateIn {
  0% {
    opacity: 0;
    transform: rotate(-5deg) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

@keyframes glitchIn {
  0% {
    opacity: 0;
    transform: translate(0);
  }
  20% {
    transform: translate(-4px, 4px);
  }
  40% {
    transform: translate(-4px, -4px);
  }
  60% {
    transform: translate(4px, 4px);
  }
  80% {
    transform: translate(4px, -4px);
  }
  100% {
    opacity: 1;
    transform: translate(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1.anim-1 span {
  animation: fadeInScale 0.9s ease-out forwards;
}

.hero h1.anim-2 span {
  animation: slideInLeft 0.9s ease-out forwards;
}

.hero h1.anim-3 span {
  animation: bounceIn 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.hero h1.anim-4 span {
  animation: rotateIn 0.9s ease-out forwards;
}

.hero h1.anim-5 span {
  animation: glitchIn 0.8s ease-out forwards;
}

.hero h1 span:nth-of-type(1) { animation-delay: 0s; }
.hero h1 span:nth-of-type(2) { animation-delay: 0.05s; }
.hero h1 span:nth-of-type(3) { animation-delay: 0.1s; }
.hero h1 span:nth-of-type(4) { animation-delay: 0.15s; }
.hero h1 span:nth-of-type(5) { animation-delay: 0.2s; }
.hero h1 span:nth-of-type(6) { animation-delay: 0.25s; }
.hero h1 span:nth-of-type(7) { animation-delay: 0.3s; }
.hero h1 span:nth-of-type(8) { animation-delay: 0.35s; }
.hero h1 span:nth-of-type(9) { animation-delay: 0.4s; }
.hero h1 span:nth-of-type(10) { animation-delay: 0.45s; }

.hero-logo {
  max-width: 400px;
  width: 80%;
  height: auto;
  margin-bottom: 2rem;
  animation: logoFadeIn 1s ease-out forwards;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

@keyframes logoFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero p {
  font-size: 1.25rem;
  color: #94a3b8;
  max-width: 600px;
  margin-bottom: 2.5rem;
  animation: fadeInUp 1.2s ease-out 0.3s forwards;
  opacity: 0;
}

/* Sections */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

h2 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  text-align: center;
}

.section-desc {
  text-align: center;
  color: #94a3b8;
  margin-bottom: 3.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.game-card {
  background: #1a1a24;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #2a2a3a;
  transition: transform 0.3s, border-color 0.3s;
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: #8b5cf6;
}

.game-img {
  height: 180px;
  background: linear-gradient(135deg, #4c1d95, #1e3a8a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.game-info {
  padding: 1.5rem;
}

.game-info h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.game-info p {
  color: #94a3b8;
  font-size: 0.95rem;
}

/* About */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1.2rem;
  color: #cbd5e1;
}

/* Social Section */
.social-section {
  text-align: center;
  padding: 4rem 2rem;
  background: #1a1a24;
  border-top: 1px solid #2a2a3a;
  border-bottom: 1px solid #2a2a3a;
}

.social-section h2 {
  margin-bottom: 2rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.social-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s, color 0.2s;
  text-decoration: none;
  color: #94a3b8;
}

.social-icon:hover {
  transform: translateY(-4px);
  color: #a78bfa;
}

.social-icon-circle {
  width: 64px;
  height: 64px;
  border: 2px solid #2a2a3a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: border-color 0.2s;
}

.social-icon:hover .social-icon-circle {
  border-color: #a78bfa;
}

.social-icon span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Contact */
.contact {
  text-align: center;
}

.contact a {
  color: #a78bfa;
  font-weight: 600;
}

/* Blog Styles */
main {
  margin-top: 80px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 3rem 2rem;
}

.blog-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-header h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #c4b5fd, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-header p {
  color: #94a3b8;
  font-size: 1.1rem;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
}

.blog-post-preview {
  background: #1a1a24;
  border: 1px solid #2a2a3a;
  border-radius: 12px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s;
}

.blog-post-preview:hover {
  border-color: #8b5cf6;
  background: #1f1f2e;
  transform: translateX(4px);
}

.blog-post-preview h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
}

.blog-post-date {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.blog-post-preview p {
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.blog-post {
  background: #1a1a24;
  border: 1px solid #2a2a3a;
  border-radius: 12px;
  padding: 3rem;
  margin-bottom: 2rem;
}

.blog-post h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #c4b5fd, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-post-content {
  color: #cbd5e1;
  line-height: 1.8;
}

.blog-post-content h2 {
  font-size: 1.8rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #e2e8f0;
}

.blog-post-content h3 {
  font-size: 1.4rem;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: #e2e8f0;
}

.blog-post-content p {
  margin-bottom: 1rem;
}

.blog-post-content ul, .blog-post-content ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
}

.blog-post-content code {
  background: #0f0f13;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: #a78bfa;
}

.blog-post-content pre {
  background: #0f0f13;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid #2a2a3a;
}

.blog-post-content pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
}

.blog-post-content blockquote {
  border-left: 4px solid #8b5cf6;
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 1rem;
  color: #94a3b8;
  font-style: italic;
}

.back-button {
  padding: 0.7rem 1.5rem;
  margin-bottom: 2rem;
}

.loading {
  text-align: center;
  color: #94a3b8;
  padding: 2rem;
}

.error {
  background: #7f1d1d;
  border: 1px solid #dc2626;
  color: #fca5a5;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

/* Socials Page Styles */
.socials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.social-card {
  background: linear-gradient(135deg, #1a1a24 0%, #252536 100%);
  border: 1px solid #2a2a3a;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.social-card:hover {
  transform: translateY(-8px);
  border-color: #a78bfa;
  box-shadow: 0 20px 40px rgba(167, 139, 250, 0.15);
  background: linear-gradient(135deg, #252536 0%, #2d2d42 100%);
}

.social-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
}

.social-card p {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.social-card a {
  padding: 0.7rem 1.8rem;
  margin-top: 0.5rem;
}

/* Game Page (maku.html) */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 8rem 1.5rem 4rem;
}

.game-banner {
  width: 100%;
  aspect-ratio: 460 / 215;
  background: #1a1a24;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid #2a2a3a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.game-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.container h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #ff3b30 0%, #d10000 55%, #8a0000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.description {
  color: #94a3b8;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* Policy Pages (privacy.html, tos.html) */
.policy {
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 1.5rem 6rem;
}

.policy h1 {
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: linear-gradient(180deg, #ff3b30 0%, #d10000 55%, #8a0000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.updated {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 3rem;
}

.policy h2 {
  text-align: left;
  font-size: 1.5rem;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  color: #e2e8f0;
}

.policy p {
  color: #cbd5e1;
  margin-bottom: 1.1rem;
}

.policy ul {
  color: #cbd5e1;
  margin: 0 0 1.1rem 1.4rem;
}

.policy li {
  margin-bottom: 0.5rem;
}

.policy a {
  color: #ff4d4d;
  font-weight: 600;
}

.policy a:hover {
  text-decoration: underline;
}

.policy a.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 500;
}

.policy a.back-link:hover {
  color: #ff4d4d;
  text-decoration: none;
}

/* Footer */
footer {
  text-align: center;
  padding: 2.5rem;
  border-top: 1px solid #1e1e2a;
  color: #64748b;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: #64748b;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #a78bfa;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
  border: 1px solid #2a2a3a;
  border-radius: 50%;
}

.footer-social a:hover {
  color: #a78bfa;
  border-color: #a78bfa;
}

/* Mobile */
@media (max-width: 768px) {
  header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    width: 100%;
    justify-content: center;
    gap: 1rem;
  }

  .hero {
    height: auto;
    padding: 6rem 1rem 4rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  section {
    padding: 4rem 1.2rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }

  .social-icons {
    gap: 1.5rem;
  }

  .social-icon-circle {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }

  main {
    margin-top: 70px;
    padding: 2rem 1rem;
  }

  .blog-header h1 {
    font-size: 2rem;
  }

  .blog-post {
    padding: 1.5rem;
  }

  .blog-post h1 {
    font-size: 1.6rem;
  }

  .socials-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .container {
    padding: 9rem 1.2rem 3rem;
  }

  .container h1 {
    font-size: 2.2rem;
  }

  .policy {
    padding: 9rem 1.2rem 4rem;
  }
}
