/*
Theme Name: Spaceship Neon
Author: SeiGomi
Description: Mobile-first white theme with thin neon green borders, glow shadows, and left hamburger menu. Above-post widget shows only with ?from=...&home.
Version: 1.0.1
*/
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #fff;
  color: #000;
  line-height: 1.5;
}

.neon,
header,
.site-footer,
.post-card,
.widget,
.menu-panel,
.nav-brand,
.above-posts-widget,
.below-posts-widget,
.ad-slot,
.search-form input,
.search-form button {
  border: 1px solid #00ff9d;
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.35);
  background: #fff;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px;
}

/* Header Styles */
header.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
}

.hamburger {
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 8px 10px;
  border: 1px solid #00ff9d;
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 255, 157, 0.3);
  user-select: none;
}

.nav-brand {
  padding: 8px 10px;
  margin-left: auto;
}

/* Mobile Menu Panel */
.menu-panel {
  z-index: 1000;
  position: fixed;
  inset: 0 auto 0 0;
  width: 100%;
  max-width: none;
  height: 100%;
  transform: translateX(-105%);
  transition: transform 0.28s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.menu-open .menu-panel {
  transform: translateX(0);
}

.menu-header {
  padding: 12px;
  border-bottom: 1px solid #00ff9d;
  position: relative;
  min-height: 48px;
}

.menu-content {
  padding: 12px;
  overflow-y: auto;
  flex-grow: 1;
  align-self: center;
}

.menu-close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #000000;
  z-index: 1;
}

.menu-panel .menu {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
}

.menu-panel .menu li {
  margin: 0 0 8px 0;
}

.menu-panel .menu a {
  display: block;
  text-decoration: none;
  color: #000;
  padding: 10px 12px;
  border: 1px solid #00ff9d;
  box-shadow: 0 0 6px rgba(0, 255, 157, 0.25);
}

/* Widget Areas */
.above-posts-widget,
.below-posts-widget {
  margin: 24px 0;
  padding: 12px;
}

.above-posts-widget .widget,
.below-posts-widget .widget {
  margin-bottom: 10px;
  padding: 10px;
}

.above-posts-widget a,
.above-posts-widget button,
.below-posts-widget a,
.below-posts-widget button {
  display: inline-block;
  padding: 10px 14px;
  text-decoration: none;
  color: #000;
  border: 1px solid #00ff9d;
  box-shadow: 0 0 6px rgba(0, 255, 157, 0.25);
  background: #fff;
}

/* Post Grid */
.posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.post-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding: 10px;
  align-items: center;
  min-height: 84px;
}

.post-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
}

.post-meta {
  overflow: hidden;
}

.post-title {
  font-size: 16px;
  margin: 0 0 4px 0;
  line-height: 1.25;
}

.post-excerpt {
  font-size: 13px;
  color: #222;
  margin: 0;
  max-height: 2.6em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer */
.site-footer {
  margin-top: 20px;
  padding: 16px;
  text-align: center;
  font-size: 14px;
}

/* Search Form */
.search-form {
  display: flex;
  gap: 8px;
  margin: 8px 0 0 0;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #00ff9d;
  background: #fff;
}

.search-form button {
  padding: 8px 12px;
  border: 1px solid #00ff9d;
  background: #fff;
}

/* Ad Slots */
.ad-slot {
  margin: 16px 0;
  padding: 10px;
}

.ad-safe-gap {
  margin-top: 18px;
}

/* CSS Variables */
:root {
  --neon-color: #00ff9d;
  --neon-shadow: 0 0 10px rgba(0, 255, 157, 0.35);
}

/* Desktop Styles */
@media (min-width: 540px) {
  .post-title {
    font-size: 18px;
  }
  
  .post-card {
    grid-template-columns: 96px 1fr;
    min-height: 100px;
  }
  
  .post-thumb img {
    width: 96px;
    height: 96px;
  }
}

@media (min-width: 768px) {
  .posts {
    grid-template-columns: 1fr 1fr;
  }
}

/* [Previous CSS rules remain the same until desktop breakpoint] */

@media (min-width: 1024px) {
  /* Desktop Menu Layout */
  .hamburger {
    display: none;
  }
  
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 20px;
  }
  
  .nav-brand {
    margin: 0 auto;
    justify-self: start;
  }
  
  .menu-panel {
    position: static;
    width: auto;
    height: auto;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    grid-column: 2;
    padding: 12px;
  }
  
  .menu-header {
    display: none;
  }
  
  .menu-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 0;
    overflow: visible;
  }
  
  /* Menu Items */
  .menu-panel .menu {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
  }
  
  .menu-panel .menu li {
    margin: 0;
  }
  
  .menu-panel .menu a {
    padding: 8px 16px;
    white-space: nowrap;
  }
  
  /* Search Form Positioning */
  .search-form {
    margin: 0;
    min-width: 200px;
    max-width: 300px;
    justify-self: end;
  }
  
  /* Responsive adjustments */
  @media (min-width: 1200px) {
    .menu-panel .menu {
      gap: 12px;
    }
  }
  
  @media (max-width: 1100px) {
    .menu-panel .menu a {
      padding: 8px 12px;
      font-size: 14px;
    }
    
    .search-form {
      min-width: 180px;
    }
  }
}

