/* ============================================
   DotPlays.com — Dark Theme Stylesheet
   ============================================ */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a1f2e;
  --bg-card-hover: #1f2537;
  --bg-glass: rgba(26, 31, 46, 0.85);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --text-primary: #e8eaf0;
  --text-secondary: #8b92a8;
  --text-muted: #5a617a;

  --accent: #6c5ce7;
  --accent-hover: #7c6ff7;
  --accent-glow: rgba(108, 92, 231, 0.25);
  --accent-gradient: linear-gradient(135deg, #6c5ce7, #a78bfa);

  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; display: block; }

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

/* ============================================
   Navbar
   ============================================ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 0;
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-primary); font-weight: 700; font-size: 1.2rem;
}
.brand-icon { font-size: 1.5rem; }
.brand-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar-menu {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}
.navbar-menu a {
  color: var(--text-secondary); padding: 8px 14px;
  border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition);
}
.navbar-menu a:hover, .navbar-menu a.active {
  color: var(--text-primary); background: rgba(108, 92, 231, 0.1);
}
.navbar-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 8px;
}
.navbar-toggle span {
  display: block; width: 24px; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: var(--transition);
}

/* User dropdown */
.nav-user { position: relative; }
.nav-avatar {
  display: flex !important; align-items: center; gap: 8px;
}
.nav-avatar img {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border);
}
.nav-dropdown {
  display: none; position: absolute; right: 0; top: 100%;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); min-width: 180px;
  list-style: none; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.nav-user:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block !important; padding: 10px 16px !important;
  border-radius: 0 !important; font-size: 0.88rem !important;
  border-bottom: 1px solid var(--border);
}
.nav-dropdown li:last-child a { border-bottom: none; }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; font-family: var(--font);
  cursor: pointer; border: none; transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent-gradient); color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-1px); box-shadow: 0 0 30px var(--accent-glow);
  color: #fff;
}
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(108, 92, 231, 0.05);
}
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-block { width: 100%; }

/* ============================================
   Hero
   ============================================ */
.hero-section {
  background: linear-gradient(180deg, rgba(108,92,231,0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  padding: 60px 0;
}
.hero-content { text-align: center; max-width: 600px; margin: 0 auto; }
.hero-avatar { font-size: 4rem; margin-bottom: 16px; }
.hero-title {
  font-size: 2.4rem; font-weight: 800; margin-bottom: 12px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; }

/* ============================================
   Content Grid
   ============================================ */
.content-grid {
  display: grid; grid-template-columns: 1fr 300px; gap: 32px;
  padding: 40px 0;
}
.main-col { min-width: 0; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.section-header h1, .section-header h2 {
  font-size: 1.4rem; font-weight: 700;
}
.link-more { font-size: 0.88rem; color: var(--accent); font-weight: 500; }

/* ============================================
   Posts Grid
   ============================================ */
.posts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.post-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  transition: all var(--transition);
}
.post-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.post-card-image {
  display: block; aspect-ratio: 16/9; overflow: hidden;
  background: var(--bg-secondary);
}
.post-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.05); }
.post-card-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--text-muted);
}
.post-card-body { padding: 16px; }
.post-card-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; font-size: 0.78rem;
}
.post-card-category {
  background: rgba(108, 92, 231, 0.12); color: var(--accent);
  padding: 2px 8px; border-radius: 4px; font-weight: 600;
}
.post-card-date { color: var(--text-muted); }
.post-card-title {
  font-size: 1rem; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-title a { color: var(--text-primary); }
.post-card-title a:hover { color: var(--accent); }
.post-card-excerpt { color: var(--text-secondary); font-size: 0.85rem; margin-top: 6px; }

/* ============================================
   Post Detail
   ============================================ */
.post-detail { max-width: 800px; }
.post-featured-image {
  border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 24px;
}
.post-header { margin-bottom: 32px; }
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.post-views { color: var(--text-muted); font-size: 0.85rem; }
.post-title { font-size: 2rem; font-weight: 800; line-height: 1.3; }

.post-content {
  font-size: 1.05rem; line-height: 1.85; color: var(--text-secondary);
}
.post-content h2, .post-content h3, .post-content h4 {
  color: var(--text-primary); margin: 28px 0 12px; font-weight: 700;
}
.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.25rem; }
.post-content p { margin-bottom: 16px; }
.post-content img {
  border-radius: var(--radius-md); margin: 20px 0;
  box-shadow: var(--shadow-sm);
}
.post-content pre {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px; overflow-x: auto;
  font-size: 0.9rem; margin: 16px 0;
}
.post-content code {
  background: var(--bg-secondary); padding: 2px 6px;
  border-radius: 4px; font-size: 0.88em;
}
.post-content pre code { background: none; padding: 0; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 16px; }
.post-content li { margin-bottom: 6px; }
.post-content blockquote {
  border-left: 3px solid var(--accent); padding: 12px 20px;
  background: rgba(108, 92, 231, 0.05); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0; font-style: italic;
}
.post-content a { color: var(--accent); text-decoration: underline; }
.post-content table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
}
.post-content th, .post-content td {
  border: 1px solid var(--border); padding: 10px 14px; text-align: left;
}
.post-content th { background: var(--bg-secondary); font-weight: 600; color: var(--text-primary); }
.post-content figure { margin: 20px 0; }
.post-content figcaption { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }

