/* AceFun Games — Handcrafted Design v2 */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --secondary: #f59e0b;
  --secondary-light: #fbbf24;
  --accent: #ec4899;
  --bg: #fefcfb;
  --bg-card: #ffffff;
  --bg-soft: #f8f5f2;
  --bg-hero: #f3f0ff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e2de;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(124,58,237,0.08);
  --shadow-lg: 0 12px 40px rgba(124,58,237,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--accent); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* === HEADER === */
.site-header {
  background: var(--bg-card);
  border-bottom: 2px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-size: 1.4em;
  font-weight: 900;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.5px;
}
.logo span { color: var(--primary); }
.logo:hover { color: var(--text); transform: scale(1.02); }

nav { display: flex; gap: 22px; align-items: center; }
nav a {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* === HERO === */
.hero {
  text-align: center;
  padding: 70px 24px 60px;
  background: var(--bg-hero);
  border-bottom: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 120%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(124,58,237,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(245,158,11,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero h1 {
  font-size: 2.6em;
  font-weight: 900;
  margin-bottom: 16px;
  color: var(--text);
  position: relative;
  letter-spacing: -1px;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
  position: relative;
}
.hero h1 em::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--secondary-light);
  opacity: 0.5;
  border-radius: 3px;
  z-index: -1;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.15em;
  max-width: 580px;
  margin: 0 auto;
  position: relative;
}

/* === SECTION TITLES === */
.section-title {
  font-size: 1.5em;
  font-weight: 800;
  margin: 45px 0 22px;
  padding: 8px 0 8px 16px;
  border-left: 5px solid var(--secondary);
  color: var(--text);
  letter-spacing: -0.3px;
}

/* === GAME GRID === */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  padding-bottom: 30px;
}

.game-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.game-card:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.game-card-thumb {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2em;
  position: relative;
}
.game-card-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(transparent, rgba(255,255,255,0.3));
}

.game-card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.game-card-body h3 {
  font-size: 1.05em;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}
.game-card-body p {
  color: var(--text-muted);
  font-size: 0.88em;
  flex: 1;
  line-height: 1.5;
}

.game-card-body .play-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 22px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9em;
  text-align: center;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(124,58,237,0.2);
}
.game-card-body .play-btn:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(124,58,237,0.3);
}

/* === GAME PAGE === */
.game-container {
  max-width: 820px;
  margin: 30px auto;
  padding: 0 24px;
}

.game-frame {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.game-frame canvas {
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  max-width: 100%;
  background: #1a1a2e;
}

.game-info { margin-top: 24px; }
.game-info h1 { font-size: 1.8em; font-weight: 900; margin-bottom: 12px; color: var(--text); }
.game-info p { color: var(--text-muted); margin-bottom: 14px; line-height: 1.7; }

.game-controls {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-top: 16px;
}
.game-controls h3 { font-size: 0.95em; margin-bottom: 6px; color: var(--primary); font-weight: 800; }
.game-controls p { color: var(--text-muted); font-size: 0.9em; margin: 0; }

/* === BLOG === */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 30px;
}

.blog-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: all 0.25s;
  box-shadow: var(--shadow-sm);
}
.blog-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}
.blog-card h3 { margin-bottom: 8px; font-size: 1.15em; font-weight: 800; color: var(--text); }
.blog-card p { color: var(--text-muted); font-size: 0.92em; line-height: 1.6; }
.blog-card .meta { color: var(--text-light); font-size: 0.8em; margin-top: 10px; font-weight: 600; }

/* === ARTICLE === */
.article { max-width: 760px; margin: 35px auto; padding: 0 24px 50px; }
.article h1 { font-size: 2.1em; font-weight: 900; margin-bottom: 8px; color: var(--text); letter-spacing: -0.5px; }
.article .meta { color: var(--text-light); margin-bottom: 32px; font-weight: 600; }
.article h2 { margin: 32px 0 14px; color: var(--primary-dark); font-weight: 800; font-size: 1.3em; }
.article h3 { margin: 24px 0 10px; color: var(--text); font-weight: 800; font-size: 1.1em; }
.article p { margin-bottom: 16px; color: var(--text-muted); line-height: 1.8; }
.article ul, .article ol { margin: 14px 0 18px; padding-left: 24px; color: var(--text-muted); }
.article li { margin-bottom: 8px; line-height: 1.7; }
.article strong { color: var(--text); }
.article a { font-weight: 700; border-bottom: 2px solid var(--primary-light); }
.article a:hover { border-bottom-color: var(--accent); }

