/*
Theme Name: GlowCraft Theme
Theme URI: https://glowcraft.org/
Author: GlowCraft Studios
Author URI: https://glowcraft.org/
Description: A standalone custom WordPress theme for GlowCraft Studios. Built from scratch with no parent theme dependency.
Version: 2.1.3
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: glowcraft-theme
Tags: custom-background, custom-logo, custom-menu, featured-images, blog
*/

:root {
  --gc-bg: #14121b;
  --gc-bg-deep: #0f0d16;
  --gc-panel: #1d1a27;
  --gc-panel-soft: #252033;
  --gc-panel-lift: #2b2439;
  --gc-text: #fff8e8;
  --gc-muted: #d8cfe8;
  --gc-glowstone: #ffb833;
  --gc-glowstone-soft: #ffd36a;
  --gc-orange: #ff8a1d;
  --gc-orange-dark: #d96b00;
  --gc-amethyst: #9b5cff;
  --gc-amethyst-soft: #c49aff;
  --gc-border: rgba(255, 184, 51, 0.34);
  --gc-purple-border: rgba(155, 92, 255, 0.35);
  --gc-max-width: 1400px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(155, 92, 255, 0.18), transparent 34%),
    radial-gradient(circle at 80% 8%, rgba(255, 184, 51, 0.14), transparent 32%),
    linear-gradient(180deg, #17131f 0%, #11101a 45%, #15121d 100%);
  color: var(--gc-text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

a { color: var(--gc-glowstone); text-decoration: none; }
a:hover { color: var(--gc-amethyst-soft); }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid rgba(255, 248, 232, 0.55); margin: 22px 0; }

.gc-site-wrap { min-height: 100vh; display: flex; flex-direction: column; }

.gc-top-bar {
  background: rgba(10, 9, 15, 0.88);
  border-bottom: 1px solid rgba(255, 184, 51, 0.16);
  font-size: 14px;
  color: var(--gc-muted);
}

.gc-top-bar-inner,
.gc-header-inner,
.gc-main,
.gc-footer-inner {
  max-width: var(--gc-max-width);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.gc-top-bar-inner {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.gc-header {
  background:
    radial-gradient(circle at center top, rgba(255, 184, 51, 0.22), transparent 34%),
    radial-gradient(circle at center 36%, rgba(155, 92, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(23, 19, 31, 0.78), rgba(15, 13, 22, 0.94)),
    url('/img/background.png') center / cover no-repeat;
  border-bottom: 4px solid var(--gc-glowstone);
  box-shadow: 0 0 24px rgba(155, 92, 255, 0.18);
}

.gc-header-inner { padding-top: 34px; padding-bottom: 22px; text-align: center; }
.gc-custom-logo img {
  max-height: 230px;
  width: auto;
  filter: drop-shadow(0 0 18px rgba(155, 92, 255, 0.28)) drop-shadow(0 0 12px rgba(255, 184, 51, 0.18));
}
.gc-logo-text { margin: 0; font-size: clamp(34px, 5vw, 58px); letter-spacing: 1px; line-height: 1.05; }
.gc-logo-text a { color: var(--gc-text); }
.gc-logo-text span { color: var(--gc-glowstone); }
.gc-tagline { margin: 10px 0 0; color: var(--gc-muted); font-size: 17px; }

.gc-nav { background: rgba(18, 15, 26, 0.96); border-bottom: 1px solid rgba(155, 92, 255, 0.28); }
.gc-nav-inner { max-width: var(--gc-max-width); margin: 0 auto; padding: 0 20px; }
.gc-menu,
.gc-menu ul,
.gc-menu li { list-style: none; margin: 0; padding: 0; }
.gc-menu { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px; }
.gc-menu li { position: relative; }
.gc-menu a { display: block; padding: 14px 16px; color: var(--gc-text); font-weight: 800; border-radius: 0 0 8px 8px; }
.gc-menu a:hover,
.gc-menu .current-menu-item > a { background: linear-gradient(180deg, var(--gc-glowstone), var(--gc-orange)); color: #161018; box-shadow: 0 0 16px rgba(255, 184, 51, 0.25); }
.gc-menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 50; min-width: 190px; padding: 10px; background: rgba(18, 14, 28, 0.98); border: 1px solid rgba(255, 190, 67, 0.35); border-radius: 12px; box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35); }
.gc-menu li:hover > .sub-menu,
.gc-menu li:focus-within > .sub-menu { display: block; }
.gc-menu .sub-menu a { padding: 10px 12px; white-space: nowrap; border-radius: 8px; }

.gc-main { width: 100%; flex: 1; padding-top: 34px; padding-bottom: 48px; }
.gc-hero {
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 184, 51, 0.14), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(155, 92, 255, 0.26), transparent 34%),
    linear-gradient(135deg, rgba(30, 27, 42, 0.96), rgba(16, 14, 24, 0.98));
  border: 1px solid var(--gc-border);
  border-radius: 18px;
  padding: clamp(28px, 5vw, 54px);
  margin-bottom: 32px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28), 0 0 26px rgba(155, 92, 255, 0.16);
}
.gc-hero { text-align: center; }
.gc-hero h1 { margin: 0 0 12px; font-size: clamp(34px, 5vw, 56px); line-height: 1.1; color: var(--gc-text); }
.gc-hero p { max-width: 900px; margin: 0 auto; color: var(--gc-muted); font-size: 18px; }