.post-tags { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag-badge {
  background: var(--bg-secondary); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 20px; font-size: 0.82rem; color: var(--text-secondary);
  transition: all var(--transition);
}
.tag-badge:hover { border-color: var(--accent); color: var(--accent); }

.post-share {
  margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  font-size: 0.9rem; color: var(--text-muted);
}
.share-btn {
  padding: 6px 16px; border-radius: 20px; font-size: 0.82rem; font-weight: 600;
}
.share-fb { background: #1877f2; color: #fff; }
.share-fb:hover { background: #1565c0; color: #fff; }
.share-tw { background: #1da1f2; color: #fff; }
.share-tw:hover { background: #0d8ddb; color: #fff; }

/* Related Posts */
.related-posts { margin-top: 40px; }
.related-posts h3 { font-size: 1.2rem; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.related-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px; transition: all var(--transition);
}
.related-card:hover { border-color: var(--border-hover); }
.related-card img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.related-card span { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar { position: sticky; top: 84px; height: fit-content; }
.sidebar-widget {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px;
}
.widget-title {
  font-size: 1rem; font-weight: 700; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.category-list { list-style: none; }
.category-list li { margin-bottom: 2px; }
.category-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.88rem;
  transition: all var(--transition);
}
.category-link:hover { background: rgba(108,92,231,0.08); color: var(--text-primary); }
.badge {
  background: var(--bg-secondary); padding: 2px 8px;
  border-radius: 10px; font-size: 0.75rem; color: var(--text-muted);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; margin-top: 32px;
}
.page-link {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-secondary); background: var(--bg-card);
  border: 1px solid var(--border); transition: all var(--transition);
}
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-current {
  background: var(--accent-gradient) !important; color: #fff !important;
  border-color: transparent !important;
}
.page-dots { color: var(--text-muted); padding: 0 4px; }

/* ============================================
   Auth Forms
   ============================================ */
.auth-wrapper {
  display: flex; justify-content: center; align-items: center;
  min-height: 60vh; padding: 40px 0;
}
.auth-card { width: 100%; max-width: 420px; padding: 40px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 24px; text-align: center; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.88rem; color: var(--text-muted); }

.glass-card {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
}

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-size: 0.88rem; font-weight: 600; color: var(--text-secondary);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: var(--font); font-size: 0.92rem;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group small { display: block; margin-top: 4px; font-size: 0.78rem; color: var(--text-muted); }

/* ============================================
   Flash Messages
   ============================================ */
.flash-message {
  max-width: 1200px; margin: 12px auto; padding: 12px 20px;
  border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500;
  animation: flashIn 0.3s ease;
}
.flash-success { background: rgba(16, 185, 129, 0.12); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.flash-error { background: rgba(239, 68, 68, 0.12); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.2); }
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================
   Error Page
   ============================================ */
.error-page {
  text-align: center; padding: 80px 0;
}
.error-page h1 { font-size: 3rem; margin-bottom: 12px; }
.error-page p { color: var(--text-secondary); margin-bottom: 24px; }
.empty-state { color: var(--text-muted); text-align: center; padding: 40px 0; }

/* ============================================
   Footer
   ============================================ */
.footer {
  margin-top: 60px; padding: 40px 0 0;
  background: var(--bg-secondary); border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  padding-bottom: 32px;
}
.footer-col h4 { font-size: 1rem; margin-bottom: 14px; color: var(--text-primary); }
.footer-col p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul a { color: var(--text-secondary); font-size: 0.88rem; }
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom {
  text-align: center; padding: 16px 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-muted);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .navbar-toggle { display: flex; }
  .navbar-menu {
    display: none; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: var(--bg-primary);
    border-bottom: 1px solid var(--border); padding: 12px 20px;
  }
  .navbar-menu.active { display: flex; }
  .navbar-menu a { padding: 10px 0; }

  .hero-title { font-size: 1.8rem; }
  .hero-section { padding: 40px 0; }
  .hero-actions { flex-direction: column; }

  .posts-grid { grid-template-columns: 1fr; }
  .post-title { font-size: 1.5rem; }

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

/* ============================================
   Profile Page
   ============================================ */
.profile-page { padding: 32px 0; }
.profile-header { overflow: hidden; margin-bottom: 32px; }
.profile-cover {
  height: 180px;
  background: var(--accent-gradient);
  opacity: 0.4;
}
.profile-info {
  display: flex; gap: 24px; padding: 0 32px 32px;
  margin-top: -48px;
}
.profile-avatar-wrapper { flex-shrink: 0; }
.profile-avatar-lg {
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover; border: 4px solid var(--bg-card);
  box-shadow: var(--shadow-md);
  background: var(--bg-secondary);
}
.profile-details { padding-top: 56px; }
.profile-name { font-size: 1.6rem; font-weight: 800; }
.profile-username { color: var(--text-muted); font-size: 0.9rem; }
.role-badge {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 0.75rem; font-weight: 600; margin-left: 8px;
}
.role-admin { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.profile-bio { color: var(--text-secondary); margin-top: 10px; max-width: 500px; }
.profile-meta { color: var(--text-muted); font-size: 0.85rem; margin-top: 8px; }
.profile-social { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.social-link {
  padding: 4px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.social-link:hover { border-color: var(--accent); }
.social-github { color: #e8eaf0; }
.social-facebook { color: #1877f2; }
.social-youtube { color: #ff0000; }
.social-web { color: var(--accent); }

.profile-section { margin-top: 32px; }
.profile-section h2 { font-size: 1.3rem; margin-bottom: 16px; }

/* ============================================
   Settings Page
   ============================================ */
.settings-page { padding: 32px 0; max-width: 900px; margin: 0 auto; }
.settings-page h1 { font-size: 1.5rem; margin-bottom: 24px; }
.settings-grid { display: grid; gap: 24px; }
.settings-card { padding: 28px; }
.settings-card h2 { font-size: 1.15rem; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

.avatar-upload { display: flex; align-items: center; gap: 20px; }
.avatar-preview {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--border);
  background: var(--bg-secondary);
}
.avatar-upload-actions { display: flex; flex-direction: column; gap: 6px; }

.input-disabled {
  opacity: 0.5; cursor: not-allowed;
}

@media (max-width: 640px) {
  .profile-info { flex-direction: column; align-items: center; text-align: center; padding: 0 16px 24px; }
  .profile-details { padding-top: 12px; }
  .profile-social { justify-content: center; }
}

/* ============================================
   Community Forum
   ============================================ */
.community-page { padding: 32px 0; }
.community-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.community-header h1 { font-size: 1.5rem; }
.community-desc { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }

.community-filters { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-tab {
  padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 500;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); transition: all var(--transition);
}
.filter-tab:hover { border-color: var(--accent); color: var(--text-primary); }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Thread List */
.thread-list { display: flex; flex-direction: column; gap: 2px; }
.thread-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.thread-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.thread-pinned { border-left: 3px solid var(--warning); }
.thread-solved { border-left: 3px solid var(--success); }

.thread-votes, .thread-replies-count {
  text-align: center; min-width: 52px; flex-shrink: 0;
}
.thread-votes .vote-count, .thread-replies-count span:first-child {
  display: block; font-size: 1.1rem; font-weight: 700; color: var(--text-primary);
}
.thread-replies-count .has-replies { color: var(--accent); }
.thread-replies-count .is-solved { color: var(--success); }
.vote-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }

.thread-info { flex: 1; min-width: 0; }
.thread-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-title {
  font-weight: 600; font-size: 0.95rem; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thread-title:hover { color: var(--accent); }
.cat-badge { font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.pin-badge { font-size: 0.8rem; }
.solved-badge { font-size: 0.78rem; color: var(--success); font-weight: 600; }
.locked-badge { font-size: 0.78rem; color: var(--text-muted); }

.thread-meta-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.thread-tag {
  background: var(--bg-secondary); padding: 1px 8px; border-radius: 4px;
  font-size: 0.72rem; color: var(--text-muted);
}
.thread-meta { font-size: 0.78rem; color: var(--text-muted); }
.thread-meta a { color: var(--text-secondary); }

/* Thread Detail */
.thread-detail { max-width: 850px; }
.thread-full, .reply-item {
  display: flex; gap: 16px; margin-bottom: 16px;
  padding: 20px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
}
.reply-accepted { border-color: var(--success); background: rgba(16, 185, 129, 0.04); }

.vote-panel { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; min-width: 40px; }
.vote-btn {
  background: none; border: none; cursor: pointer; font-size: 1.1rem;
  color: var(--text-muted); padding: 4px 8px; border-radius: 4px;
  transition: all var(--transition);
}
.vote-btn:hover { background: rgba(108, 92, 231, 0.1); color: var(--accent); }
.vote-btn.voted { color: var(--accent); }
.vote-count-display { font-size: 1.1rem; font-weight: 700; }
.accepted-mark { font-size: 1.5rem; margin-top: 4px; }

.thread-body-section, .reply-body-section { flex: 1; min-width: 0; }
.thread-full-title { font-size: 1.5rem; font-weight: 800; margin: 8px 0 12px; }
.thread-author-info { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 0.88rem; }
.thread-author-info a { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.thread-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.thread-date { color: var(--text-muted); font-size: 0.82rem; }
.thread-content { margin-bottom: 16px; }
.thread-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* Replies */
.replies-section { margin-top: 24px; }
.replies-section h3 { font-size: 1.1rem; margin-bottom: 16px; }

.reply-footer {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap;
}
.reply-author { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-secondary); }
.reply-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.reply-date { font-size: 0.78rem; color: var(--text-muted); }

.reply-form { padding: 24px; margin-top: 24px; }
.reply-form h3 { margin-bottom: 16px; }
.reply-form-cta { text-align: center; margin-top: 24px; padding: 24px; }

/* New Thread Form */
.new-thread-form { padding: 32px; max-width: 700px; }
.category-select { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-option input { display: none; }
.cat-option-label {
  display: inline-block; padding: 8px 16px; border-radius: var(--radius-sm);
  background: var(--bg-secondary); border: 2px solid var(--border);
  cursor: pointer; font-size: 0.88rem; font-weight: 600;
  transition: all var(--transition);
}
.cat-option input:checked + .cat-option-label {
  border-color: var(--cat-color, var(--accent));
  background: rgba(108, 92, 231, 0.1);
}
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

@media (max-width: 640px) {
  .community-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .thread-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .thread-votes, .thread-replies-count { flex-direction: row; gap: 6px; min-width: auto; }
  .thread-full, .reply-item { flex-direction: column; }
}

/* ============================================
   Game Arcade
   ============================================ */
.games-page { padding: 32px 0; }
.games-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.game-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  transition: all var(--transition); display: block;
}
.game-card:hover {
  border-color: var(--border-hover); transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.game-card-thumb {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
  background: var(--bg-secondary);
}
.game-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 3rem;
}
.game-card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5); display: flex;
  align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.game-card:hover .game-card-overlay { opacity: 1; }
.play-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent-gradient); display: flex;
  align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
}
.game-card-body { padding: 14px; }
.game-card-title { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.game-card-meta { display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.game-rating { color: var(--warning); }
.game-card-author { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-secondary); }
.game-card-author img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }

/* Play Page */
.play-page { padding: 32px 0; }
.play-header h1 { font-size: 1.5rem; margin-bottom: 8px; }
.play-meta { display: flex; align-items: center; gap: 16px; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; flex-wrap: wrap; }
.play-author { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.play-author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

.play-container {
  background: #000; border-radius: var(--radius-lg); overflow: hidden;
  display: flex; justify-content: center; margin-bottom: 16px;
  border: 1px solid var(--border);
}
.game-iframe { border: none; max-width: 100%; display: block; }

.play-actions {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.rating-widget { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.stars { display: flex; gap: 2px; }
.star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.4rem; color: var(--text-muted); transition: color 0.15s;
  padding: 0;
}
.star-btn:hover, .star-btn.star-active { color: var(--warning); }
.rating-display { font-size: 0.85rem; color: var(--text-muted); }

.play-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-card { padding: 20px; }
.info-card h3 { font-size: 1rem; margin-bottom: 10px; }
.info-card p { font-size: 0.9rem; color: var(--text-secondary); }
.play-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  transition: all var(--transition);
}
.upload-zone.drag-over, .upload-zone.has-file { border-color: var(--accent); }
.upload-label {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 32px; cursor: pointer; text-align: center;
}
.upload-icon { font-size: 2.5rem; }
.upload-text { font-weight: 600; color: var(--text-primary); }
.upload-file-info { padding: 12px; text-align: center; font-size: 0.9rem; color: var(--accent); font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 640px) {
  .play-info-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ============================================
   AdSense
   ============================================ */
.ad-container {
  margin: 1.5rem 0;
  text-align: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  /* Desktop: Leaderboard 728x90 hoặc Medium Rectangle 300x250 */
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
}
.ad-container ins {
  width: 100%;
}

/* Tablet */
@media (max-width: 900px) {
  .ad-container {
    min-height: 250px; /* Medium Rectangle 300x250 */
  }
}

/* Mobile */
@media (max-width: 640px) {
  .ad-container {
    min-height: 100px; /* Mobile Banner 320x100 */
  }
}
