/* ==========================================================================
   LUCKYDRAW - Responsive Stylesheet
   ========================================================================== */

/* ==========================================================================
   Tablet Landscape (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    /* Header */
    .header-btn-group .btn-demo {
        display: none;
    }

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

    /* Hero */
    .luckydraw-hero {
        padding: 60px 0 40px;
        min-height: 420px;
    }

    .hero-brand {
        font-size: 2.8rem;
    }

    .hero-tagline {
        font-size: 1.3rem;
    }

    .hero-wheel-decoration {
        right: -120px;
        opacity: 0.1;
    }

    .hero-mini-wheel {
        width: 280px;
        height: 280px;
    }

    /* Wheel Section */
    .wheel-showcase {
        flex-direction: column;
        gap: 30px;
    }

    .spin-wheel {
        width: 340px;
        height: 340px;
    }

    .wheel-info-panel {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

    /* Draw Types */
    .draw-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Promos */
    .promos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Gift Boxes */
    .gift-boxes-row {
        gap: 20px;
    }

    .gift-box {
        min-width: 200px;
    }

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

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

    /* Footer */
    .footer-columns-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Content Area */
    .content-area {
        flex-direction: column;
    }
}

/* ==========================================================================
   Tablet Portrait (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Header */
    .header-top {
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-time {
        display: none;
    }

    .header-btn-group .btn-login,
    .header-btn-group .btn-register {
        padding: 7px 14px;
        font-size: 0.8rem;
    }

    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #1a1a2e;
        z-index: 100;
        box-shadow: var(--shadow-lg);
    }

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

    .nav-link {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .nav-link::after {
        display: none;
    }

    .has-dropdown > .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0,0,0,0.2);
    }

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

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

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

    .hero-description {
        font-size: 0.95rem;
    }

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

    .hero-stat {
        min-width: 110px;
    }

    .hero-stat-number {
        font-size: 1.6rem;
    }

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

    .hero-cta-group .btn-rainbow-primary,
    .hero-cta-group .btn-rainbow-outline {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .hero-wheel-decoration {
        display: none;
    }

    /* Section Titles */
    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    /* Spin Wheel */
    .spin-wheel {
        width: 280px;
        height: 280px;
    }

    .spin-btn {
        width: 65px;
        height: 65px;
        font-size: 0.95rem;
    }

    .wheel-pointer {
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-top: 24px solid var(--rainbow-red);
    }

    .wheel-label span {
        font-size: 0.7rem;
    }

    .wheel-info-panel {
        grid-template-columns: 1fr;
    }

    /* Gift Boxes */
    .gift-boxes-row {
        flex-direction: column;
        align-items: center;
    }

    .gift-box {
        min-width: 100%;
        max-width: 300px;
    }

    .gift-box-wrapper {
        width: 160px;
        height: 160px;
    }

    .gift-box-body {
        height: 120px;
    }

    /* Draw Types */
    .draw-types-grid {
        grid-template-columns: 1fr;
    }

    .draw-type-card {
        max-width: 500px;
        margin: 0 auto;
    }

    /* Winners */
    .winner-item {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 15px;
    }

    .winner-game {
        width: 100%;
        text-align: left;
        margin-left: 60px;
    }

    .winners-scroll-container {
        max-height: 380px;
    }

    /* Promos */
    .promos-grid {
        grid-template-columns: 1fr;
    }

    .promo-card {
        max-width: 500px;
        margin: 0 auto;
    }

    /* Footer CTA */
    .footer-cta-title {
        font-size: 1.5rem;
    }

    .footer-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-cta-buttons .btn-rainbow-primary,
    .footer-cta-buttons .btn-rainbow-outline {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

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

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

    .footer-col {
        text-align: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-social-links {
        justify-content: center;
    }

    .footer-18plus {
        margin: 0 auto 15px;
        display: flex;
    }

    .license-icons {
        gap: 10px;
    }

    .license-item {
        padding: 6px 10px;
    }

    /* Article */
    .article-grid {
        grid-template-columns: 1fr;
    }

    .single-article {
        padding: 20px;
    }

    .article-title {
        font-size: 1.4rem;
    }

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

    /* Sidebar */
    .floating-sidebar {
        right: 5px;
    }

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

    /* Provider Tabs */
    .provider-tabs {
        padding: 10px;
        gap: 6px;
    }

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

    /* Category */
    .category-title {
        font-size: 1.4rem;
    }

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

    .page-title {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Mobile (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    /* Header */
    .logo img {
        height: 38px;
    }

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

    .header-btn-group .btn-login,
    .header-btn-group .btn-register {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* Hero */
    .hero-brand {
        font-size: 1.8rem;
    }

    .hero-tagline {
        font-size: 0.95rem;
    }

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

    .hero-stat {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: auto;
    }

    .hero-stat-number {
        font-size: 1.4rem;
    }

    /* Spin Wheel */
    .spin-wheel {
        width: 240px;
        height: 240px;
    }

    .spin-btn {
        width: 55px;
        height: 55px;
        font-size: 0.85rem;
    }

    .wheel-label span {
        font-size: 0.6rem;
    }

    /* Gift Boxes */
    .gift-box-wrapper {
        width: 140px;
        height: 140px;
    }

    .gift-box-body {
        height: 105px;
    }

    .gift-box-lid {
        height: 40px;
    }

    .prize-amount {
        font-size: 1rem;
    }

    /* Winners */
    .winner-avatar {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .winner-name {
        font-size: 0.85rem;
    }

    .prize-badge {
        font-size: 0.8rem;
        padding: 4px 10px;
    }

    .winner-game {
        font-size: 0.75rem;
        margin-left: 53px;
    }

    /* Footer CTA */
    .footer-cta-title {
        font-size: 1.3rem;
    }

    .footer-cta-desc {
        font-size: 0.95rem;
    }

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

    .article-title {
        font-size: 1.2rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 8px;
    }

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

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

    /* Footer */
    .footer-rainbow-bar {
        margin-bottom: 25px;
    }

    .license-icons {
        flex-direction: column;
        align-items: center;
    }

    /* Notification Bar */
    .notification-content span {
        padding: 0 20px;
        font-size: 0.8rem;
    }

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

    .announcement-title {
        font-size: 1.1rem;
    }

    .announcement-item {
        padding: 10px;
    }

    /* Sidebar */
    .floating-sidebar {
        right: 3px;
        gap: 5px;
    }

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

    /* Buttons */
    .btn-rainbow-primary,
    .btn-rainbow-outline,
    .btn-rainbow {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 14px 30px;
        font-size: 1rem;
    }

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

    .page-title {
        font-size: 1.3rem;
    }

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

/* ==========================================================================
   Small Mobile (max-width: 360px)
   ========================================================================== */
@media (max-width: 360px) {
    .hero-brand {
        font-size: 1.5rem;
    }

    .hero-tagline {
        font-size: 0.85rem;
    }

    .spin-wheel {
        width: 200px;
        height: 200px;
    }

    .spin-btn {
        width: 45px;
        height: 45px;
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .footer-cta-title {
        font-size: 1.1rem;
    }
}

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

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
    }
}

/* === Mobile Optimization Additions === */
@media (max-width: 768px) {
  .nav-link, .btn-login, .btn-register, .btn-demo,
  a, button, .sidebar-btn {
    min-height: 44px;
    min-width: 44px;
  }
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  body {
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
  }
  img {
    max-width: 100%;
    height: auto;
  }
  .site-footer {
    padding-bottom: env(safe-area-inset-bottom, 20px);
  }
  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
  .article-card {
    margin-bottom: 20px;
  }
  .content-area {
    padding: 10px;
  }
}
@media (max-width: 360px) {
  .container {
    padding: 0 10px;
  }
  h1, .hero-title {
    font-size: 24px !important;
  }
  h2 {
    font-size: 20px !important;
  }
}
