/* === AssessWiki Hub/Zone Portal Shared CSS === */
/* Base styles are loaded via tailwind.min.css (compiled from input.css).   */
/* This file contains only zone-portal-specific styles shared by all 7      */
/* zone pages under /hub/*.                                                  */
a:hover {
    text-decoration: none !important;
}
/* === Game card === */
.game-card { transition: all 0.25s ease; cursor: pointer; display: flex; flex-direction: column; }
.game-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,0.08); }
/* Hub panel cards use a horizontal (icon-left, text-right) layout,
   overriding the vertical .game-card default from index.html. */
.portal-panel-body .game-card { flex-direction: row; align-items: flex-start; }
/* Card grid: auto-fit instead of fixed 2-col.
   - 1 card fills full panel width (no half-empty grid)
   - narrow panels (1/3 span) stack cards vertically instead of crushing them
   - wide panels use 3+ columns for better space utilization */
.portal-panel-body .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.game-preview { border-radius: 12px 12px 0 0; min-height: 90px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; position: relative; overflow: hidden; }
.game-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.03) 100%); }

/* === Portal layout === */
.portal-layout { display: grid; grid-template-columns: 200px 1fr 200px; gap: 24px; max-width: 1400px; margin: 0 auto; padding: 24px; transition: max-width 0.3s ease; }
.portal-layout.wide { max-width: 1600px; }
.sticky-sidebar { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow-y: auto; }
.toc-link.active { color: #d97706; font-weight: 500; border-left: 2px solid #f59e0b; }

/* === Portal panels === */
.portal-panel { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; }
.portal-panel-header { padding: 10px 16px; font-family: Georgia, serif; font-weight: bold; font-size: 0.95rem; display: flex; align-items: center; justify-content: space-between; }
.portal-panel-body { padding: 16px; }
.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 768px) { .portal-grid { grid-template-columns: 1fr; gap: 16px; } }

/* === News items === */
.news-item-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.news-item-row:last-child { border-bottom: none; align-items: center;}

/* === Share button === */
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; border: 1px solid #e5e7eb; background: #fff; color: #4b5563; transition: all 0.15s; cursor: pointer; }
.share-btn:hover { background: #f9fafb; border-color: #d1d5db; }

/* === Dark mode: portal-specific === */
[data-theme="dark"] .game-card { background: #242424; border-color: #374151; }
[data-theme="dark"] .portal-panel { background: #242424; border-color: #374151; }
[data-theme="dark"] .portal-panel-body { color: #b0b0b0; }
[data-theme="dark"] .news-item-row { border-color: #374151; }
[data-theme="dark"] .bg-gray-200 { background-color: #374151; }
[data-theme="dark"] .share-btn { background: #2d2d2d; border-color: #374151; color: #b0b0b0; }
[data-theme="dark"] .share-btn:hover { background: #374151; }

/* === Portal layout responsive === */
@media (max-width: 1280px) { .portal-layout { grid-template-columns: 200px 1fr; } .portal-right { display: none; } }
@media (max-width: 1024px) { .portal-layout { grid-template-columns: 1fr; } .portal-left, .portal-right { display: none; } }

/* === Mobile appearance dropdown === */
.appearance-panel { background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,0.12); }
[data-theme="dark"] .appearance-panel { background: #242424; border-color: #374151; }
.mobile-appearance-btn { display: none; }
@media (max-width: 1280px) { .mobile-appearance-btn { display: flex; } }

/* === Zone badge === */
.zone-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 9999px; }

/* === Expert owner === */
.expert-owner { display: flex; align-items: center; gap: 12px; }
.expert-avatar { width: 40px; height: 40px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.expert-credential { display: inline-block; font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 4px; background: #f3f4f6; color: #6b7280; }
[data-theme="dark"] .expert-credential { background: #374151; color: #b0b0b0; }

/* === Empty state === */
.empty-state { text-align: center; padding: 48px 24px; border: 2px dashed #e5e7eb; border-radius: 16px; }
[data-theme="dark"] .empty-state { border-color: #374151; }

/* === Cross-zone card === */
.cross-zone-card { display: flex; align-items: center; gap: 12px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; transition: all 0.2s ease; cursor: pointer; }
.cross-zone-card:hover { border-color: #d1d5db; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
[data-theme="dark"] .cross-zone-card { border-color: #374151; }
[data-theme="dark"] .cross-zone-card:hover { border-color: #4b5563; }

/* === Pull quote === */
.pull-quote { font-family: Georgia, serif; font-size: 1.15rem; line-height: 1.6; color: #1f2937; border-left: 4px solid #f59e0b; padding: 12px 0 12px 20px; margin: 24px 0; font-style: italic; }
[data-theme="dark"] .pull-quote { color: #d1d5db; border-color: #f59e0b; }

/* === Zone progress === */
.zone-progress-bar { height: 6px; border-radius: 3px; background: #e5e7eb; overflow: hidden; }
.zone-progress-fill { height: 100%; border-radius: 3px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }

/* === Compare panel === */
.compare-panel { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; margin-bottom: 24px; }
[data-theme="dark"] .compare-panel { background: #1a1a1a; border-color: #374151; }
.compare-checkbox { width: 16px; height: 16px; border: 2px solid #d1d5db; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; }
.compare-checkbox.checked { background: #2563eb; border-color: #2563eb; }
.compare-checkbox.checked::after { content: '✓'; color: #fff; font-size: 10px; font-weight: bold; }
