/*
Theme Name: Casino Affiliate Template
Theme URI: https://example.com/
Author: Your Name
Author URI: https://example.com/
Description: Affiliate-style WordPress theme with author pages and built-in schema markup.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: casino-affiliate
*/

:root {
  --bg: #0f1116;
  --panel: #171a22;
  --text: #e8edf5;
  --muted: #a8b0c0;
  --accent: #5dd6ff;
  --accent-2: #63ffbe;
  --border: #2a3040;
  --max: 1160px;
  --reading-max: 760px;
}

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

.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;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(circle at top right, #1b2030 0%, #0f1116 45%);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-2);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #ffd447;
  outline-offset: 2px;
}

.site-wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-wrap--header {
  width: calc(100% - 1rem);
  max-width: none;
  padding-inline: 0.25rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  background: rgba(15, 17, 22, 0.92);
}

.site-header.is-sticky {
  position: sticky;
  top: 0;
  z-index: 99;
}

.site-header.is-not-sticky {
  position: relative;
  top: auto;
  z-index: 10;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  color: #fff;
  letter-spacing: 0.2px;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
}

.brand__media {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #1d2740;
  overflow: hidden;
  flex-shrink: 0;
}

.brand__logo-link {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.brand__logo-img {
  width: 42px;
  height: 42px;
  object-fit: cover;
}

.brand__fallback-icon {
  color: #8fb7ff;
  font-size: 1.1rem;
  line-height: 1;
}

.brand__text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__title {
  font-weight: 800;
  color: #f3f6ff;
  font-size: 1.05rem;
}

.brand__title-link {
  color: inherit;
}

.brand__subtitle {
  color: #b7c2dc;
  font-size: 0.84rem;
  margin-top: 0.15rem;
}

.nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #1a1f2c;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle__line {
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.2;
}

.hero p {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
}

.content-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 3rem;
}

.card {
  background: linear-gradient(180deg, #1a1e29 0%, #151925 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.entry-byline {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.7rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.4rem 0;
}

.entry-byline img {
  border-radius: 50%;
}

.entry-byline__avatar-link {
  display: inline-flex;
  border-radius: 50%;
}

.entry-byline__name,
.entry-byline__meta {
  margin: 0;
}

.entry-byline__name {
  font-weight: 700;
}

.entry-byline__meta {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.update-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #244f2f;
  background: #163323;
  color: #d9f8e3;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.update-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27d657;
  box-shadow: 0 0 0 4px rgba(39, 214, 87, 0.16);
}

.update-pill__dot.is-live {
  animation: live-dot-pulse 1.6s ease-out infinite;
}

@keyframes live-dot-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(39, 214, 87, 0.55);
  }
  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 9px rgba(39, 214, 87, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(39, 214, 87, 0);
  }
}

.page-intro {
  max-width: var(--reading-max);
  margin: 1rem auto 1.2rem;
  padding: 0;
  text-align: center;
}

.page-intro p {
  margin: 0;
  color: #dce2ef;
}

.page-intro > *:first-child {
  margin-top: 0;
}

.page-intro > *:last-child {
  margin-bottom: 0;
}

.page-main-content {
  margin-top: 0.4rem;
}

/* Center top section on desktop: H1 + author + intro */
.page-entry h1 {
  max-width: var(--reading-max);
  margin: 0.35rem auto 0.7rem;
  text-align: center;
}

.page-entry .entry-byline {
  max-width: var(--reading-max);
  margin-left: auto;
  margin-right: auto;
}