.nav-brand a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  padding: 6px 12px;
  border-radius: 4px;
}

.nav-brand a:hover {
  color: var(--neon-color);
  text-shadow: 0 0 8px rgba(0, 255, 157, 0.4);
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.3);
}

.post-title a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  display: inline-block;
}

.post-title a:hover {
  color: var(--neon-color);
  text-shadow: 0 0 6px rgba(0, 255, 157, 0.3);
}

/* Optional: Add underline effect on hover */
.post-title a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--neon-color);
  transition: width 0.3s ease;
}

.post-title a:hover::after {
  width: 100%;
}

/* For desktop view specifically */
@media (min-width: 1024px) {
  .nav-brand a {
    font-size: 1.4rem;
    padding: 8px 16px;
  }
  
  .post-title a {
    font-size: 1.1em;
  }
}
/* Menu Links - Mobile & Desktop */
.menu-panel .menu a {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 4px;
  padding: 10px 16px;
}

.menu-panel .menu a:hover {
  color: var(--neon-color);
  background-color: rgba(0, 255, 157, 0.08);
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.4);
  transform: translateY(-1px);
}

/* Desktop Menu Specific */
@media (min-width: 1024px) {
  .nav-brand a {
    font-size: 1.4rem;
    padding: 8px 16px;
  }

  .menu-panel .menu a {
    padding: 8px 18px;
    margin: 0 2px;
  }

  .menu-panel .menu a:hover {
    background-color: transparent;
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.4);
  }

  .post-title a {
    font-size: 1.1em;
  }
}

/* Active Menu Item */
.current-menu-item > a,
.current_page_item > a {
  color: var(--neon-color) !important;
  font-weight: 600 !important;
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.5) !important;
}
/* ====================== */
/* Nav Link Styling       */
/* ====================== */
/* ====================== */
/* Nav Links Super Styling */
/* ====================== */
.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: 30px;
  transition: all 0.3s ease;
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  display: inline-block;
}

/* Neon Hover Effect */
.nav-links a:hover {
  color: #000;
  background: rgba(0, 255, 157, 0.1);
  border: 1px solid var(--neon-color);
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
  transform: translateY(-2px);
}

/* Active State Glow */
.nav-links a.current-menu-item,
.nav-links a.current_page_item {
  color: #000;
  background: rgba(0, 255, 157, 0.15);
  border: 1px solid var(--neon-color);
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
  font-weight: 600;
}

/* Mobile Menu Styling */
.menu-panel .nav-links {
  flex-direction: column;
  gap: 4px;
}

.menu-panel .nav-links a {
  width: 100%;
  border-radius: 6px;
  padding: 12px 20px;
  margin: 2px 0;
}

/* Desktop Enhancements */
@media (min-width: 1024px) {
  .nav-links {
    gap: 12px;
  }
  
  .nav-links a {
    padding: 10px 24px;
    font-size: 1.05rem;
  }
  
  .nav-links a:hover {
    background: rgba(0, 255, 157, 0.15);
  }
}

/* Pulsing Animation for Active Item */
@keyframes neon-pulse {
  0% { box-shadow: 0 0 10px rgba(0, 255, 157, 0.4); }
  50% { box-shadow: 0 0 20px rgba(0, 255, 157, 0.6); }
  100% { box-shadow: 0 0 10px rgba(0, 255, 157, 0.4); }
}

.nav-links a.current-menu-item,
.nav-links a.current_page_item {
  animation: neon-pulse 2s infinite;
}