/* ============================================
   MEGABALL THEME - responsive.css (moban-112)
   Mega Lottery Ball Draw Theme - Responsive Styles
   ============================================ */

/* === TABLET LANDSCAPE (max-width: 1200px) === */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }

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

    .draw-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .ball-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-brand {
        font-size: 44px;
    }

    .hero-tagline {
        font-size: 18px;
    }

    .mega-ball {
        width: 65px;
        height: 65px;
        font-size: 22px;
    }

    .mega-ball.mega-ball-center {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }

    .nav-link {
        padding: 12px 14px;
        font-size: 12px;
    }
}

/* === TABLET PORTRAIT (max-width: 1024px) === */
@media (max-width: 1024px) {
    .ball-star-games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .ball-promos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .home-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

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

    .content-area {
        flex-direction: column;
    }

    .floating-sidebar {
        position: fixed;
        right: 10px;
        top: auto;
        bottom: 15px;
        transform: none;
        flex-direction: row;
        gap: 6px;
    }

    .sidebar-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .hero-brand {
        font-size: 38px;
        letter-spacing: 2px;
    }

    .hero-tagline {
        font-size: 16px;
        letter-spacing: 2px;
    }

    .section-title {
        font-size: 26px;
    }

    .megaball-hero {
        min-height: 500px;
        padding: 60px 0 40px;
    }

    .ball-machine-bg {
        width: 400px;
        height: 400px;
    }

    .machine-glow-ring.ring-1 {
        width: 240px;
        height: 240px;
        margin: -120px 0 0 -120px;
    }

    .machine-glow-ring.ring-2 {
        width: 320px;
        height: 320px;
        margin: -160px 0 0 -160px;
    }

    .machine-glow-ring.ring-3 {
        width: 400px;
        height: 400px;
        margin: -200px 0 0 -200px;
    }

    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ball-grid-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .draw-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === LARGE MOBILE (max-width: 768px) === */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .header-top {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 0;
    }

    .logo img {
        height: 40px;
    }

    .header-time {
        display: none;
    }

    .header-btn-group {
        gap: 6px;
    }

    .btn-login,
    .btn-register,
    .btn-demo {
        padding: 6px 14px;
        font-size: 11px;
    }

    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
        padding: 10px 0;
    }

    .main-navigation .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(180deg, #0d2240, #0a1628);
        border-top: 1px solid rgba(255, 215, 0, 0.1);
        z-index: 9998;
        max-height: 70vh;
        overflow-y: auto;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-item {
        border-bottom: 1px solid rgba(21, 101, 192, 0.1);
    }

    .nav-link {
        padding: 14px 20px;
        font-size: 14px;
        border-bottom: none;
    }

    .nav-link:hover {
        border-bottom: none;
        background: rgba(21, 101, 192, 0.15);
    }

    /* Hero */
    .megaball-hero {
        min-height: 450px;
        padding: 40px 0 30px;
    }

    .hero-brand {
        font-size: 32px;
        letter-spacing: 2px;
    }

    .hero-tagline {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .hero-description {
        font-size: 14px;
        padding: 0 10px;
    }

    .hero-stats-row {
        gap: 20px;
    }

    .hero-stat-number {
        font-size: 24px;
    }

    .hero-stat-label {
        font-size: 11px;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn-gold-primary,
    .btn-outline-gold {
        padding: 12px 30px;
        font-size: 14px;
        width: 80%;
        text-align: center;
    }

    .mega-ball-container {
        gap: 10px;
    }

    .mega-ball {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .mega-ball.mega-ball-center {
        width: 65px;
        height: 65px;
        font-size: 22px;
    }

    .ball-shine {
        top: 5px;
        left: 10px;
        width: 14px;
        height: 8px;
    }

    /* Grids */
    .ball-star-games-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .ball-promos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .home-news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .article-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .ball-grid-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .draw-features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .ball-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Sections */
    .section-title {
        font-size: 22px;
        letter-spacing: 1px;
    }

    .section-subtitle {
        font-size: 13px;
        margin-bottom: 25px;
    }

    .ball-star-games,
    .ball-grid-section,
    .draw-features,
    .ball-stats,
    .ball-promos,
    .home-news-section {
        padding: 40px 0;
    }

    /* Footer */
    .footer-columns-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .site-footer {
        padding: 30px 0 20px;
    }

    .footer-license-bar {
        padding: 20px 0;
    }

    .license-icons {
        gap: 15px;
    }

    .license-item i {
        font-size: 22px;
    }

    .license-item span {
        font-size: 10px;
    }

    /* Notification Bar */
    .notification-content span {
        font-size: 12px;
    }

    /* Single Article */
    .single-article {
        padding: 20px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-meta {
        gap: 10px;
        font-size: 12px;
    }

    .article-content {
        font-size: 15px;
    }

    .article-nav {
        flex-direction: column;
        gap: 15px;
    }

    .article-nav-prev,
    .article-nav-next {
        max-width: 100%;
    }

    /* Page */
    .page-article {
        padding: 20px;
    }

    .page-title {
        font-size: 22px;
    }

    /* CTA Section */
    .footer-cta-section {
        padding: 50px 0;
    }

    .footer-cta-inner h2 {
        font-size: 26px;
        letter-spacing: 1px;
    }

    .footer-cta-inner p {
        font-size: 14px;
    }

    .cta-features {
        flex-direction: column;
        gap: 10px;
    }

    .cta-main-btn {
        font-size: 15px;
        padding: 14px 35px;
    }

    /* Error page */
    .error-code {
        font-size: 70px;
    }

    .error-title {
        font-size: 20px;
    }

    .error-mega-ball {
        width: 70px;
        height: 70px;
    }

    /* Category */
    .category-title {
        font-size: 24px;
    }

    .provider-tabs {
        gap: 6px;
    }

    .provider-tab {
        padding: 6px 14px;
        font-size: 12px;
    }

    /* Pagination */
    .pagination .page-numbers {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    /* Announcement Modal */
    .announcement-content {
        padding: 25px;
        width: 95%;
    }

    .announcement-title {
        font-size: 18px;
    }

    .announcement-item {
        padding: 10px 12px;
        gap: 8px;
    }

    .announcement-text {
        font-size: 12px;
    }

    .announcement-cta {
        padding: 10px 30px;
        font-size: 14px;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 12px;
        padding: 10px 0;
    }

    /* Sidebar */
    .floating-sidebar {
        bottom: 10px;
        right: 8px;
    }

    .sidebar-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* === SMALL MOBILE (max-width: 480px) === */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    .header-top {
        justify-content: center;
    }

    .header-btn-group {
        width: 100%;
        justify-content: center;
    }

    .btn-login,
    .btn-register,
    .btn-demo {
        padding: 5px 10px;
        font-size: 10px;
    }

    /* Hero */
    .megaball-hero {
        min-height: 380px;
        padding: 30px 0 20px;
    }

    .hero-brand {
        font-size: 26px;
    }

    .hero-tagline {
        font-size: 12px;
    }

    .hero-description {
        font-size: 13px;
    }

    .hero-stats-row {
        gap: 15px;
    }

    .hero-stat-number {
        font-size: 20px;
    }

    .mega-ball {
        width: 42px;
        height: 42px;
        font-size: 14px;
    }

    .mega-ball.mega-ball-center {
        width: 55px;
        height: 55px;
        font-size: 18px;
    }

    .mega-ball-container {
        gap: 6px;
    }

    .ball-machine-bg {
        width: 300px;
        height: 300px;
    }

    .machine-glow-ring.ring-1 {
        width: 180px;
        height: 180px;
        margin: -90px 0 0 -90px;
    }

    .machine-glow-ring.ring-2 {
        width: 240px;
        height: 240px;
        margin: -120px 0 0 -120px;
    }

    .machine-glow-ring.ring-3 {
        width: 300px;
        height: 300px;
        margin: -150px 0 0 -150px;
    }

    /* Sections */
    .section-title {
        font-size: 18px;
    }

    .ball-star-game-card {
        padding: 20px;
    }

    .ball-star-game-icon {
        font-size: 30px;
    }

    .ball-star-game-card h3 {
        font-size: 18px;
    }

    .ball-grid-node {
        padding: 18px;
    }

    .ball-node-icon {
        font-size: 28px;
    }

    .ball-node-label {
        font-size: 12px;
    }

    .draw-feature-card {
        padding: 20px;
    }

    .draw-feature-icon {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .draw-feature-card h3 {
        font-size: 16px;
    }

    .stat-number {
        font-size: 32px;
    }

    .stat-label {
        font-size: 11px;
    }

    .ball-promo-inner {
        padding: 20px;
    }

    .ball-promo-inner h3 {
        font-size: 16px;
    }

    .promo-icon {
        font-size: 30px;
    }

    /* Article cards */
    .article-card-thumb {
        height: 140px;
    }

    .article-card-title {
        padding: 12px 15px 6px;
        font-size: 14px;
    }

    .article-card-meta {
        padding: 0 15px;
    }

    .article-card-excerpt {
        padding: 0 15px 12px;
        font-size: 12px;
    }

    .article-card-more {
        padding: 10px 15px;
    }

    /* Footer CTA */
    .footer-cta-section {
        padding: 40px 0;
    }

    .cta-mega-ball {
        width: 60px;
        height: 60px;
    }

    .footer-cta-inner h2 {
        font-size: 22px;
    }

    .footer-cta-inner p {
        font-size: 13px;
    }

    .cta-main-btn {
        font-size: 14px;
        padding: 12px 28px;
    }

    /* Footer */
    .footer-col h4 {
        font-size: 14px;
    }

    .footer-col ul li a {
        font-size: 12px;
    }

    .footer-18plus {
        width: 35px;
        height: 35px;
        line-height: 31px;
        font-size: 14px;
    }

    /* Single */
    .single-article {
        padding: 15px;
    }

    .article-title {
        font-size: 20px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-item-thumb {
        height: 80px;
    }

    .related-item-title {
        font-size: 12px;
    }

    /* Error */
    .error-page {
        padding: 50px 15px;
    }

    .error-code {
        font-size: 56px;
    }

    .error-title {
        font-size: 18px;
    }

    .error-mega-ball {
        width: 60px;
        height: 60px;
    }

    /* Announcement */
    .announcement-content {
        padding: 20px 15px;
    }

    .announcement-header-icon i {
        font-size: 36px;
    }

    .announcement-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .announcement-list {
        gap: 8px;
    }

    .announcement-badge {
        font-size: 9px;
        padding: 2px 8px;
    }

    /* Category */
    .category-header {
        padding: 20px 0;
    }

    .category-title {
        font-size: 20px;
    }

    .provider-tabs {
        gap: 4px;
    }

    .provider-tab {
        padding: 5px 10px;
        font-size: 11px;
    }

    /* Ball grid */
    .ball-grid-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .ball-grid-node {
        padding: 15px;
    }

    /* Notification */
    .notification-bar {
        padding: 6px 0;
    }

    .notification-content {
        gap: 30px;
    }

    .notification-content span {
        font-size: 11px;
    }

    /* View more */
    .view-more-btn {
        max-width: 180px;
        padding: 10px 20px;
        font-size: 12px;
    }

    /* Floating sidebar small */
    .floating-sidebar {
        bottom: 8px;
        right: 5px;
        gap: 4px;
    }

    .sidebar-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    /* Pagination */
    .pagination {
        gap: 5px;
    }

    .pagination .page-numbers {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }

    /* Stats section */
    .ball-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .ball-stat-card {
        padding: 20px;
    }

    /* DMCA and disclaimer */
    .footer-disclaimer {
        padding: 15px 10px !important;
        font-size: 11px !important;
    }
}

/* === EXTRA SMALL MOBILE (max-width: 360px) === */
@media (max-width: 360px) {
    .hero-brand {
        font-size: 22px;
    }

    .hero-tagline {
        font-size: 11px;
    }

    .mega-ball {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .mega-ball.mega-ball-center {
        width: 46px;
        height: 46px;
        font-size: 16px;
    }

    .hero-stats-row {
        gap: 10px;
    }

    .hero-stat-number {
        font-size: 18px;
    }

    .hero-stat-label {
        font-size: 9px;
    }

    .section-title {
        font-size: 16px;
    }

    .ball-grid-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .ball-grid-node {
        padding: 12px;
    }

    .ball-node-icon {
        font-size: 22px;
    }

    .ball-node-label {
        font-size: 10px;
    }

    .btn-gold-primary,
    .btn-outline-gold {
        width: 90%;
        padding: 10px 20px;
        font-size: 13px;
    }

    .header-btn-group {
        gap: 4px;
    }

    .btn-login,
    .btn-register,
    .btn-demo {
        padding: 4px 8px;
        font-size: 9px;
    }

    .footer-cta-inner h2 {
        font-size: 18px;
    }

    .cta-mega-ball {
        width: 50px;
        height: 50px;
    }

    .announcement-content {
        padding: 15px 10px;
    }

    .announcement-title {
        font-size: 14px;
    }
}

/* === LANDSCAPE ORIENTATION (max-height: 500px) === */
@media (max-height: 500px) and (orientation: landscape) {
    .megaball-hero {
        min-height: 300px;
        padding: 20px 0;
    }

    .mega-ball-container {
        margin-bottom: 20px;
    }

    .mega-ball {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .mega-ball.mega-ball-center {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .hero-brand {
        font-size: 28px;
    }

    .hero-cta-group {
        margin-top: 15px;
    }

    .announcement-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    .floating-sidebar {
        flex-direction: column;
        right: 5px;
    }
}

/* === PRINT STYLES === */
@media print {
    .site-header,
    .floating-sidebar,
    .announcement-modal,
    .notification-bar,
    .site-footer,
    .footer-disclaimer {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .single-article {
        background: white;
        border: none;
        padding: 0;
    }

    .article-title {
        color: black;
    }

    .article-content {
        color: black;
    }

    a {
        color: #1565C0;
        text-decoration: underline;
    }
}

/* === HIGH DPI / RETINA DISPLAYS === */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .mega-ball {
        -webkit-font-smoothing: antialiased;
    }

    .ball-shine {
        opacity: 0.7;
    }
}

/* === REDUCED MOTION PREFERENCE === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* === DARK MODE PREFERENCE (already dark, just ensure consistency) === */
@media (prefers-color-scheme: dark) {
    body {
        background: #0a1628;
        color: #d8e2f0;
    }
}

/* === LARGE DESKTOP (min-width: 1400px) === */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-brand {
        font-size: 64px;
    }

    .hero-tagline {
        font-size: 26px;
    }

    .mega-ball {
        width: 90px;
        height: 90px;
        font-size: 32px;
    }

    .mega-ball.mega-ball-center {
        width: 115px;
        height: 115px;
        font-size: 42px;
    }

    .section-title {
        font-size: 38px;
    }

    .ball-star-games-grid {
        gap: 30px;
    }

    .draw-features-grid {
        gap: 30px;
    }
}

/* === ULTRA WIDE (min-width: 1920px) === */
@media (min-width: 1920px) {
    .container {
        max-width: 1440px;
    }

    .hero-brand {
        font-size: 72px;
    }

    .megaball-hero {
        min-height: 700px;
    }

    .mega-ball {
        width: 100px;
        height: 100px;
        font-size: 36px;
    }

    .mega-ball.mega-ball-center {
        width: 130px;
        height: 130px;
        font-size: 48px;
    }
}
