/*
Theme Name: LotteryX Base Theme
Theme URI: https://example.com/
Author: OneCustom
Author URI: https://example.com/
Description: A clean, general-purpose WordPress theme for lottery / game / app login & guide sites.
Version: 1.1
Text Domain: lotteryx-base
*/

:root {
  --lx-bg: #f7f7fb;
  --lx-bg-alt: #ffffff;
  --lx-primary: #2b7cff;
  --lx-primary-soft: rgba(43, 124, 255, 0.12);
  --lx-text: #222222;
  --lx-text-soft: #555555;
  --lx-border: #e2e2ee;
  --lx-radius: 10px;
  --lx-max-width: 1100px;
  --lx-shadow-soft: 0 2px 10px rgba(0,0,0,0.04);
  --lx-header-height: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background: var(--lx-bg);
  color: var(--lx-text);
}

/* ====== Layout Shell ====== */

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

.site-main {
  flex: 1;
}

/* ====== Header ====== */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--lx-border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  position: sticky;
  top: 0;
  z-index: 999;
}

.lx-header-inner {
  max-width: var(--lx-max-width);
  margin: 0 auto;
  padding: 0 18px;
  height: var(--lx-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.site-title a {
  color: var(--lx-text);
  text-decoration: none;
}

.site-description {
  margin: 0;
  font-size: 12px;
  color: var(--lx-text-soft);
}

/* ====== Navigation (desktop base) ====== */

.main-navigation {
  position: relative;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 14px;
  align-items: center;
}

.main-navigation a {
  text-decoration: none;
  font-size: 14px;
  color: var(--lx-text-soft);
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  background: var(--lx-primary-soft);
  color: var(--lx-primary);
}

/* Mobile hamburger (hidden by default, show in small screen) */
.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--lx-text);
  border-radius: 999px;
  margin: 3px 0;
}

/* 抽屉容器默认在 PC 端当普通导航用 */
.lx-mobile-menu-panel {
  display: block;
}

.lx-mobile-menu-header {
  display: none;
}

/* ====== Content Wrapper ====== */

.lx-container {
  max-width: var(--lx-max-width);
  margin: 26px auto;
  padding: 0 18px 40px;
}

.lx-card {
  background: var(--lx-bg-alt);
  border-radius: var(--lx-radius);
  box-shadow: var(--lx-shadow-soft);
  padding: 26px 26px 30px;
}

/* ====== Page / Single ====== */

.entry-header {
  margin-bottom: 18px;
}

.entry-title {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.3;
}

.entry-meta {
  font-size: 13px;
  color: var(--lx-text-soft);
}

.entry-content {
  font-size: 16px;
  color: var(--lx-text);
}

.entry-content h2,
.entry-content h3 {
  margin-top: 24px;
  margin-bottom: 10px;
}

.entry-content p {
  margin: 0 0 14px;
}

.entry-content ul,
.entry-content ol {
  padding-left: 24px;
  margin-top: 0;
  margin-bottom: 16px;
}

/* Featured image */
.entry-thumbnail {
  margin-bottom: 20px;
}
.entry-thumbnail img {
  max-width: 100%;
  border-radius: 8px;
}

/* ====== Index / Archive ====== */

.lx-archive-title {
  font-size: 24px;
  margin-bottom: 14px;
}

.lx-archive-intro {
  font-size: 14px;
  color: var(--lx-text-soft);
  margin-bottom: 24px;
}

.lx-post-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lx-post-item {
  background: #ffffff;
  border-radius: var(--lx-radius);
  border: 1px solid var(--lx-border);
  padding: 16px 18px;
}

.lx-post-item-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.lx-post-item-title a {
  color: var(--lx-text);
  text-decoration: none;
}

.lx-post-item-title a:hover {
  color: var(--lx-primary);
}

.lx-post-item-meta {
  font-size: 12px;
  color: var(--lx-text-soft);
  margin-bottom: 8px;
}

.lx-post-item-excerpt {
  font-size: 14px;
  color: var(--lx-text-soft);
}

.lx-read-more {
  margin-top: 10px;
  font-size: 14px;
}

.lx-read-more a {
  color: var(--lx-primary);
  text-decoration: none;
}

.lx-read-more a:hover {
  text-decoration: underline;
}

/* Pagination */
.navigation.pagination {
  margin-top: 18px;
  font-size: 14px;
}

/* ====== Footer ====== */

.site-footer {
  border-top: 1px solid var(--lx-border);
  background: #ffffff;
  margin-top: 30px;
}

.lx-footer-inner {
  max-width: var(--lx-max-width);
  margin: 0 auto;
  padding: 20px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lx-footer-meta {
  font-size: 13px;
  color: var(--lx-text-soft);
}

.lx-footer-menu {
  font-size: 13px;
}

.lx-footer-menu a {
  color: var(--lx-text-soft);
  text-decoration: none;
  margin-left: 10px;
}

.lx-footer-menu a:hover {
  color: var(--lx-primary);
}

/* ====== 404 ====== */

.lx-404 {
  text-align: center;
}

.lx-404 h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.lx-404 p {
  margin-bottom: 18px;
}

/* ===== 底部悬浮 Login / Register go 广告条 ===== */
.lx-bottom-floating-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 1001;
  pointer-events: none; /* 只让按钮本身可点 */
}

.lx-bottom-floating-inner {
  max-width: var(--lx-max-width);
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lx-bottom-cta-btn {
  pointer-events: auto;
  display: inline-block;
  background: #ff3333;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  padding: 7px 26px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  font-weight: 500;
  white-space: nowrap;
}

/* ====== Responsive ====== */

@media (max-width: 768px) {

  /* 显示汉堡按钮 */
  .menu-toggle {
    display: inline-block;
  }

  /* 抽屉面板（全屏覆盖） */
  .lx-mobile-menu-panel {
    display: none;
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.15);
  }

  /* 打开时显示 */
  .main-navigation.toggled .lx-mobile-menu-panel {
    display: block;
  }

  /* 顶部标题 + 关闭按钮 */
  .lx-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--lx-border);
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
  }

  .lx-mobile-menu-title {
    font-size: 20px;
    font-weight: 600;
  }

  .lx-mobile-menu-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--lx-border);
    background: #ffffff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 抽屉里的菜单列表：竖排 */
  .main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 12px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .main-navigation a {
    display: block;
    width: 100%;
    padding: 8px 0;
    border-radius: 0;
    font-size: 15px;
  }

  .main-navigation .current-menu-item > a,
  .main-navigation .current_page_item > a {
    background: #f3f6ff;
    color: var(--lx-primary);
  }

  /* 底部浮条收窄一点 */
  .lx-bottom-floating-cta {
    bottom: 10px;
  }
  .lx-bottom-cta-btn {
    font-size: 14px;
    padding: 6px 18px;
  }
}

/* PC 端：抽屉容器作为普通导航使用，隐藏顶标题行 */
@media (min-width: 769px) {
  .lx-mobile-menu-panel {
    display: block;
    position: static;
    box-shadow: none;
    overflow: visible;
  }
  .lx-mobile-menu-header {
    display: none;
  }
}
