/* CSS nền dùng chung cho giao diện mới và Mega 6/45. */
:root {
    --primary: #0D1B2A;
    --primary-light: #1B3A5C;
    --secondary: #2E86AB;
    --accent: #D4A017;
    --accent-light: #F5D060;
    --success: #28A745;
    --danger: #DC3545;
    --bg: #F4F6F9;
    --card: #FFFFFF;
    --text: #333333;
    --text-light: #6B7280;
    --border: #E5E7EB;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== NAVBAR ===== */
.navbar-main {
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(20px);
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
    z-index: 1050;
}
.navbar-main.scrolled {
    background: rgba(13, 27, 42, 0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.navbar-main .navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-main .navbar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 900;
}
.navbar-main .nav-link {
    color: rgba(255,255,255,0.75) !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.75rem 1rem !important;
    transition: var(--transition);
    position: relative;
}
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
    color: var(--accent) !important;
}
.navbar-main .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}
.navbar-main .nav-link:hover::after {
    width: 60%;
}
.navbar-toggler {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 4px 8px;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.dropdown-menu {
    background: var(--primary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
}
.dropdown-item {
    color: rgba(255,255,255,0.75);
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
}
.dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: var(--accent);
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #1a4a6e 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212,160,23,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(46,134,171,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
.hero-title span {
    color: var(--accent);
}
.hero-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212,160,23,0.15);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(212,160,23,0.2);
}
.hero-badge i { font-size: 0.7rem; }

/* ===== LOTTERY BALLS ===== */
.ball {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
    position: relative;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.ball:hover { transform: scale(1.1); }
.ball-main {
    background: linear-gradient(145deg, #F5D060 0%, #D4A017 50%, #B8860B 100%);
    box-shadow: 0 4px 15px rgba(212,160,23,0.3), inset 0 -2px 4px rgba(0,0,0,0.1), inset 0 2px 4px rgba(255,255,255,0.3);
}
.ball-power {
    background: linear-gradient(145deg, #FF6B6B 0%, #DC3545 50%, #B02A37 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(220,53,69,0.3), inset 0 -2px 4px rgba(0,0,0,0.1), inset 0 2px 4px rgba(255,255,255,0.3);
}
.ball-sm {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
}
.ball-lg {
    width: 60px;
    height: 60px;
    font-size: 1.4rem;
}
.balls-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.ball-divider {
    width: 2px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    margin: 0 8px;
}

/* ===== STATS CARDS ===== */
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
}
.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ===== SECTION ===== */
.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.section-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* ===== PREDICTION CARD ===== */
.prediction-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius);
    padding: 30px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.prediction-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(212,160,23,0.1);
    border-radius: 50%;
}
.prediction-card .pred-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.prediction-card .pred-subtitle {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.5rem;
}
.prediction-card .pred-numbers {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.prediction-card .pred-ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid rgba(212,160,23,0.4);
    transition: var(--transition);
}
.prediction-card .pred-ball:hover {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}
.prediction-card .pred-note {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

/* ===== ARTICLE CARD ===== */
.article-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    height: 100%;
}
.article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.article-card .article-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.article-card .article-body {
    padding: 16px;
}
.article-card .article-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card .article-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card .article-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 10px;
    transition: var(--transition);
}
.article-card .article-link:hover { color: var(--accent); }

/* ===== FOOTER ===== */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 0;
    margin-top: 60px;
}
.footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
    display: block;
    padding: 3px 0;
}
.footer a:hover { color: var(--accent); padding-left: 4px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 0.82rem;
}
.footer-bottom a { display: inline; padding: 0; }

/* ===== UTILITY ===== */
.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--primary);
    border: none;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 50px;
    transition: var(--transition);
}
.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212,160,23,0.3);
    color: var(--primary);
}
.btn-outline-light {
    border-radius: 50px;
    font-weight: 600;
    padding: 10px 24px;
}
.badge-latest {
    background: var(--success);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.glow-accent {
    animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
    from { box-shadow: 0 0 5px rgba(212,160,23,0.3); }
    to { box-shadow: 0 0 20px rgba(212,160,23,0.5); }
}

/* ===== CTA BOX ===== */
.btn-cta {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--primary);
    border: none;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 50px;
    transition: var(--transition);
    font-size: 1.05rem;
}
.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212,160,23,0.4);
    color: var(--primary);
}

/* ===== RESPONSIVE ===== */

/* Tablet (max 992px) */
@media (max-width: 992px) {
    .hero { padding: 60px 0 40px; }
    .hero-title { font-size: 2rem; }
    .hero-badge { font-size: 0.72rem; }
    .section-header { flex-wrap: wrap; gap: 8px; }
    .section-header .btn { font-size: 0.8rem; padding: 8px 16px; }
    .navbar-main .nav-link { font-size: 0.82rem; padding: 0.5rem 0.75rem !important; }
    .prediction-card .pred-ball { width: 42px; height: 42px; font-size: 0.95rem; }
    .stat-card { padding: 16px; }
    .stat-card .stat-value { font-size: 1.3rem; }
}

