/* =============================================
   MAXDK9 — Dark Gaming Theme
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg-primary:    #0d0d1a;
  --bg-secondary:  #12122a;
  --bg-card:       #161630;
  --bg-card-hover: #1e1e40;
  --accent-1:      #7c4dff;
  --accent-2:      #3d9cf5;
  --accent-glow:   rgba(124, 77, 255, 0.35);
  --accent-glow2:  rgba(61, 156, 245, 0.25);
  --text-primary:  #e8e8f0;
  --text-secondary:#9b9bb8;
  --text-muted:    #5a5a80;
  --border:        rgba(124, 77, 255, 0.18);
  --border-hover:  rgba(124, 77, 255, 0.55);
  --radius:        14px;
  --radius-sm:     8px;
  --radius-lg:     22px;
  --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  /* subtle dot grid pattern */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(124,77,255,0.07) 1px, transparent 0);
  background-size: 32px 32px;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent-1);
}

img { max-width: 100%; height: auto; display: block; }
ul  { list-style: none; padding: 0; }

/* =============================================
   NAV / TITLE BAR (game pages)
   ============================================= */
.title {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(13, 13, 26, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.title .container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.title .container > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Logo */
.title .logo a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  text-decoration: none;
}
.title .logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}
.title .logo div {
  display: inline-flex;
  align-items: center;
}
.title .logo div > span {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.title .logo br { display: none; }

/* Share buttons */
.title .share {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.title .share a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.title .share img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  opacity: 0.75;
  transition: opacity var(--transition), transform var(--transition);
  filter: drop-shadow(0 0 4px var(--accent-glow));
}
.title .share img:hover {
  opacity: 1;
  transform: scale(1.15);
}

#share-full {
  display: flex;
  gap: 0.4rem;
}
#share-general { display: none; }

/* =============================================
   MAIN CONTENT (game pages)
   ============================================= */
.content {
  max-width: 820px;
  margin: 0 auto;
  padding: 100px 2rem 3rem;
  color: var(--text-primary);
}

/* App hero */
.app-logo { text-align: center; margin-bottom: 1.25rem; }
.app-icon {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  margin: 0 auto;
  box-shadow:
    0 0 0 3px rgba(124,77,255,0.25),
    0 0 40px var(--accent-glow),
    0 16px 40px rgba(0,0,0,0.5);
}

