/* ===== BuzzFlow Public Website CSS ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #e94560;
    --primary-dark: #c73650;
    --bg: #fafafa;
    --bg-white: #ffffff;
    --text: #222;
    --text-light: #666;
    --text-muted: #999;
    --border: #eee;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,.12);
    --radius: 12px;
    --max-width: 1200px;
}

body { font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header { background: var(--bg-white); border-bottom: 3px solid var(--primary); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 28px; font-weight: 900; color: var(--primary); letter-spacing: -1px; }
.main-nav { display: flex; gap: 5px; }
.main-nav a { padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; color: var(--text-light); transition: all .2s; }
.main-nav a:hover, .main-nav a.active { background: var(--primary); color: #fff; }
.mobile-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); }

/* ===== Hero Section ===== */
.hero-section { margin-bottom: 40px; }
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 200px 200px; gap: 15px; }
.hero-card { position: relative; border-radius: var(--radius); overflow: hidden; display: block; }
.hero-main { grid-row: 1 / 3; }
.hero-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hero-card:hover .hero-img { transform: scale(1.05); }
.hero-placeholder { background: linear-gradient(135deg, var(--primary), #533483); }
.hero-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 25px; background: linear-gradient(transparent, rgba(0,0,0,.8)); color: #fff; }
.hero-category { display: inline-block; background: var(--primary); padding: 4px 12px; border-radius: 15px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.hero-overlay h2 { font-size: 22px; margin-bottom: 5px; line-height: 1.3; }
.hero-overlay p { font-size: 13px; color: rgba(255,255,255,.8); }
.hero-main .hero-overlay h2 { font-size: 28px; }

/* ===== Section Headers ===== */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 3px solid var(--primary); }
.section-header h1, .section-header h2 { font-size: 24px; }
.section-subtitle { color: var(--text-light); margin-bottom: 20px; }
.see-all { color: var(--primary); font-weight: 600; font-size: 14px; }

/* ===== Content Section ===== */
.content-section { margin-bottom: 40px; }

/* ===== Article Cards Grid ===== */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.article-card { background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all .3s; display: block; }
.article-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-placeholder { background: linear-gradient(135deg, #667eea, #764ba2); }
.card-content { padding: 18px; }
.card-category { display: inline-block; background: rgba(233,69,96,.1); color: var(--primary); padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.card-content h3 { font-size: 17px; margin-bottom: 8px; line-height: 1.3; color: var(--text); }
.card-content p { font-size: 14px; color: var(--text-light); margin-bottom: 10px; }
.card-meta { font-size: 12px; color: var(--text-muted); }

/* ===== Quiz Cards ===== */
.quizzes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.quiz-card { background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all .3s; display: block; border-left: 4px solid var(--primary); }
.quiz-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.quiz-placeholder { background: linear-gradient(135deg, #e94560, #ff6b6b); }
.quiz-badge { display: inline-block; background: var(--primary); color: #fff; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; }
.quiz-meta { display: flex; gap: 15px; font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* ===== Quiz Page ===== */
.quiz-page { max-width: 800px; margin: 0 auto; }
.quiz-header { text-align: center; margin-bottom: 30px; }
.quiz-header h1 { font-size: 30px; margin: 10px 0; }
.quiz-description { color: var(--text-light); font-size: 16px; }
.quiz-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 30px; }
.quiz-hero img { width: 100%; max-height: 400px; object-fit: cover; }
.quiz-container { background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.quiz-progress { background: var(--border); border-radius: 10px; height: 8px; margin-bottom: 15px; overflow: hidden; }
.quiz-progress-bar { height: 100%; background: var(--primary); border-radius: 10px; transition: width .5s ease; }
.quiz-progress-text { display: flex; justify-content: space-between; margin-bottom: 25px; font-size: 14px; color: var(--text-muted); }
.question-text { font-size: 22px; margin-bottom: 20px; text-align: center; }
.question-img { border-radius: var(--radius); margin-bottom: 20px; max-height: 300px; display: block; margin-left: auto; margin-right: auto; }
.answers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer-btn {
    padding: 16px 20px; background: var(--bg); border: 2px solid var(--border); border-radius: 10px;
    font-size: 15px; cursor: pointer; transition: all .2s; font-family: inherit; text-align: left; color: var(--text);
}
.answer-btn:hover:not(:disabled) { border-color: var(--primary); background: rgba(233,69,96,.05); }
.answer-btn.correct { border-color: #4caf50; background: rgba(76,175,80,.1); color: #2e7d32; }
.answer-btn.wrong { border-color: #e94560; background: rgba(233,69,96,.1); color: #c73650; }
.answer-btn:disabled { cursor: default; opacity: .7; }

/* Quiz Results */
.quiz-results { text-align: center; padding: 20px 0; }
.quiz-results h2 { font-size: 28px; margin-bottom: 15px; }
.result-score { font-size: 64px; font-weight: 900; color: var(--primary); margin-bottom: 10px; }
.result-actions { display: flex; gap: 15px; justify-content: center; margin-top: 25px; }

/* ===== Videos Grid (Public) ===== */
.videos-grid-public { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; }
.video-card-public { background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.video-info-public { padding: 15px; }
.video-info-public h3 { font-size: 16px; margin-bottom: 8px; }
.video-info-public p { font-size: 14px; color: var(--text-light); }

/* ===== Facts Grid (Public) ===== */
.facts-grid-public { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.fact-card-public { background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s; }
.fact-card-public:hover { transform: translateY(-3px); }
.fact-img { width: 100%; height: 200px; object-fit: cover; }
.fact-body { padding: 18px; }
.fact-body h3 { font-size: 17px; margin-bottom: 8px; color: var(--primary); }
.fact-body p { font-size: 14px; color: var(--text-light); line-height: 1.6; }
.fact-category-tag { display: inline-block; margin-top: 10px; background: rgba(233,69,96,.1); color: var(--primary); padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; }

/* ===== Article Page ===== */
.article-page { max-width: 800px; margin: 0 auto; }
.article-header { margin-bottom: 25px; }
.article-category { display: inline-block; background: var(--primary); color: #fff; padding: 5px 14px; border-radius: 15px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.article-header h1 { font-size: 34px; line-height: 1.2; margin-bottom: 15px; }
.article-meta { display: flex; gap: 20px; color: var(--text-muted); font-size: 14px; }
.article-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 30px; }
.article-hero img { width: 100%; max-height: 500px; object-fit: cover; }
.article-body { font-size: 17px; line-height: 1.8; color: #333; }
.article-body h2 { font-size: 24px; margin: 30px 0 15px; color: var(--text); }
.article-body h3 { font-size: 20px; margin: 25px 0 10px; color: var(--text); }
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 15px 0 20px 25px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote { border-left: 4px solid var(--primary); padding: 15px 20px; margin: 20px 0; background: rgba(233,69,96,.05); border-radius: 0 8px 8px 0; font-style: italic; }
.article-body img { border-radius: 8px; margin: 15px 0; }
.article-body strong { color: var(--text); }

/* Tags */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0; }
.tag { background: var(--bg); border: 1px solid var(--border); padding: 5px 14px; border-radius: 20px; font-size: 13px; color: var(--text-light); }

/* Share Bar */
.share-bar { display: flex; align-items: center; gap: 12px; padding: 20px 0; margin-top: 20px; border-top: 1px solid var(--border); }
.share-bar span { font-weight: 600; font-size: 14px; color: var(--text-light); }
.share-btn { padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 600; color: #fff; transition: opacity .2s; }
.share-btn:hover { opacity: .8; }
.share-twitter { background: #1da1f2; }
.share-facebook { background: #4267b2; }

/* ===== Buttons ===== */
.btn-main { display: inline-block; padding: 12px 28px; background: var(--primary); color: #fff; border-radius: 8px; font-size: 15px; font-weight: 600; border: none; cursor: pointer; transition: background .2s; text-decoration: none; }
.btn-main:hover { background: var(--primary-dark); }
.btn-secondary { display: inline-block; padding: 12px 28px; background: transparent; color: var(--primary); border: 2px solid var(--primary); border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none; }
.btn-secondary:hover { background: var(--primary); color: #fff; }

/* ===== Not Found ===== */
.not-found { text-align: center; padding: 80px 20px; }
.not-found h1 { font-size: 36px; margin-bottom: 10px; }
.not-found p { color: var(--text-light); margin-bottom: 25px; }

/* ===== Ads ===== */
.ad-container { margin: 25px 0; text-align: center; min-height: 90px; background: var(--bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.ad-quiz { margin: 15px 0; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 15px; margin-top: 30px; padding-top: 20px; }

/* ===== Footer ===== */
.site-footer { background: #1a1a2e; color: #ccc; padding: 50px 0 0; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-grid h4 { color: var(--primary); margin-bottom: 15px; font-size: 18px; }
.footer-grid p { font-size: 14px; line-height: 1.6; color: #999; }
.footer-grid a { display: block; color: #999; font-size: 14px; margin-bottom: 8px; transition: color .2s; }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid #2a2a4a; padding: 15px 0; text-align: center; font-size: 13px; color: #666; }

/* ===== Misc ===== */
.text-muted-public { text-align: center; color: var(--text-muted); padding: 60px 20px; font-size: 16px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .hero-main { grid-row: auto; }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .answers-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .site-header .container { height: 56px; }
    .logo { font-size: 22px; }
    .main-nav { display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--bg-white); flex-direction: column; padding: 10px; box-shadow: var(--shadow); border-top: 1px solid var(--border); }
    .main-nav.open { display: flex; }
    .mobile-toggle { display: block; }
    .articles-grid { grid-template-columns: 1fr; }
    .hero-overlay h2 { font-size: 18px; }
    .hero-main .hero-overlay h2 { font-size: 22px; }
    .article-header h1 { font-size: 24px; }
    .question-text { font-size: 18px; }
    .result-score { font-size: 48px; }
    .videos-grid-public { grid-template-columns: 1fr; }
    .article-meta { flex-direction: column; gap: 5px; }
}