/* Keep article body comfortably readable while wider than intro */
.page-entry .page-main-content {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.page-intro__preview {
  margin-bottom: 0.7rem;
}

.page-intro__toggle {
  border: 0;
  background: transparent;
  color: #e9eef9;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.page-intro__toggle:hover {
  color: var(--accent-2);
}

.btn {
  display: inline-block;
  padding: 0.6rem 0.95rem;
  border-radius: 10px;
  background: var(--accent);
  color: #071018;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--muted);
}

.footer-payments {
  margin-bottom: 1.25rem;
}

.footer-payments__title {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d7def2;
}

.footer-payments__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-payments__list li {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #202636;
  color: #d7def2;
  padding: 0.35rem 0.55rem;
  font-size: 0.86rem;
}

.footer-rg {
  margin-bottom: 1.25rem;
  border: 1px solid #3a4667;
  border-radius: 12px;
  background: #1a233a;
  padding: 0.95rem 1rem;
}

.footer-rg h2 {
  margin: 0 0 0.35rem;
  color: #ffd447;
  font-size: 1rem;
}

.footer-rg p {
  margin: 0;
  color: #d8deed;
}

.footer-widgets {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.footer-widget {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 1rem;
}

.footer-widget h2,
.footer-widget h3 {
  margin-top: 0;
  font-size: 1rem;
}

.footer-meta {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.author-box {
  display: grid;
  gap: 1rem;
  grid-template-columns: 80px 1fr;
  align-items: center;
}

.author-avatar img {
  border-radius: 50%;
}

.casino-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 10px;
}

.casino-table th,
.casino-table td {
  border: 1px solid var(--border);
  padding: 0.7rem;
  text-align: left;
}

.casino-table th {
  background: #202637;
}

/* Table of Contents (popular TOC plugins) */
.ez-toc-container,
#ez-toc-container,
.toc-container,
#toc_container,
.wp-block-table-of-contents {
  background: linear-gradient(180deg, #1a1e29 0%, #151925 100%) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  color: var(--text) !important;
  box-shadow: none !important;
  padding: 0.9rem 1rem !important;
  margin: 1rem 0 1.1rem !important;
}

.ez-toc-title-container,
#toc_container .toc_title,
.wp-block-table-of-contents > h2 {
  color: #dce5fb !important;
  font-weight: 700 !important;
  margin: 0 0 0.55rem !important;
}

.ez-toc-toggle a,
.ez-toc-btn,
.toc_toggle a {
  color: #bdd8ff !important;
}

.ez-toc-container a,
#toc_container a,
.wp-block-table-of-contents a {
  color: var(--accent) !important;
  opacity: 1 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

.ez-toc-container a:hover,
#toc_container a:hover,
.wp-block-table-of-contents a:hover {
  color: var(--accent-2) !important;
}

.ez-toc-container,
#toc_container,
.wp-block-table-of-contents,
.ez-toc-container *,
#toc_container *,
.wp-block-table-of-contents * {
  opacity: 1 !important;
}

.ez-toc-list,
#toc_container ul,
.wp-block-table-of-contents ol,
.wp-block-table-of-contents ul {
  margin: 0 !important;
  padding-left: 1.1rem !important;
}

.ez-toc-list li,
#toc_container li,
.wp-block-table-of-contents li {
  margin: 0.28rem 0 !important;
  line-height: 1.45 !important;
  color: #d7e0f6 !important;
}

.ez-toc-list li::marker,
#toc_container li::marker,
.wp-block-table-of-contents li::marker {
  color: #9eb8ea !important;
  font-weight: 700;
}

.ez-toc-container,
#toc_container {
  max-width: 760px;
}

@media (max-width: 760px) {
  .site-wrap--header {
    width: calc(100% - 0.6rem);
    padding-inline: 0.1rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .brand {
    gap: 0.5rem;
    padding-left: 0.2rem;
  }

  .brand__title {
    font-size: 0.98rem;
  }

  .brand__subtitle {
    display: block;
    font-size: 0.78rem;
    margin-top: 0.08rem;
  }

  .page-entry {
    margin-top: 1rem !important;
    padding: 1rem;
  }

  .page-entry h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
    line-height: 1.15;
    text-align: center;
    margin-top: 0.2rem;
    margin-bottom: 0.45rem;
  }

  .entry-byline {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.35rem;
    padding: 0.25rem 0.2rem;
    margin-bottom: 0.45rem;
  }

  .entry-byline__meta {
    justify-content: center;
    margin-top: 0;
  }

  .page-intro {
    margin-top: 0.2rem;
    padding: 0.8rem;
  }

  .page-intro__preview {
    margin-bottom: 0.45rem;
  }

  .header-inner {
    position: relative;
  }

  .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(300px, 92vw);
    background: #171b27;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem;
    display: none;
    z-index: 120;
  }

  .nav.is-open {
    display: block;
  }

  .nav ul {
    display: grid;
    gap: 0.45rem;
    font-size: 0.95rem;
  }

  .nav li a {
    display: block;
    padding: 0.45rem 0.2rem;
  }

  .footer-widgets {
    grid-template-columns: 1fr;
  }

  .ez-toc-container,
  #toc_container,
  .wp-block-table-of-contents {
    padding: 0.75rem 0.8rem !important;
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