.app-name {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  font-weight: 900;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-2) 60%, var(--accent-1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-shortdesc {
  font-size: 1.1rem;
  font-weight: 400;
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.app-gamedesigner {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-style: italic;
}

/* Download buttons */
.app-download {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 2.5rem;
}

.play-link {
  display: inline-flex;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.play-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
.play-link img,
.appstore-link img {
  height: 52px;
  width: auto;
  display: block;
}

/* Video embed */
.content center {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.content center iframe,
.content iframe {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  max-width: 100%;
}

/* Screenshots */
.app-screenshots {
  margin: 0 auto 3rem;
  max-width: 680px;
}

.pure-g { display: flex; flex-wrap: wrap; }
.pure-u-1 { width: 100%; }

@media (min-width: 550px) {
  .pure-u-sm-1-2 { width: 50%; }
}

.img-box {
  padding: 0.5rem;
}
.img-box img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  width: 100%;
}
.img-box img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 40px var(--accent-glow);
  border-color: var(--border-hover);
}

.center { display: flex; justify-content: center; }
.margin-auto { margin: 0 auto; }

/* Reviews / mentions */
.app-mentions {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.app-mentions > div {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-1);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.app-mentions ul { padding-left: 1rem; }
.app-mentions li {
  list-style: disc;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.app-mentions a {
  color: var(--accent-2);
}
.app-mentions a:hover { color: var(--accent-1); }

/* Section labels */
.app-desc > div,
.app-credits > div,
.app-screenshots > div {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-1);
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Description text */
.app-desc {
  margin-bottom: 3rem;
}
.app-desc p,
.app-desc .story {
  color: var(--text-secondary);
  font-size: 0.97rem;
  margin-bottom: 0.85rem;
  line-height: 1.75;
  font-style: normal;
}

/* Credits */
.app-credits {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.app-credits ul {
  padding: 0;
}
.app-credits li {
  color: var(--text-secondary);
  font-size: 0.92rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.app-credits li:last-child { border-bottom: none; }
.app-credits ul ul {
  list-style: disc;
  padding-left: 1.2rem;
}
.builtwith { margin-top: 0.75rem; }
.builtwith img.libgdx-logo { height: 22px; display: inline-block; vertical-align: middle; }
.builtwith a { color: var(--accent-2); }

/* Contact inside game page */
.main-part p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.email-link {
  color: var(--accent-2) !important;
  text-decoration: underline;
}

/* =============================================
   INDEX / MAIN PAGE
   ============================================= */

/* Hero header */
#main-title {
  background: linear-gradient(160deg, #0d0d1a 0%, #16103a 55%, #0d0d1a 100%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 2rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
#main-title::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(124,77,255,0.2) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 100%, rgba(61,156,245,0.12) 0%, transparent 70%);
  pointer-events: none;
}

#main-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.25rem;
  border-radius: 22px;
  box-shadow:
    0 0 0 3px rgba(124,77,255,0.3),
    0 0 50px var(--accent-glow),
    0 20px 50px rgba(0,0,0,0.6);
  position: relative;
  z-index: 1;
}

#main-name {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-2) 45%, var(--accent-1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
  display: block;
  line-height: 1.15;
}

/* Main content area */
#main-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

.main-part {
  margin-bottom: 3.5rem;
}

/* Section headings */
.main-part h2 {
  font-family: 'Orbitron', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-1);
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

/* Games grid — Modern Responsive Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.app-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.2rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 250px;
}

.app-info::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.12) 0%, rgba(61, 156, 245, 0.12) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.app-info:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow:
    0 12px 40px var(--accent-glow),
    0 4px 16px rgba(0,0,0,0.4);
}

.app-info:hover::before {
  opacity: 1;
}

.app-icon-wrap {
  position: relative;
  margin-bottom: 1rem;
  z-index: 1;
}

.app-icon-wrap img {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  transition: transform var(--transition), box-shadow var(--transition);
  margin-bottom: 0 !important;
}

.app-info:hover .app-icon-wrap img {
  transform: scale(1.05);
  box-shadow: 
    0 0 0 2px rgba(124, 77, 255, 0.4),
    0 8px 24px var(--accent-glow);
}

.app-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 1rem;
  z-index: 1;
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.app-action {
  font-family: 'Orbitron', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  border: 1px solid rgba(61, 156, 245, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(61, 156, 245, 0.05);
  transition: all var(--transition);
  z-index: 1;
}

.app-info:hover .app-action {
  color: #fff;
  background: var(--accent-1);
  border-color: var(--accent-1);
  box-shadow: 0 0 12px rgba(124, 77, 255, 0.5);
}

/* About Me section */
.main-part p {
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.75;
}

/* Store & social links */
.index-link {
  display: inline-flex;
  align-items: center;
  margin: 0 0.75rem 0.75rem 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.index-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.play-link.index-link img,
.index-link img {
  height: 46px;
  width: auto;
}

.follow-link img {
  width: 46px;
  border-radius: 50%;
  transition: transform var(--transition), filter var(--transition);
}
.follow-link img:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px var(--accent-1));
}

/* Terms / Privacy links */
.main-part a {
  color: var(--accent-2);
  font-size: 0.92rem;
  transition: color var(--transition);
}
.main-part a:hover { color: var(--accent-1); }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  text-align: center;
  padding: 1.25rem 2rem;
  font-size: 0.82rem;
  line-height: 1.5;
}
.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}
.footer a:hover { color: var(--accent-1); }
.footer a > img {
  width: 22px;
  vertical-align: middle;
  display: inline;
  opacity: 0.7;
  transition: opacity var(--transition);
}
.footer a:hover > img { opacity: 1; }
.footer > span { white-space: nowrap; }
.footer .divider { color: var(--border); padding: 0 0.4rem; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 680px) {
  .footer .divider  { display: none; }
  .footer > span.text { display: block; margin: 0.5rem 0; }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }
  .app-icon-wrap img { width: 75px; height: 75px; }
  .app-info { min-height: 210px; padding: 1.25rem 0.9rem; }
  .app-title { font-size: 0.85rem; margin-bottom: 0.75rem; }
}

@media (max-width: 550px) {
  #share-full {
    display: none;
    position: fixed;
    top: 64px; right: 0;
    background: rgba(22, 16, 58, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 0.75rem 1rem;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 0 var(--radius-sm);
    flex-direction: column;
    gap: 0.5rem;
  }
  #share-general { display: flex !important; }
  .content { padding-top: 88px; }
}

@media (max-width: 450px) {
  #main-title { padding: 2.5rem 1.25rem 2rem; }
  #main-content { padding: 2rem 1.25rem; }
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* =============================================
   MISC UTILITIES
   ============================================= */
.faq-q {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.5rem;
}
.faq-a {
  color: var(--text-secondary);
  line-height: 1.75;
}

.embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  margin-bottom: 2.5rem;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: var(--radius);
}

/* google-play & app-store badges on game pages */
.app-download .play-link img {
  height: 52px;
  width: auto;
}
