/* Fun88 Register - Analyst Theme */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #0a1628;
  --secondary: #162d50;
  --accent: #ffd700;
  --accent-light: #ffe44d;
  --bg: #0d1b2a;
  --text: #e0e0e0;
  --text-muted: #8899aa;
  --border: #1e3a5f;
  --success: #4caf50;
  --danger: #f44336;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

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

body {
  font-family: 'Sarabun', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
}

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

img { max-width: 100%; height: auto; border-radius: var(--radius); }

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

/* Header */
.site-header {
  background: var(--primary);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -1px;
}
.logo span { color: var(--text); font-weight: 400; }

/* Nav */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 5px;
}

.main-nav a {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.3s;
}

.main-nav a:hover, .main-nav a.active {
  background: var(--secondary);
  color: var(--accent);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.2rem;
}

/* Hero Banner */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  overflow: hidden;
  margin-bottom: 30px;
}

.hero-content {
  padding: 60px 0;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 15px;
  line-height: 1.3;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text);
  max-width: 600px;
  margin-bottom: 25px;
}

.hero-decoration {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.05;
}

/* CTA Button */
.cta-btn {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5);
  color: var(--primary);
}

.cta-btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  border: 2px solid var(--accent);
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s;
  margin-left: 10px;
}

.cta-btn-secondary:hover {
  background: var(--accent);
  color: var(--primary);
}

/* Blog Layout */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  padding: 30px 0;
}

/* Blog Cards */
.blog-card {
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 25px;
  transition: all 0.3s;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.blog-card-body {
  padding: 20px;
}

.blog-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.blog-card h3 a { color: var(--text); }
.blog-card h3 a:hover { color: var(--accent); }

.blog-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.blog-card-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 25px;
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.sidebar-widget ul {
  list-style: none;
}

.sidebar-widget li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-widget li:last-child { border-bottom: none; }

.sidebar-widget li a {
  color: var(--text);
  font-size: 0.95rem;
  transition: color 0.3s;
}

.sidebar-widget li a:hover { color: var(--accent); }

/* Tabs Component */
.tabs-container {
  margin: 30px 0;
}

.tab-buttons {
  display: flex;
  gap: 5px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-family: 'Sarabun', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-btn:hover { color: var(--accent); }

.tab-content {
  display: none;
  padding: 20px 0;
}

.tab-content.active { display: block; }

/* Top 10 Ranking */
.ranking-list {
  list-style: none;
  counter-reset: ranking;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: all 0.3s;
}

.ranking-item:hover {
  border-color: var(--accent);
  transform: translateX(5px);
}

.ranking-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.ranking-badge.gold { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #000; }
.ranking-badge.silver { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #000; }
.ranking-badge.bronze { background: linear-gradient(135deg, #cd7f32, #a0522d); color: #fff; }
.ranking-badge.normal { background: var(--secondary); color: var(--text); }

.ranking-info { flex: 1; }
.ranking-info h4 { font-size: 0.95rem; color: var(--text); margin-bottom: 2px; }
.ranking-info p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dashed var(--accent);
  cursor: help;
  color: var(--accent);
}

.tooltip .tooltip-text {
  visibility: hidden;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 100;
  border: 1px solid var(--accent);
  opacity: 0;
  transition: all 0.3s;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.tooltip .tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--accent) transparent transparent transparent;
}

/* Article Content */
.article-content {
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 30px;
}

.article-content h2 {
  font-size: 1.6rem;
  color: var(--accent);
  margin: 25px 0 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.article-content h3 {
  font-size: 1.3rem;
  color: var(--accent-light);
  margin: 20px 0 10px;
}

.article-content p {
  margin-bottom: 15px;
  line-height: 1.9;
}

.article-content ul, .article-content ol {
  margin: 15px 0;
  padding-left: 25px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 15px 20px;
  margin: 20px 0;
  background: var(--secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.stat-card {
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Footer */
.site-footer {
  background: var(--primary);
  border-top: 3px solid var(--accent);
  padding: 40px 0 20px;
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Breadcrumb */
.breadcrumb {
  padding: 15px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 8px; }

/* Responsive */
@media (max-width: 768px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar { position: static; }
  
  .main-nav ul { display: none; }
  .main-nav ul.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 20px;
    border-bottom: 3px solid var(--accent);
    z-index: 999;
  }
  
  .menu-toggle { display: block; }
  
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  
  .header-inner { flex-wrap: wrap; }
  
  .tab-buttons { flex-wrap: wrap; }
  
  .stats-grid { grid-template-columns: 1fr 1fr; }
  
  .footer-grid { grid-template-columns: 1fr; }
  
  .cta-btn { display: block; text-align: center; }
  .cta-btn-secondary { display: block; text-align: center; margin: 10px 0 0 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 15px; }
  .hero h1 { font-size: 1.5rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .article-content { padding: 20px 15px; }
}
