/* =========================================================
   Màn hình dưới 1100px
========================================================= */

@media (max-width: 1100px) {
    .main-nav {
        gap: 2px;
    }

    .main-nav__link {
        padding: 0 11px;
    }

    .hero-section__content {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
        gap: 40px;
    }

    .hero-machine {
        width: 285px;
    }

    .hero-visual__ring--one {
        width: 410px;
        height: 410px;
    }

    .hero-visual__ring--two {
        width: 320px;
        height: 320px;
    }

    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-footer__grid {
        grid-template-columns: 1.2fr repeat(3, minmax(130px, 0.6fr));
        gap: 28px;
    }
}

/* =========================================================
   Máy tính bảng
========================================================= */

@media (max-width: 900px) {
    :root {
        --header-height: 68px;
    }

    .top-notice__content {
        flex-wrap: wrap;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .top-notice p {
        flex: 1;
        min-width: 220px;
    }

    .main-header__content {
        position: relative;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 20px;
        left: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-large);
        background: rgba(14, 13, 10, 0.98);
        box-shadow: var(--shadow-large);
        backdrop-filter: blur(18px);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav__link {
        justify-content: center;
        min-height: 46px;
    }

    .main-nav__link::after {
        right: 32%;
        left: 32%;
    }

    .mobile-menu-button {
        display: block;
    }

    .header-actions .button {
        display: none;
    }

    .hero-section {
        min-height: auto;
    }

    .hero-section__content {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 80px;
        padding-bottom: 100px;
        text-align: center;
    }

    .hero-copy {
        max-width: 760px;
        margin: 0 auto;
    }

    .hero-copy__description {
        margin-right: auto;
        margin-left: auto;
    }

    .hero-copy__actions {
        justify-content: center;
    }

    .hero-stats {
        max-width: 680px;
        margin-right: auto;
        margin-left: auto;
    }

    .hero-visual {
        min-height: 500px;
    }

    .category-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-banner {
        grid-template-columns: 1fr;
        padding: 50px 40px;
        text-align: center;
    }

    .event-banner__content {
        margin: 0 auto;
    }

    .event-banner p {
        margin-right: auto;
        margin-left: auto;
    }

    .event-banner__visual {
        margin-top: 25px;
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }

    .main-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   Điện thoại lớn
========================================================= */

@media (max-width: 680px) {
    :root {
        --space-10: 52px;
        --space-11: 64px;
    }

    .container {
        width: min(calc(100% - 28px), var(--container-width));
    }

    .top-notice__content {
        justify-content: center;
        text-align: center;
    }

    .top-notice__icon {
        display: none;
    }

    .top-notice p {
        width: 100%;
        flex: auto;
    }

    .server-status {
        margin-left: 0;
    }

    .brand__mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 22px;
    }

    .brand__text strong {
        font-size: 20px;
    }

    .brand__text small {
        display: none;
    }

    .main-header__content {
        gap: 12px;
    }

    .hero-section__content {
        padding-top: 64px;
        padding-bottom: 90px;
    }

    .hero-copy__badge {
        font-size: 11px;
    }

    .hero-copy__title {
        font-size: clamp(42px, 13vw, 62px);
    }

    .hero-copy__description {
        font-size: 16px;
    }

    .hero-copy__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-copy__actions .button {
        width: 100%;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 430px;
    }

    .hero-machine {
        width: 250px;
        padding: 22px 18px 25px;
    }

    .hero-machine__screen {
        min-height: 220px;
    }

    .hero-machine__symbol {
        width: 90px;
        height: 90px;
        font-size: 52px;
    }

    .hero-visual__ring--one {
        width: 330px;
        height: 330px;
    }

    .hero-visual__ring--two {
        width: 270px;
        height: 270px;
    }

    .floating-coin--one {
        left: 5px;
    }

    .floating-coin--two {
        right: 0;
    }

    .floating-coin--three {
        right: 10px;
    }

    .category-section {
        margin-top: -36px;
    }

    .category-list {
        grid-template-columns: 1fr;
    }

    .games-section {
        padding-top: 90px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading--center {
        align-items: center;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .game-card__cover {
        min-height: 260px;
    }

    .event-banner {
        min-height: auto;
        padding: 40px 24px;
        border-radius: var(--radius-large);
    }

    .event-banner h2 {
        font-size: 40px;
    }

    .event-banner p {
        font-size: 16px;
    }

    .event-chest {
        font-size: 135px;
    }

    .guide-card {
        min-height: auto;
        padding: 28px;
    }

    .main-footer__grid {
        grid-template-columns: 1fr;
    }

    .main-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .modal__dialog {
        padding: 34px 22px 26px;
    }

    .toast-container {
        right: 14px;
        bottom: 14px;
        width: calc(100% - 28px);
    }
}

/* =========================================================
   Điện thoại nhỏ
========================================================= */

@media (max-width: 420px) {
    .hero-copy__title {
        font-size: 39px;
    }

    .hero-machine {
        width: 225px;
    }

    .hero-machine__screen {
        min-height: 195px;
    }

    .hero-machine__symbol {
        width: 78px;
        height: 78px;
        font-size: 44px;
    }

    .hero-machine__screen strong {
        font-size: 18px;
    }

    .hero-visual__ring--one {
        width: 285px;
        height: 285px;
    }

    .hero-visual__ring--two {
        width: 230px;
        height: 230px;
    }

    .floating-coin {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .floating-coin--three {
        width: 54px;
        height: 54px;
    }

    .game-card__body {
        align-items: flex-start;
        flex-direction: column;
    }

    .event-banner h2 {
        font-size: 34px;
    }
}

/* =========================================================
   Giảm chuyển động nếu người dùng yêu cầu
========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}