/* Mobile large (max 768px) */
@media (max-width: 768px) {
    .hero { padding: 40px 0 24px; }
    .hero-title { font-size: 1.5rem; }
    .hero-subtitle { font-size: 0.9rem; margin-bottom: 1.2rem; }
    .hero .stat-card { padding: 14px; }
    .ball { width: 40px; height: 40px; font-size: 0.95rem; }
    .ball-lg { width: 44px; height: 44px; font-size: 1.1rem; }
    .ball-sm { width: 32px; height: 32px; font-size: 0.82rem; }
    .section-title { font-size: 1.2rem; }
    .section-subtitle { font-size: 0.85rem; }
    .section-header { margin-bottom: 1rem; }
    .prediction-card { padding: 20px; }
    .prediction-card .pred-title { font-size: 1rem; }
    .prediction-card .pred-ball { width: 38px; height: 38px; font-size: 0.85rem; }
    .article-card .article-img { height: 120px; }
    .footer { padding: 30px 0 0; margin-top: 30px; }
    .footer-title { font-size: 0.9rem; margin-bottom: 12px; }
    .footer a { font-size: 0.8rem; }
    .navbar-main .navbar-brand { font-size: 1rem; }
    .navbar-main .navbar-brand .brand-icon { width: 32px; height: 32px; font-size: 0.9rem; }
}

/* Mobile nhỏ (max 576px) */
@media (max-width: 576px) {
    .hero { padding: 30px 0 20px; }
    .hero-title { font-size: 1.25rem; }
    .hero-subtitle { font-size: 0.82rem; margin-bottom: 1rem; }
    .hero .container { padding-left: 12px; padding-right: 12px; }
    .hero-badge { font-size: 0.65rem; padding: 4px 10px; }
    .hero-badge i { font-size: 0.5rem; }
    .hero .btn { font-size: 0.8rem; padding: 8px 16px; width: 100%; }
    .hero .d-flex.gap-3 { flex-direction: column; gap: 8px !important; }
    .stat-card { padding: 12px; border-radius: 10px; }
    .stat-card .stat-icon { width: 36px; height: 36px; font-size: 0.9rem; margin-bottom: 8px; }
    .stat-card .stat-value { font-size: 1.1rem; }
    .stat-card .stat-label { font-size: 0.7rem; }
    .ball { width: 34px; height: 34px; font-size: 0.82rem; }
    .ball-lg { width: 38px; height: 38px; font-size: 0.95rem; }
    .ball-sm { width: 26px; height: 26px; font-size: 0.7rem; }
    .balls-container { gap: 4px; }
    .ball-divider { height: 28px; margin: 0 4px; }
    .section-title { font-size: 1.05rem; }
    .section-subtitle { font-size: 0.8rem; }
    .section-header .btn { font-size: 0.72rem; padding: 6px 12px; }
    .prediction-card { padding: 16px; border-radius: 10px; }
    .prediction-card .pred-title { font-size: 0.9rem; }
    .prediction-card .pred-subtitle { font-size: 0.78rem; margin-bottom: 1rem; }
    .prediction-card .pred-ball { width: 34px; height: 34px; font-size: 0.78rem; }
    .prediction-card .pred-note { font-size: 0.72rem; }
    .prediction-card .pred-numbers { gap: 6px; }
    .prediction-card .btn { width: 100%; }
    .article-card .article-img { height: 100px; }
    .article-card .article-body { padding: 10px; }
    .article-card .article-title { font-size: 0.85rem; }
    .article-card .article-desc { font-size: 0.75rem; -webkit-line-clamp: 2; }
    .badge-latest { font-size: 0.6rem; padding: 2px 6px; }
    .footer { padding: 24px 0 0; margin-top: 20px; }
    .footer-title { font-size: 0.85rem; margin-bottom: 10px; }
    .footer a { font-size: 0.78rem; padding: 4px 0; }
    .footer-bottom { font-size: 0.75rem; margin-top: 20px; }
    img.img-fluid.rounded { margin: 8px 0; }
    .container-fluid.py-3 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
    .py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .d-flex.gap-3 { gap: 6px !important; }
    .row.g-4 > * { padding-top: 0.75rem; }
    .hero .row.g-3 { margin: 0; }
    .hero .row.g-3 > * { padding: 4px; }
    .hero .col-6 .stat-card { padding: 10px; }
    .navbar-main .navbar-brand { font-size: 0.9rem; }
    .navbar-main .navbar-brand .brand-icon { width: 28px; height: 28px; font-size: 0.8rem; border-radius: 8px; }
    .navbar-toggler { font-size: 0.8rem; padding: 2px 6px; }
    .btn { white-space: normal; word-break: break-word; }
    a, button, .btn { touch-action: manipulation; }
    .dropdown-item { padding: 0.6rem 1rem; }
    .btn-cta { font-size: 0.9rem; padding: 12px 20px; width: 100%; }
    .cta-box { padding: 20px 16px !important; }
    .cta-box p:first-child { font-size: 0.85rem !important; }
}