/* === AD SLOTS === */
.ad-slot {
  text-align: center;
  padding: 12px 0;
  margin: 24px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === FOOTER === */
.site-footer {
  background: var(--bg-soft);
  border-top: 2px solid var(--border);
  padding: 45px 24px;
  text-align: center;
  margin-top: 50px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.footer-links a { color: var(--text-muted); font-size: 0.88em; font-weight: 700; }
.footer-links a:hover { color: var(--primary); }
.site-footer p { color: var(--text-light); font-size: 0.82em; margin-top: 8px; }

/* === COOKIE CONSENT === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 2px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  font-size: 0.9em;
}
.cookie-banner p { color: var(--text-muted); margin: 0; }
.cookie-banner .btn-accept {
  padding: 8px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9em;
}
.cookie-banner .btn-accept:hover { background: var(--primary-dark); }
.cookie-banner a { font-weight: 700; }

/* === ABOUT EXTRAS === */
.avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 4px 15px rgba(124,58,237,0.2);
}

.timeline {
  border-left: 3px solid var(--primary-light);
  padding-left: 24px;
  margin: 20px 0 30px;
}
.timeline-item {
  position: relative;
  margin-bottom: 20px;
  padding-bottom: 4px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
}
.timeline-item strong { color: var(--primary-dark); display: block; font-size: 0.85em; margin-bottom: 2px; }
.timeline-item p { margin: 0; color: var(--text-muted); font-size: 0.92em; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 10px; }
  nav { gap: 14px; flex-wrap: wrap; justify-content: center; }
  .hero { padding: 45px 20px 40px; }
  .hero h1 { font-size: 1.9em; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .game-card-thumb { height: 130px; font-size: 2.5em; }
  .article h1 { font-size: 1.6em; }
  .cookie-banner { flex-direction: column; text-align: center; gap: 10px; }
}

@media (max-width: 480px) {
  .game-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-card-body { padding: 12px 14px 16px; }
  .game-card-body h3 { font-size: 0.92em; }
  .game-card-body p { font-size: 0.8em; }
  .game-card-body .play-btn { padding: 8px 16px; font-size: 0.82em; }
  nav { gap: 10px; font-size: 0.82em; }
  .section-title { font-size: 1.25em; }
}
/* AceFun Games - Original Design */
:root {
  --primary: #6c5ce7;
  --primary-dark: #5a4bd1;
  --secondary: #00cec9;
  --accent: #fd79a8;
  --bg: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-light: #16213e;
  --text: #f0f0f0;
  --text-muted: #a0a0b0;
  --border: #2a2a4a;
  --success: #00b894;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--secondary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-size: 1.5em;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span { color: var(--primary); }

nav { display: flex; gap: 25px; }
nav a { color: var(--text-muted); font-weight: 500; font-size: 0.95em; }
nav a:hover { color: var(--secondary); }

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.5em;
  font-weight: 800;
  margin-bottom: 15px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p { color: var(--text-muted); font-size: 1.1em; max-width: 600px; margin: 0 auto; }

/* Game Grid */
.section-title {
  font-size: 1.6em;
  font-weight: 700;
  margin: 40px 0 25px;
  padding-left: 15px;
  border-left: 4px solid var(--primary);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  padding: 0 0 40px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.2);
  border-color: var(--primary);
}

.game-card-thumb {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
}

.game-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.game-card-body h3 { font-size: 1.1em; margin-bottom: 8px; }
.game-card-body p { color: var(--text-muted); font-size: 0.9em; flex: 1; }

.game-card-body .play-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  transition: background 0.3s;
}

.game-card-body .play-btn:hover { background: var(--primary-dark); color: white; }

/* Game Page */
.game-container {
  max-width: 800px;
  margin: 30px auto;
  padding: 0 20px;
}

.game-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 30px;
}

.game-frame canvas {
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  max-width: 100%;
}

.game-info { margin-top: 20px; }
.game-info h1 { font-size: 1.8em; margin-bottom: 10px; }
.game-info p { color: var(--text-muted); margin-bottom: 15px; }

.game-controls {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px 20px;
  margin-top: 15px;
}

.game-controls h3 { font-size: 1em; margin-bottom: 8px; color: var(--secondary); }
.game-controls p { color: var(--text-muted); font-size: 0.9em; margin: 0; }

/* Blog */
.blog-list { display: flex; flex-direction: column; gap: 20px; padding-bottom: 40px; }

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 25px;
  transition: border-color 0.3s;
}

.blog-card:hover { border-color: var(--primary); }
.blog-card h3 { margin-bottom: 10px; font-size: 1.2em; }
.blog-card p { color: var(--text-muted); font-size: 0.95em; }
.blog-card .meta { color: var(--text-muted); font-size: 0.8em; margin-top: 10px; }

/* Article */
.article { max-width: 800px; margin: 30px auto; padding: 0 20px 40px; }
.article h1 { font-size: 2em; margin-bottom: 10px; }
.article .meta { color: var(--text-muted); margin-bottom: 30px; }
.article h2 { margin: 30px 0 15px; color: var(--secondary); }
.article p { margin-bottom: 15px; color: var(--text-muted); }
.article ul, .article ol { margin: 15px 0; padding-left: 25px; color: var(--text-muted); }
.article li { margin-bottom: 8px; }

/* Ad Slots */
.ad-slot {
  text-align: center;
  padding: 15px;
  margin: 20px 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.site-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
  margin-top: 40px;
}

.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 15px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 0.9em; }
.site-footer p { color: var(--text-muted); font-size: 0.85em; }

/* Responsive */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 10px; }
  nav { gap: 15px; }
  .hero h1 { font-size: 1.8em; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .game-card-thumb { height: 140px; }
}

@media (max-width: 480px) {
  .game-grid { grid-template-columns: 1fr; }
  nav { gap: 12px; font-size: 0.85em; }
}