.gc-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: start; }
.gc-content { min-width: 0; }
.gc-sidebar { display: block; min-width: 0; }

.gc-card,
.post,
.page {
  background: linear-gradient(180deg, rgba(37, 32, 51, 0.95), rgba(29, 26, 39, 0.95));
  border: 1px solid rgba(155, 92, 255, 0.22);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}
.entry-title,
.entry-title a { color: var(--gc-text); }
.entry-title { margin-top: 0; line-height: 1.2; }
.entry-meta { color: var(--gc-muted); font-size: 14px; margin-bottom: 14px; }

.gc-button,
.wp-block-button__link { display: inline-block; background: linear-gradient(180deg, var(--gc-glowstone), var(--gc-orange)); color: #161018 !important; padding: 11px 18px; border-radius: 999px; font-weight: 900; box-shadow: 0 0 18px rgba(255, 184, 51, 0.18); }
.gc-button:hover,
.wp-block-button__link:hover { background: linear-gradient(180deg, var(--gc-amethyst-soft), var(--gc-amethyst)); color: #fff !important; }

.gc-sidebar .widget,
.gc-sidebar-card { display: block; background: linear-gradient(180deg, rgba(43, 36, 57, 0.95), rgba(29, 26, 39, 0.95)); border: 1px solid var(--gc-purple-border); border-radius: 14px; padding: 20px; margin-bottom: 20px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18); }
.gc-sidebar h2,
.gc-sidebar h3 { margin-top: 0; color: var(--gc-glowstone-soft); }

.gc-sidebar .widget-title a {
  color: var(--gc-glowstone-soft);
}

.gc-sidebar .widget-title a:hover {
  color: var(--gc-amethyst-soft);
}

.gc-footer { background: rgba(10, 9, 15, 0.92); border-top: 4px solid var(--gc-glowstone); color: var(--gc-muted); }
.gc-footer-inner { padding-top: 28px; padding-bottom: 28px; text-align: center; font-size: 14px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Sidebar widgets: keep WordPress widget control, but make widgets fit GlowCraft. */
.gc-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gc-sidebar li {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 248, 232, 0.12);
}

.gc-sidebar li:last-child {
  border-bottom: 0;
}

.gc-sidebar a {
  font-weight: 800;
}

.gc-sidebar .wp-block-search__inside-wrapper,
.gc-sidebar form.search-form {
  display: flex;
  gap: 8px;
}

.gc-sidebar input[type="search"],
.gc-sidebar .search-field {
  width: 100%;
  min-width: 0;
  background: rgba(15, 13, 22, 0.9);
  border: 1px solid rgba(255, 184, 51, 0.32);
  border-radius: 10px;
  color: var(--gc-text);
  padding: 10px 12px;
}

.gc-sidebar button,
.gc-sidebar input[type="submit"],
.gc-sidebar .wp-block-search__button {
  background: linear-gradient(180deg, var(--gc-glowstone), var(--gc-orange));
  border: 0;
  border-radius: 10px;
  color: #161018;
  cursor: pointer;
  font-weight: 900;
  padding: 10px 12px;
}

/* Safety net: hide only Archives/Categories widgets or blocks if someone adds them back. */
.gc-sidebar .widget_archive,
.gc-sidebar .widget_categories,
.gc-sidebar .wp-block-archives,
.gc-sidebar .wp-block-categories {
  display: none !important;
}

@media (max-width: 980px) {
  .gc-content-grid { grid-template-columns: 1fr; }
  .gc-sidebar { display: block; }
}
@media (max-width: 820px) {
  .gc-top-bar-inner { flex-direction: column; text-align: center; }
  .gc-menu a { padding: 12px 13px; }
}

/* v1.0.7 homepage: make the front page feel like an invitation to play, not a directory of menu links. */
.gc-play-hero { text-align: center; }
.gc-kicker {
  margin: 0 0 8px !important;
  color: var(--gc-glowstone-soft) !important;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px !important;
}
.gc-hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.gc-ip-pill {
  display: inline-block;
  background: rgba(15, 13, 22, 0.9);
  border: 1px solid rgba(255, 184, 51, 0.48);
  border-radius: 999px;
  color: var(--gc-glowstone-soft);
  font-weight: 900;
  padding: 11px 18px;
  box-shadow: 0 0 18px rgba(155, 92, 255, 0.18);
}
.gc-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.gc-feature-card { min-height: 190px; }
.gc-feature-card h2 { margin-top: 0; color: var(--gc-glowstone-soft); }
.gc-feature-card p { margin-bottom: 0; color: var(--gc-text); }

/* Sidebar iframe support: keeps embeds like the Discord widget from blowing out of the sidebar. */
.gc-sidebar iframe,
.gc-sidebar embed,
.gc-sidebar object {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  border: 0;
  border-radius: 12px;
}
.gc-sidebar .widget_media_image,
.gc-sidebar .widget_custom_html,
.gc-sidebar .textwidget,
.gc-sidebar .wp-block-embed,
.gc-sidebar .wp-block-html { overflow: hidden; }
.gc-sidebar .widget-title,
.gc-sidebar h2,
.gc-sidebar h3 { overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .gc-home-grid { grid-template-columns: 1fr; }
}

/* v2.0.4 - GlowCraft themed latest news ticker */
.gc-news-ticker {
  width: 100%;
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 184, 51, 0.14), transparent 28%),
    radial-gradient(circle at 88% 50%, rgba(155, 92, 255, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(20, 17, 30, 0.98), rgba(12, 10, 18, 0.98));
  border-top: 1px solid rgba(255, 184, 51, 0.55);
  border-bottom: 1px solid rgba(255, 184, 51, 0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 22px rgba(0,0,0,0.2);
  overflow: hidden;
}
.gc-news-ticker-inner {
  max-width: var(--gc-max-width);
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 50px;
}
.gc-news-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gc-glowstone), var(--gc-orange));
  color: #161018;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(255,184,51,0.26), inset 0 1px 0 rgba(255,255,255,0.32);
}
.gc-news-label::before {
  content: "✦";
  font-size: 13px;
}
.gc-news-track-wrap {
  position: relative;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38px, #000 calc(100% - 38px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 38px, #000 calc(100% - 38px), transparent 100%);
}
.gc-news-track {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 52px;
  white-space: nowrap;
  min-width: max-content;
  animation: gc-news-scroll 34s linear infinite;
  will-change: transform;
}
.gc-news-track:hover { animation-play-state: paused; }
.gc-news-item {
  display: inline-flex;
  align-items: center;
  color: var(--gc-glowstone-soft);
  font-size: 15px;
  font-weight: 900;
  line-height: 30px;
  text-shadow: 0 0 10px rgba(255,184,51,0.12);
}
.gc-news-item::before {
  content: "◆";
  color: var(--gc-amethyst-soft);
  font-size: 12px;
  margin-right: 14px;
  text-shadow: 0 0 12px rgba(155,92,255,0.5);
}
.gc-news-item:hover { color: var(--gc-amethyst-soft); }
@keyframes gc-news-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .gc-news-track { animation: none; position: static; }
}
@media (max-width: 700px) {
  .gc-news-ticker-inner { align-items: stretch; flex-direction: column; gap: 8px; }
  .gc-news-label { align-self: flex-start; }
  .gc-news-track-wrap { width: 100%; }
}

/* Bottom edit link for admins/editors */
.gc-edit-link {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 184, 51, 0.22);
}
.gc-edit-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gc-glowstone), var(--gc-orange));
  color: #171018;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 0 14px rgba(255, 145, 28, 0.2);
}
.gc-edit-link a:hover {
  color: #171018;
  transform: translateY(-1px);
}


/* =========================
   Modular page/content helpers
========================= */

.gc-page-content {
  width: 100%;
}

.gc-page-content .entry-content > :first-child {
  margin-top: 0;
}

.gc-page-content .entry-content > :last-child {
  margin-bottom: 0;
}

.gc-clickable-card {
  cursor: pointer;
}

.gc-clickable-card:focus-visible {
  outline: 3px solid var(--gc-glowstone);
  outline-offset: 4px;
}
