/* ============================================================
   Endiq Shop — shared stylesheet (Minecraft-themed, multi-page)
   ============================================================ */

:root {
  --sky-a: #0a0819;
  --sky-b: #120e2e;
  --sky-c: #1a1442;
  --panel-bg: #15122e;
  --panel-border: #2c2460;
  --panel-hi: #3c3280;
  --accent: #7d5cff;
  --accent-hi: #9c84ff;
  --accent-lo: #4a32a0;
  --cyan: #00ffb3;
  --gold: #ffaa00;
  --yellow: #ffff55;
  --green: #5cff8f;
  --green-hi: #7bf0a3;
  --green-lo: #1f7a4d;
  --text: #ffffff;
  --muted: #a09cc0;
  --header-height: 60px;
  --bottom-nav-height: 64px;
}

*, *:before, *:after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; background-color: var(--sky-a); }
body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  min-height: 100vh; width: 100%; max-width: 100vw;
  background-color: var(--sky-a); color: var(--text);
  position: relative; overflow-x: hidden; line-height: 1.55;
  padding-bottom: calc(var(--bottom-nav-height) + 18px);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { image-rendering: pixelated; }
::selection { background: #7d5cff66; color: #fff; }
.pixel { font-family: "Press Start 2P", monospace; }

/* ===== Animated background ===== */
#bg {
  position: fixed; inset: 0; z-index: -10; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(125,92,255,.18), transparent 60%),
    radial-gradient(1000px 500px at 95% 10%, rgba(0,255,179,.12), transparent 55%),
    linear-gradient(180deg, #09071a 0%, #130f30 42%, #1a1442 78%, #0d0a22 100%);
}
#bg .aurora {
  position: absolute; border-radius: 50%; filter: blur(90px);
  opacity: .45; mix-blend-mode: screen; pointer-events: none;
  will-change: transform;
}
#a1 { width: 520px; height: 520px; background: #7d5cff; top: -120px; left: -80px; animation: drift1 18s ease-in-out infinite alternate; }
#a2 { width: 460px; height: 460px; background: #00ffb3; bottom: -160px; right: -120px; animation: drift2 22s ease-in-out infinite alternate; }
#a3 { width: 380px; height: 380px; background: #b388ff; top: 40%; left: 60%; opacity: .30; animation: drift3 26s ease-in-out infinite alternate; }
@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(120px,80px) scale(1.15); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-100px,-60px) scale(1.2); } }
@keyframes drift3 { from { transform: translate(0,0) scale(1); } to { transform: translate(-80px,60px) scale(1.1); } }
#bg .stars { position: absolute; inset: 0; z-index: 1; }
#bg .mc-star { position: absolute; background: #fff; border-radius: 1px; opacity: .5; animation: mcTwinkle 3s ease-in-out infinite alternate; }
@keyframes mcTwinkle { 0% { opacity:.2; transform: scale(.7);} 50%{opacity:1; transform: scale(1.2); box-shadow:0 0 4px #fff;} 100%{opacity:.35; transform: scale(.85);} }
#bg .mc-mountain { position: absolute; bottom: 0; left: 0; width: 100%; height: 240px; z-index: 3; pointer-events: none; }
#bg .mc-mountain svg { width: 100%; height: 100%; display: block; }

/* ===== Header ===== */
.app-header {
  position: sticky; top: 0; left: 0; width: 100%; height: var(--header-height);
  background: #100c28ee; border-bottom: 2px solid #261f55;
  box-shadow: 0 4px 16px #00000080; z-index: 200;
  display: flex; align-items: center; backdrop-filter: blur(8px);
}
.header-container { max-width: 1120px; width: 100%; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand-wrapper { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-icon-box { width: 36px; height: 36px; background: #18143a; border: 2px solid #2c2460; border-radius: 5px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.brand-icon-box img { width: 100%; height: 100%; object-fit: cover; }
.brand-title { font-size: .8rem; color: var(--accent-hi); letter-spacing: 1px; text-shadow: 1.5px 1.5px 0 #000; }
.brand-title:hover { color: var(--cyan); }
.header-nav { display: flex; align-items: center; gap: 2px; }
.nav-link-btn { background: none; border: none; color: var(--muted); font-size: .76rem; padding: 7px 11px; cursor: pointer; text-shadow: 1px 1px 0 #000; border-radius: 4px; transition: color .15s ease, background .15s ease; }
.nav-link-btn:hover, .nav-link-btn.active { color: #fff; background: #ffffff10; }
.social-icon-btn { width: 34px; height: 34px; background: #18143a; border: 1px solid #2c2460; border-radius: 5px; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; font-size: .72rem; font-weight: 700; transition: all .15s ease; flex-shrink: 0; }
.social-icon-btn:hover { background: #241e54; color: var(--cyan); }
.menu-btn { display: none; width: 38px; height: 38px; background: #18143a; border: 1px solid #2c2460; border-radius: 5px; color: #fff; font-size: 18px; cursor: pointer; }

/* ===== Layout ===== */
.app-viewport { position: relative; z-index: 10; max-width: 1120px; width: 100%; margin: 0 auto; padding: 18px 14px 50px; }
section { scroll-margin-top: calc(var(--header-height) + 12px); }
.section-card { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 8px; box-shadow: 0 4px 18px #0006; padding: 26px 20px; margin-bottom: 22px; width: 100%; }
.eyebrow { display: inline-block; font-size: .56rem; color: var(--cyan); border: 1px solid #2c2460; background: #100d28; padding: 5px 10px; border-radius: 4px; letter-spacing: 1px; margin-bottom: 14px; }
.section-title { font-size: clamp(1.3rem, 3.6vw, 1.9rem); color: #fff; text-shadow: 2px 2px 0 #000; line-height: 1.25; margin-bottom: 8px; }
.section-sub { color: var(--muted); font-size: .9rem; max-width: 62ch; margin-bottom: 20px; }

/* ===== Hero ===== */
.home-hero-wrap { position: relative; text-align: center; padding: 1.6rem 0 1rem; border-radius: 12px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url("../img/hero.png") center/cover no-repeat; opacity: .22; z-index: 0; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0a0819cc, #0a0819ee); }
.home-hero-wrap > * { position: relative; z-index: 1; }
.hero-title-block { display: inline-block; background: #18143a; border: 2px solid #2e2664; border-radius: 6px; padding: 14px 30px; box-shadow: 0 6px 20px #0006; margin-bottom: 12px; }
.hero-title-main { font-size: clamp(1.6rem, 6vw, 2.6rem); color: #fff; text-shadow: 2px 2px 0 #000; line-height: 1.2; letter-spacing: 1px; }
.hero-title-main .hl { color: var(--accent-hi); }
.hero-sub-pill { display: inline-block; background: linear-gradient(180deg, var(--accent), var(--accent-lo)); border: 2px solid var(--accent-hi); border-radius: 5px; padding: 6px 16px; margin: 8px 0 18px; box-shadow: 0 3px 10px #7d5cff40; }
.hero-sub-text { font-size: .72rem; color: #fff; letter-spacing: 1px; text-shadow: 1px 1px 0 #000; }
.hero-desc { color: var(--muted); max-width: 560px; margin: 0 auto 22px; font-size: .95rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-visual { display: flex; justify-content: center; margin: 26px 0 6px; }
.pfp-ring { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; }
.pfp-ring::before { content: ""; position: absolute; inset: -18px; border: 2px solid #2c2460; border-radius: 50%; animation: spin 16s linear infinite; }
.pfp-ring::after { content: ""; position: absolute; inset: -36px; border: 2px solid #7d5cff33; border-radius: 50%; }
.pfp-ring img { width: 170px; height: 170px; border-radius: 50%; border: 4px solid var(--accent); background: #111; box-shadow: 0 0 40px #7d5cff55; object-fit: cover; animation: floaty 4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ===== Buttons (blocky 3D) ===== */
.btn-mc-3d { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); color: #fff; font-size: .78rem; border: 2px solid var(--accent-hi); border-bottom: 4px solid var(--accent-lo); border-radius: 5px; cursor: pointer; text-shadow: 1px 1px 0 #000; text-decoration: none; transition: all .12s ease; }
.btn-mc-3d:hover { color: var(--cyan); transform: translateY(-1px); }
.btn-mc-3d:active { transform: translateY(2px); border-bottom-width: 2px; }
.btn-mc-green-3d { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 460px; min-height: 52px; background: linear-gradient(180deg, var(--green-hi), var(--green-lo)); color: #06210f; font-weight: 700; font-size: .85rem; border: 2px solid var(--green); border-bottom: 4px solid var(--green-lo); border-radius: 5px; cursor: pointer; text-shadow: 1px 1px 0 #ffffff55; text-decoration: none; box-shadow: 0 4px 14px #1f7a4d55; transition: all .12s ease; }
.btn-mc-green-3d:hover { background: linear-gradient(180deg, #93f5b6, #258a57); transform: translateY(-1px); }
.btn-mc-green-3d:active { transform: translateY(2px); border-bottom-width: 2px; }

/* ===== Cards ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: #161234; border: 1px solid #2a2258; border-left: 4px solid var(--accent); border-radius: 7px; padding: 20px 18px; transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-3px); border-color: #4a3aa0; }
.card-icon { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; border-radius: 8px; background: #1d1742; border: 1px solid #2e2664; overflow: hidden; }
.card-icon img { width: 30px; height: 30px; object-fit: contain; }
.card-icon .emoji { font-size: 24px; line-height: 1; }
.card h3 { font-size: 1.05rem; color: #fff; text-shadow: 1px 1px 0 #000; margin-bottom: 4px; }
.price { color: var(--cyan); font-size: .8rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .82rem; line-height: 1.6; margin-bottom: 16px; min-height: 60px; }
.card .btn-mc-3d { width: 100%; }

/* ===== Featured download ===== */
.featured-release { background: #18143a; border: 1px solid #2e2664; border-radius: 8px; box-shadow: 0 6px 22px #00000080; padding: 24px 20px; margin-bottom: 22px; }
.featured-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: #100d28; border: 1px solid #282054; border-radius: 4px; font-size: .62rem; color: var(--gold); margin-bottom: 14px; }
.release-version-title { font-size: 1.25rem; color: var(--yellow); text-shadow: 1px 1px 0 #000; margin-bottom: 6px; }
.release-desc { color: var(--muted); font-size: .85rem; margin-bottom: 16px; max-width: 62ch; }
.dl-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.dl-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #0e0b24; border: 1px solid #241c52; border-radius: 5px; padding: 10px 12px; }
.dl-name { font-size: .8rem; color: #fff; }
.dl-name small { display: block; color: var(--muted); font-size: .68rem; }

/* ===== Showcase carousel ===== */
.gal-slider-viewport { position: relative; overflow: hidden; border: 2px solid #2c2460; border-radius: 8px; }
.gal-slider-track { display: flex; transition: transform .45s ease-out; }
.gal-slide { flex: 0 0 100%; min-width: 100%; }
.gal-img-container { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #09071c; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gal-slide img { width: 100%; height: 100%; object-fit: cover; }
.gal-slide .empty-art { width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--accent); box-shadow: 0 0 30px #7d5cff55; display: flex; align-items: center; justify-content: center; font-size: 44px; }
.sc-caption-bar { position: absolute; bottom: 0; left: 0; right: 0; background: #120e2ee6; padding: 10px 14px; border-top: 1px solid #282054; }
.sc-caption-name { font-size: .82rem; color: var(--yellow); text-shadow: 1px 1px 0 #000; }
.gal-nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 15; width: 36px; height: 36px; background: #18143aee; border: 1px solid #2e2664; border-radius: 5px; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s ease; }
.gal-nav-arrow:hover { background: #282054; color: var(--cyan); }
.ga-left { left: 10px; } .ga-right { right: 10px; }
.gal-dots-row { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.gal-dot { width: 8px; height: 8px; background: #2e2852; border-radius: 2px; border: none; cursor: pointer; padding: 0; transition: all .2s ease; }
.gal-dot.active { background: var(--yellow); transform: scale(1.3); }

/* ===== Team ===== */
.team-card { background: #161234; border: 1px solid #2a2258; border-left: 4px solid var(--gold); border-radius: 7px; padding: 22px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.team-avatar { width: 76px; height: 76px; background: #000; border: 2px solid #fff; border-radius: 7px; margin-bottom: 12px; overflow: hidden; }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 1rem; color: #fff; text-shadow: 1px 1px 0 #000; }
.team-role { font-size: .72rem; color: var(--cyan); margin: 4px 0 10px; }
.team-card p { font-size: .78rem; color: var(--muted); line-height: 1.55; }

/* ===== FAQ accordion ===== */
.accordion-item { background: #161234; border: 1px solid #2a2258; border-radius: 5px; margin-bottom: 8px; }
.accordion-trigger { width: 100%; padding: 14px 16px; background: none; border: none; color: #fff; font-size: .82rem; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; line-height: 1.4; text-shadow: 1px 1px 0 #000; }
.accordion-trigger:hover { color: var(--cyan); }
.accordion-trigger .chev { transition: transform .2s ease; color: var(--muted); }
.accordion-item.open .accordion-trigger .chev { transform: rotate(90deg); color: var(--cyan); }
.accordion-content { padding: 0 16px 16px; font-size: .78rem; color: var(--muted); line-height: 1.6; text-shadow: 1px 1px 0 #000; display: none; }
.accordion-item.open .accordion-content { display: block; }

.help-support { margin-top: 16px; background: #0e0b24; border: 1px solid #241c52; border-left: 4px solid var(--accent); border-radius: 6px; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.help-support strong { color: var(--yellow); font-size: .85rem; }
.help-support p { color: var(--muted); font-size: .76rem; margin-top: 3px; }

.notice-box { font-size: .8rem; color: var(--muted); line-height: 1.65; }
.notice-box p { margin-bottom: 10px; }
.notice-box a { color: var(--cyan); }

/* ===== Footer ===== */
.app-footer { text-align: center; padding: 26px 14px 12px; border-top: 1px solid #241c52; margin-top: 26px; }
.footer-logo { color: #fff; font-size: 1rem; font-weight: 700; text-shadow: 1.5px 1.5px 0 #000; margin-bottom: 6px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin: 14px 0; }
.footer-links a { color: var(--muted); font-size: .76rem; transition: color .2s ease; }
.footer-links a:hover { color: #fff; }
.footer-credits { font-size: .68rem; color: var(--muted); text-shadow: 1px 1px 0 #000; }

/* ===== Mobile bottom nav ===== */
.mobile-bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: var(--bottom-nav-height); background: #100c28; border-top: 1px solid #231c4e; box-shadow: 0 -4px 16px #0009; z-index: 250; display: none; align-items: center; padding: 0 2px; }
.nav-tab-btn { background: none; border: none; color: var(--muted); font-size: .56rem; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; padding: 6px 2px; flex: 1 1 0; min-width: 0; transition: all .15s ease; text-shadow: 1px 1px 0 #000; }
.nav-tab-btn .ic { font-size: 1.1rem; line-height: 1; }
.nav-tab-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav-tab-btn.active { color: var(--yellow); background: #ffffff0f; border-radius: 5px; }

/* ===== 404 ===== */
.err-wrap { text-align: center; padding: 3rem 1rem; }
.err-code { font-size: clamp(3rem, 14vw, 6rem); color: var(--accent-hi); text-shadow: 3px 3px 0 #000; }

/* ===== Responsive ===== */
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .header-nav { display: none; }
  .header-nav.open { display: flex; flex-direction: column; align-items: stretch; position: absolute; top: var(--header-height); left: 0; right: 0; background: #100c28f5; border-bottom: 2px solid #261f55; padding: 12px; gap: 4px; }
  .menu-btn { display: block; }
  .mobile-bottom-nav { display: flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
