/* ═══════════════════════════════════════════════════
   AuGamer – Base CSS v2 (Enhanced for 2025)
═══════════════════════════════════════════════════ */
:root {
  --nav-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,.15);
  --transition: .22s ease;
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; line-height: 1.7; }
a { color: var(--link-color); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--link-hover); }
img { max-width: 100%; }

/* ── Announcement bar ── */
.ag-announce-bar {
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  padding: .38rem 1rem;
  letter-spacing: .3px;
  position: relative;
  overflow: hidden;
}
.ag-announce-bar a { color: #fff; text-decoration: underline; }
.ag-announce-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,.8);
  font-size: 1rem; cursor: pointer; padding: 0 4px; line-height: 1;
}
.ag-announce-close:hover { color: #fff; }

/* ── Navbar ── */
.ag-navbar { background: var(--nav-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color); height: var(--nav-h); padding: 0 0; }
.ag-brand { font-size: 1.4rem; font-weight: 800; color: var(--brand-color) !important; letter-spacing: -.5px; }
.ag-logo-icon { font-size: 1.3rem; }
.ag-navbar .nav-link { color: var(--nav-link) !important; font-weight: 500; padding: .4rem .8rem !important; border-radius: var(--radius-sm); transition: background var(--transition), color var(--transition); }
.ag-navbar .nav-link:hover, .ag-navbar .nav-link.active { background: var(--nav-hover-bg); color: var(--nav-hover-color) !important; }
.ag-toggler { border-color: var(--border-color); }
.ag-btn-theme { background: var(--btn-theme-bg); color: var(--text-color); border: 1px solid var(--border-color); }
.ag-btn-login { background: var(--accent); color: #fff; border: none; }
.ag-theme-menu { background: var(--card-bg); border: 1px solid var(--border-color); min-width: 180px; }
.ag-theme-menu .dropdown-item { color: var(--text-color); padding: .5rem 1rem; }
.ag-theme-menu .dropdown-item:hover { background: var(--hover-bg); }

/* Search bar in navbar */
.ag-nav-search { position: relative; }
.ag-nav-search-input {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 50px;
  padding: .35rem 2.2rem .35rem .9rem;
  font-size: .85rem;
  width: 180px;
  transition: width var(--transition), border-color var(--transition);
}
.ag-nav-search-input:focus { width: 240px; border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.ag-nav-search-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted-text); cursor: pointer; font-size: .85rem; padding: 0; }
.ag-nav-search-btn:hover { color: var(--accent); }

/* ── Breadcrumb bar ── */
.ag-breadcrumb-bar { background: var(--breadcrumb-bg); padding: .5rem 0; border-bottom: 1px solid var(--border-color); }
.breadcrumb { font-size: .85rem; margin: 0; }
.breadcrumb-item a { color: var(--link-color); }
.breadcrumb-item.active { color: var(--muted-text); }

/* ── Hero ── */
.ag-hero { background: var(--hero-bg); padding: 5rem 0 4rem; position: relative; overflow: hidden; }
.ag-hero::before { content: ''; position: absolute; inset: 0; background: var(--hero-overlay); }
.ag-hero > .container { position: relative; z-index: 1; }
.ag-hero-badge { display: inline-block; background: var(--accent); color: #fff; padding: .3rem .9rem; border-radius: 50px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; }
.ag-hero-title { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 900; color: var(--hero-title); line-height: 1.15; margin-bottom: 1.2rem; }
.ag-highlight { color: var(--accent); }
.ag-hero-sub { font-size: 1.1rem; color: var(--hero-sub); max-width: 560px; margin-bottom: 2rem; }
.ag-hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.ag-hero-stats { display: flex; gap: 2.5rem; }
.ag-stat { display: flex; flex-direction: column; }
.ag-stat strong { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.ag-stat span { font-size: .8rem; color: var(--hero-sub); text-transform: uppercase; letter-spacing: 1px; }

/* Hero search */
.ag-hero-search {
  display: flex; gap: 0; max-width: 480px; margin-bottom: 2rem;
  background: rgba(255,255,255,.15); border-radius: 50px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(8px);
}
.ag-hero-search-input {
  flex: 1; background: transparent; border: none; color: #fff;
  padding: .75rem 1.2rem; font-size: .95rem; outline: none;
}
.ag-hero-search-input::placeholder { color: rgba(255,255,255,.65); }
.ag-hero-search-btn {
  background: var(--accent); border: none; color: #fff;
  padding: .75rem 1.5rem; font-weight: 700; cursor: pointer;
  border-radius: 0 50px 50px 0; transition: background var(--transition);
}
.ag-hero-search-btn:hover { background: var(--accent-hover); }

.ag-hero-visual { display: flex; justify-content: center; align-items: center; }
.ag-game-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.ag-game-cell {
  width: 70px; height: 70px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  transition: transform var(--transition), background var(--transition);
  backdrop-filter: blur(4px);
}
.ag-game-cell:hover { transform: scale(1.12); background: rgba(255,255,255,.18); }

/* ── Ticker / news bar ── */
.ag-ticker-bar {
  background: var(--section-alt-bg);
  border-bottom: 1px solid var(--border-color);
  padding: .45rem 0;
  overflow: hidden;
}
.ag-ticker-inner { display: flex; align-items: center; gap: 1rem; }
.ag-ticker-label {
  background: var(--accent); color: #fff;
  padding: .15rem .65rem; border-radius: 4px;
  font-size: .78rem; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
  text-transform: uppercase; letter-spacing: .5px;
}
.ag-ticker-track {
  overflow: hidden; flex: 1; position: relative;
}
.ag-ticker-scroll {
  display: flex; gap: 3rem; white-space: nowrap;
  animation: tickerScroll 32s linear infinite;
  will-change: transform;
}
.ag-ticker-scroll:hover { animation-play-state: paused; }
.ag-ticker-item { font-size: .85rem; color: var(--text-color); font-weight: 500; }
.ag-ticker-item a { color: var(--link-color); font-weight: 600; }
.ag-ticker-item a:hover { color: var(--accent); }
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Buttons ── */
.ag-btn-primary { background: var(--accent); color: #fff; padding: .7rem 1.6rem; border-radius: 50px; font-weight: 700; border: 2px solid var(--accent); display: inline-block; transition: all var(--transition); }
.ag-btn-primary:hover { background: var(--accent-hover); color: #fff; border-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.ag-btn-outline { background: transparent; color: #fff; padding: .7rem 1.6rem; border-radius: 50px; font-weight: 700; border: 2px solid rgba(255,255,255,.8); display: inline-block; transition: all var(--transition); }
.ag-btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; transform: translateY(-2px); }
.ag-btn-outline-sm { background: transparent; color: var(--accent); padding: .4rem 1rem; border-radius: 50px; font-weight: 600; border: 2px solid var(--accent); font-size: .9rem; display: inline-block; transition: all var(--transition); }
.ag-btn-outline-sm:hover { background: var(--accent); color: #fff; }
.ag-btn-lg { padding: .9rem 2.2rem; font-size: 1.1rem; }
.ag-btn-search { background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); padding: .5rem 1rem; }
.ag-btn-clear { background: transparent; color: var(--muted-text); border: 1px solid var(--border-color); border-radius: var(--radius-sm); }
.ag-btn-twitter { background: #1DA1F2; color: #fff; border: none; }
.ag-btn-reddit  { background: #FF4500; color: #fff; border: none; }
.ag-btn-copy    { background: var(--card-bg); color: var(--text-color); border: 1px solid var(--border-color); }
.ag-btn-discord { background: #5865F2; color: #fff; border: none; border-radius: 50px; padding: .7rem 1.6rem; font-weight: 700; display: inline-flex; align-items: center; gap: .5rem; transition: all var(--transition); }
.ag-btn-discord:hover { background: #4752c4; color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(88,101,242,.35); }

/* ── Quick games bar ── */
.ag-quick-games { background: var(--section-alt-bg); border-bottom: 1px solid var(--border-color); padding: .75rem 0; }
.ag-game-pill { background: var(--pill-bg); color: var(--text-color); padding: .4rem 1rem; border-radius: 50px; font-size: .85rem; font-weight: 600; border: 1px solid var(--border-color); transition: all var(--transition); white-space: nowrap; }
.ag-game-pill:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); }

/* ── Sections ── */
.ag-section { background: var(--section-bg); }
.ag-section-title { font-size: 1.6rem; font-weight: 800; color: var(--heading-color); margin-bottom: .3rem; }
.ag-section-sub { font-size: .95rem; }
.ag-features-section { background: var(--section-alt-bg); }
.ag-cta { background: var(--cta-bg); text-align: center; }
.ag-cta h2, .ag-cta .lead { color: var(--cta-text); }

/* ── Cards ── */
.ag-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow var(--transition), transform var(--transition); overflow: hidden; display: flex; flex-direction: column; }
.ag-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.ag-card-body { padding: 1.4rem 1.4rem 1rem; flex: 1; }
.ag-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.4; }
.ag-card-title a { color: var(--heading-color); }
.ag-card-title a:hover { color: var(--accent); }
.ag-card-desc { font-size: .88rem; color: var(--muted-text); margin: 0; }
.ag-card-footer { padding: .8rem 1.4rem; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .4rem; }
.ag-author { font-size: .82rem; color: var(--link-color); font-weight: 600; }
.ag-author:hover { color: var(--accent); }
.ag-date { font-size: .78rem; color: var(--muted-text); }

/* Card gradient banner */
.ag-card-banner {
  height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

/* Feature cards */
.ag-feature-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 2rem; height: 100%; transition: all var(--transition); }
.ag-feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.ag-feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.ag-feature-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--heading-color); margin-bottom: .7rem; }
.ag-feature-card p { color: var(--muted-text); font-size: .93rem; }
.ag-link-arrow { color: var(--accent); font-weight: 600; font-size: .9rem; }
.ag-link-arrow:hover { color: var(--accent-hover); }

/* ── Server Status Cards ── */
.ag-server-section { background: var(--section-bg); }
.ag-server-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  display: flex; align-items: center; gap: 1rem;
  transition: all var(--transition);
}
.ag-server-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.ag-server-icon { font-size: 1.8rem; flex-shrink: 0; }
.ag-server-info { flex: 1; min-width: 0; }
.ag-server-name { font-weight: 700; color: var(--heading-color); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-server-region { font-size: .78rem; color: var(--muted-text); }
.ag-server-ping { font-size: .9rem; font-weight: 700; }
.ag-server-status { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; }
.ag-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.ag-dot-green { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.5); animation: pulseDot 2s infinite; }
.ag-dot-yellow { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,.5); }
.ag-dot-red { background: #ef4444; }
@keyframes pulseDot { 0%,100% { opacity:1; } 50% { opacity:.5; } }

/* ── Events Section ── */
.ag-events-section { background: var(--section-alt-bg); }
.ag-event-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ag-event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.ag-event-date-badge {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: .8rem;
  min-width: 64px;
  flex-shrink: 0;
}
.ag-event-date-badge .day { font-size: 1.6rem; font-weight: 900; line-height: 1; }
.ag-event-date-badge .month { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.ag-event-header { display: flex; gap: 1rem; padding: 1rem 1rem .6rem; border-bottom: 1px solid var(--border-color); }
.ag-event-title { font-weight: 700; color: var(--heading-color); font-size: .98rem; margin-bottom: .25rem; line-height: 1.3; }
.ag-event-game { font-size: .8rem; color: var(--accent); font-weight: 600; }
.ag-event-body { padding: .8rem 1rem 1rem; flex: 1; }
.ag-event-detail { font-size: .82rem; color: var(--muted-text); display: flex; align-items: center; gap: .35rem; margin-bottom: .3rem; }
.ag-event-prize { font-size: .85rem; font-weight: 700; color: #d97706; }
.ag-event-type-badge { font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 50px; }
.ag-badge-online { background: #dbeafe; color: #1d4ed8; }
.ag-badge-lan { background: #fef3c7; color: #92400e; }
.ag-badge-free { background: #dcfce7; color: #166534; }

/* ── Trending / Hot Topics ── */
.ag-trending-section { background: var(--section-bg); }
.ag-trending-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 1rem;
  transition: all var(--transition);
}
.ag-trending-card:hover { box-shadow: var(--shadow-hover); transform: translateX(4px); }
.ag-trending-rank {
  font-size: 1.3rem; font-weight: 900;
  color: var(--accent); min-width: 32px;
  text-align: center;
}
.ag-trending-rank.hot { color: #ef4444; }
.ag-trending-info { flex: 1; min-width: 0; }
.ag-trending-title { font-weight: 700; color: var(--heading-color); font-size: .95rem; display: block; margin-bottom: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-trending-title:hover { color: var(--accent); }
.ag-trending-meta { font-size: .78rem; color: var(--muted-text); }
.ag-trending-views { font-size: .82rem; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* ── Indie Aussie Games showcase ── */
.ag-indie-section { background: var(--section-alt-bg); }
.ag-indie-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  height: 100%;
}
.ag-indie-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.ag-indie-banner {
  height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  border-radius: var(--radius) var(--radius) 0 0;
}
.ag-indie-body { padding: 1.1rem 1.2rem 1.3rem; }
.ag-indie-title { font-weight: 800; color: var(--heading-color); font-size: 1rem; margin-bottom: .3rem; }
.ag-indie-dev { font-size: .78rem; color: var(--accent); font-weight: 600; margin-bottom: .5rem; }
.ag-indie-desc { font-size: .85rem; color: var(--muted-text); margin-bottom: .7rem; line-height: 1.5; }
.ag-indie-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.ag-indie-tag { font-size: .7rem; padding: .15rem .5rem; border-radius: 50px; background: var(--tag-bg); color: var(--tag-color); border: 1px solid var(--tag-border); }
.ag-made-au { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-border); padding: .15rem .55rem; border-radius: 50px; margin-bottom: .5rem; }

/* ── Discord CTA Banner ── */
.ag-discord-banner {
  background: linear-gradient(135deg, #5865F2 0%, #404EED 100%);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ag-discord-banner::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.ag-discord-banner > * { position: relative; z-index: 1; }
.ag-discord-banner h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: .5rem; }
.ag-discord-banner p { color: rgba(255,255,255,.85); font-size: .95rem; margin-bottom: 1.2rem; }
.ag-discord-icon { font-size: 4rem; }
.ag-discord-stats { display: flex; gap: 2rem; margin-bottom: 1.5rem; }
.ag-discord-stat strong { display: block; font-size: 1.3rem; font-weight: 800; }
.ag-discord-stat span { font-size: .78rem; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .5px; }

/* ── Tags ── */
.ag-tag { display: inline-block; background: var(--tag-bg); color: var(--tag-color); padding: .25rem .7rem; border-radius: 50px; font-size: .8rem; font-weight: 600; margin: .15rem; border: 1px solid var(--tag-border); transition: all var(--transition); }
.ag-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.ag-tag-sm { display: inline-block; background: var(--tag-bg); color: var(--tag-color); padding: .2rem .55rem; border-radius: 50px; font-size: .75rem; margin: .1rem; border: 1px solid var(--tag-border); transition: all var(--transition); }
.ag-tag-sm:hover { background: var(--accent); color: #fff; }
.ag-tag-highlight { color: var(--accent); font-weight: 700; }

/* ── Page header ── */
.ag-page-title { font-size: 1.8rem; font-weight: 800; color: var(--heading-color); }
.ag-search-input { background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-color); }
.ag-search-input:focus { background: var(--input-bg); border-color: var(--accent); color: var(--text-color); }

/* ── Topic Article ── */
.ag-topic-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--heading-color); line-height: 1.3; }
.ag-topic-meta { font-size: .88rem; }
.ag-meta-author { color: var(--link-color); font-weight: 600; display: flex; align-items: center; gap: .35rem; }
.ag-meta-author:hover { color: var(--accent); }
.ag-meta-date, .ag-meta-views { color: var(--muted-text); display: flex; align-items: center; gap: .35rem; }
.ag-meta-link { color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: .35rem; }
.ag-topic-tags { margin-top: .7rem; }
.ag-topic-header { padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }

/* Topic content typography */
.ag-topic-content { color: var(--text-color); font-size: 1.02rem; line-height: 1.8; }
.ag-topic-content h1,.ag-topic-content h2 { color: var(--heading-color); font-weight: 800; margin: 2rem 0 1rem; border-bottom: 2px solid var(--border-color); padding-bottom: .5rem; }
.ag-topic-content h3,.ag-topic-content h4,.ag-topic-content h5,.ag-topic-content h6 { color: var(--heading-color); font-weight: 700; margin: 1.5rem 0 .7rem; }
.ag-topic-content p { margin-bottom: 1.2rem; }
.ag-topic-content a { color: var(--accent); text-decoration: underline; }
.ag-topic-content ul,.ag-topic-content ol { margin: 1rem 0; padding-left: 1.8rem; }
.ag-topic-content li { margin-bottom: .4rem; }
.ag-topic-content blockquote,.ag-topic-content .ag-blockquote { border-left: 4px solid var(--accent); padding: 1rem 1.5rem; background: var(--blockquote-bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.5rem 0; font-style: italic; color: var(--muted-text); }
.ag-topic-content code { background: var(--code-bg); color: var(--code-color); padding: .15rem .4rem; border-radius: 4px; font-size: .88em; font-family: 'Consolas', 'Courier New', monospace; }
.ag-topic-content pre { background: var(--pre-bg); border-radius: var(--radius-sm); padding: 1.2rem; overflow-x: auto; margin: 1.5rem 0; }
.ag-topic-content pre code { background: none; padding: 0; color: inherit; }
.ag-topic-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.ag-topic-content th { background: var(--accent); color: #fff; padding: .7rem 1rem; text-align: left; }
.ag-topic-content td { padding: .7rem 1rem; border-bottom: 1px solid var(--border-color); }
.ag-topic-content tr:nth-child(even) td { background: var(--hover-bg); }
.ag-topic-content img { border-radius: var(--radius-sm); max-width: 100%; height: auto; }
.ag-list { margin: 1rem 0; padding-left: 1.8rem; }

/* Author box */
.ag-author-box { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.5rem; display: flex; gap: 1.2rem; align-items: flex-start; }
.ag-author-avatar { color: var(--muted-text); }
.ag-author-info h5 { color: var(--heading-color); margin-bottom: .3rem; }
.ag-author-info a { color: var(--accent); font-weight: 700; }
.ag-author-hero { display: flex; align-items: center; gap: 1.5rem; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 2rem; }
.ag-author-avatar-lg { font-size: 4rem; color: var(--accent); }
.ag-author-hero-name { font-size: 2rem; font-weight: 800; color: var(--heading-color); }

/* Sidebar */
.ag-sidebar-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.3rem; }
.ag-sidebar-card h5 { font-weight: 700; color: var(--heading-color); margin-bottom: 1rem; font-size: 1rem; }
.ag-sidebar-list { list-style: none; padding: 0; margin: 0; }
.ag-sidebar-list li a { color: var(--link-color); font-size: .9rem; display: block; padding: .3rem 0; border-bottom: 1px solid var(--border-color); }
.ag-sidebar-list li:last-child a { border-bottom: none; }
.ag-sidebar-list li a:hover { color: var(--accent); padding-left: .3rem; }
.ag-promo-card { background: var(--accent-bg); border-color: var(--accent-border); }

/* ── Newsletter ── */
.ag-newsletter-section { background: var(--section-bg); }
.ag-newsletter-card {
  background: linear-gradient(135deg, var(--accent-bg), var(--section-alt-bg));
  border: 2px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
}
.ag-newsletter-card h3 { font-size: 1.5rem; font-weight: 800; color: var(--heading-color); margin-bottom: .5rem; }
.ag-newsletter-card p { color: var(--muted-text); margin-bottom: 1.5rem; }
.ag-newsletter-form { display: flex; gap: .6rem; max-width: 440px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.ag-newsletter-input {
  flex: 1; min-width: 220px;
  background: var(--input-bg); border: 1px solid var(--border-color);
  color: var(--text-color); border-radius: 50px;
  padding: .65rem 1.2rem; font-size: .9rem;
}
.ag-newsletter-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }

/* ── Pagination ── */
.ag-pagination { list-style: none; padding: 0; margin: 0; display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.ag-pagination li a, .ag-pagination li span { display: block; padding: .5rem .9rem; background: var(--card-bg); color: var(--text-color); border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: .88rem; font-weight: 600; transition: all var(--transition); }
.ag-pagination li a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.ag-pagination li.active a { background: var(--accent); color: #fff; border-color: var(--accent); }
.ag-pagination li span { color: var(--muted-text); }

/* ── Create / Edit form ── */
.ag-create-header h1 { font-size: 2rem; font-weight: 800; color: var(--heading-color); }
.ag-form-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.5rem; height: 100%; }
.ag-form-section-title { font-size: 1rem; font-weight: 700; color: var(--heading-color); }
.ag-label { font-weight: 600; font-size: .9rem; color: var(--text-color); }
.ag-input { background: var(--input-bg) !important; border: 1px solid var(--border-color) !important; color: var(--text-color) !important; border-radius: var(--radius-sm) !important; }
.ag-input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--focus-ring) !important; }
.ag-content-editor { font-family: 'Consolas','Courier New',monospace; font-size: .9rem; line-height: 1.6; background: var(--input-bg) !important; color: var(--text-color) !important; border: 1px solid var(--border-color) !important; border-radius: var(--radius-sm) !important; resize: vertical; }
.ag-content-editor:focus { border-color: var(--accent) !important; }
.ag-md-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; padding: .4rem .5rem; background: var(--toolbar-bg); border: 1px solid var(--border-color); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.ag-md-toolbar button { background: var(--toolbar-btn-bg); color: var(--text-color); border: 1px solid var(--border-color); border-radius: 4px; padding: .2rem .55rem; font-size: .8rem; cursor: pointer; transition: all var(--transition); min-width: 28px; }
.ag-md-toolbar button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.ag-toolbar-sep { color: var(--border-color); margin: 0 .15rem; font-size: 1.2rem; }
.ag-tab-btn { background: var(--toolbar-btn-bg); color: var(--text-color); border: 1px solid var(--border-color); padding: .25rem .7rem; font-size: .8rem; cursor: pointer; transition: all var(--transition); }
.ag-tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.ag-md-hint { background: var(--hint-bg); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .85rem; color: var(--muted-text); }

/* ── Admin ── */
.ag-admin-sidebar { background: var(--admin-sidebar-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.2rem; position: sticky; top: 80px; }
.ag-admin-logo { font-size: 1.2rem; font-weight: 800; color: var(--heading-color); margin-bottom: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--border-color); }
.ag-admin-nav { display: flex; flex-direction: column; gap: .3rem; }
.ag-admin-nav a { display: flex; align-items: center; gap: .6rem; color: var(--nav-link); padding: .55rem .8rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500; transition: all var(--transition); }
.ag-admin-nav a:hover, .ag-admin-nav a.active { background: var(--accent); color: #fff; }
.ag-admin-nav hr { border-color: var(--border-color); margin: .5rem 0; }
.ag-admin-title { font-size: 1.8rem; font-weight: 800; color: var(--heading-color); }
.ag-admin-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.5rem; }
.ag-admin-login-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 2.5rem; box-shadow: var(--shadow); }
.ag-admin-icon { font-size: 3rem; margin-bottom: .5rem; }
.ag-stat-card { background: var(--card-bg); border-radius: var(--radius); padding: 1.3rem 1.5rem; display: flex; gap: 1rem; align-items: center; box-shadow: var(--shadow); }
.ag-stat-icon { font-size: 2rem; opacity: .8; }
.ag-stat-val { font-size: 1.8rem; font-weight: 800; }
.ag-admin-table { color: var(--text-color); }
.ag-admin-table th { background: var(--table-head-bg); color: var(--text-color); font-weight: 700; border-color: var(--border-color); }
.ag-admin-table td { border-color: var(--border-color); vertical-align: middle; }
.ag-admin-table tr:hover td { background: var(--hover-bg); }
.ag-table-link { color: var(--link-color); font-weight: 600; }
.ag-table-link:hover { color: var(--accent); }
.ag-toggle-btn { min-width: 200px; font-weight: 700; border-radius: 50px; }

/* ── Footer ── */
.ag-footer { background: var(--footer-bg); border-top: 1px solid var(--border-color); padding: 3rem 0 1.5rem; color: var(--footer-text); }
.ag-footer-title { font-weight: 800; color: var(--footer-heading); margin-bottom: 1rem; font-size: 1rem; }
.ag-footer-text { color: var(--footer-text); font-size: .9rem; }
.ag-footer-links { list-style: none; padding: 0; margin: 0; }
.ag-footer-links li { margin-bottom: .5rem; }
.ag-footer-links a { color: var(--footer-link); font-size: .9rem; }
.ag-footer-links a:hover { color: var(--accent); }
.ag-footer-divider { border-color: rgba(255,255,255,.1); margin: 2rem 0 1rem; }
.ag-footer-copy { color: var(--footer-text); font-size: .85rem; }
.ag-footer-link { color: var(--footer-link); font-size: .85rem; }
.ag-footer-link:hover { color: var(--accent); }
.ag-footer-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.ag-social { display: flex; gap: .8rem; margin-top: 1rem; }
.ag-social a { color: var(--footer-text); font-size: 1.3rem; transition: all var(--transition); }
.ag-social a:hover { color: var(--accent); transform: translateY(-2px); }

/* Footer newsletter */
.ag-footer-newsletter input {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 50px 0 0 50px;
  padding: .5rem 1rem; font-size: .85rem; flex: 1;
}
.ag-footer-newsletter input::placeholder { color: rgba(255,255,255,.5); }
.ag-footer-newsletter input:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,.15); }
.ag-footer-newsletter button {
  background: var(--accent); color: #fff; border: none;
  border-radius: 0 50px 50px 0; padding: .5rem 1rem;
  font-size: .85rem; font-weight: 700; cursor: pointer;
  transition: background var(--transition);
}
.ag-footer-newsletter button:hover { background: var(--accent-hover); }
.ag-footer-newsletter { display: flex; margin-top: .7rem; }

/* ── Back to top ── */
#backToTop {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--accent); color: #fff;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  font-size: 1.1rem; z-index: 999;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  transition: all var(--transition);
}
#backToTop:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }

/* ── Misc ── */
.ag-link { color: var(--link-color); }
.ag-link:hover { color: var(--accent); }
.ag-md-preview { color: var(--text-color); }
.ag-live-badge { display: inline-flex; align-items: center; gap: .35rem; background: #ef4444; color: #fff; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 50px; text-transform: uppercase; letter-spacing: .5px; }
.ag-live-badge::before { content: ''; display: block; width: 6px; height: 6px; background: #fff; border-radius: 50%; animation: pulseDot 1s infinite; }
.ag-time-badge { font-size: .8rem; color: var(--muted-text); font-weight: 600; }

/* Section divider */
.ag-wave-divider { line-height: 0; background: var(--section-alt-bg); }
.ag-wave-divider svg { display: block; }

/* ── Responsive ── */
@media (max-width: 767px) {
  .ag-hero { padding: 3rem 0 2.5rem; }
  .ag-hero-title { font-size: 2rem; }
  .ag-hero-stats { gap: 1.5rem; }
  .ag-stat strong { font-size: 1.3rem; }
  .ag-author-hero { flex-direction: column; text-align: center; }
  .ag-author-hero-name { font-size: 1.5rem; }
  .ag-discord-stats { gap: 1rem; }
  .ag-nav-search-input { width: 140px; }
  .ag-nav-search-input:focus { width: 160px; }
}
@media (max-width: 575px) {
  .ag-hero-btns { flex-direction: column; align-items: flex-start; }
  .ag-hero-search { max-width: 100%; }
}
