/* ===========================================================
   Gnlrw — Sunset Glow Theme
   A modern, warm gaming UI built around amber & coral accents.

   Palette
   ──────────────────────────────────────────────────────────
   Base dark         #1c1410  (page background)
   Surface dark      #261a14
   Card surface      #2d1f17
   Card elevated     #382618
   Border subtle     rgba(249, 115, 22, .12)
   Primary           #f97316  (orange-500)
   Primary soft      #fb923c  (orange-400)
   Primary deep      #ea580c  (orange-600)
   Accent gold       #fbbf24  (amber-400)
   Accent rose       #fb7185  (rose-400)
   Text primary      #fef3e2  (warm cream)
   Text secondary    #d6bfa6
   Text muted        #a89484
   =========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    max-width: 660px;
    margin: 0 auto;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
        'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', sans-serif;
    color: #fef3e2;
    line-height: 1.65;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 90% 50% at 50% -10%,
            rgba(249, 115, 22, .18) 0%,
            rgba(249, 115, 22, 0) 60%),
        radial-gradient(ellipse 60% 40% at 100% 100%,
            rgba(251, 113, 133, .08) 0%,
            rgba(251, 113, 133, 0) 70%),
        linear-gradient(180deg, #1c1410 0%, #15100c 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─────── Scrollbar ─────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(28, 20, 16, .4);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f97316, #ea580c);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #fb923c, #f97316);
}

/* ─────── Navbar ─────── */
.gryrf-navbar {
    max-width: 660px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    padding: 0 20px;
    background: linear-gradient(135deg,
        rgba(45, 31, 23, .85) 0%,
        rgba(38, 26, 20, .92) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(249, 115, 22, .14);
    box-shadow:
        0 1px 0 rgba(254, 243, 226, .04) inset,
        0 12px 32px rgba(0, 0, 0, .35),
        0 0 0 1px rgba(249, 115, 22, .04);
    position: sticky;
    top: 0;
    z-index: 50;
}

.gryrf-nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    transition: transform .25s ease;
}
.gryrf-nav-logo:hover {
    transform: translateY(-1px);
}

.gryrf-nav-logo img {
    height: 42px;
    width: 42px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow:
        0 0 0 2px rgba(249, 115, 22, .25),
        0 6px 18px rgba(249, 115, 22, .25);
    transition: transform .3s ease, box-shadow .3s ease;
}
.gryrf-nav-logo:hover img {
    transform: rotate(-4deg) scale(1.05);
    box-shadow:
        0 0 0 2px rgba(251, 146, 60, .45),
        0 8px 22px rgba(249, 115, 22, .4);
}

.gryrf-nav-title-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.gryrf-nav-title {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: .5px;
    background: linear-gradient(135deg, #fef3e2 0%, #fbbf24 50%, #fb923c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.gryrf-nav-subtitle {
    font-size: .66rem;
    color: #a89484;
    letter-spacing: .4px;
    margin-top: 2px;
    font-weight: 500;
}

/* ─────── Menu Icon / Dropdown ─────── */
#nav-open {
    display: block;
    height: 22px;
    filter: brightness(0) invert(1) sepia(1) saturate(6) hue-rotate(350deg);
    opacity: .9;
    transition: transform .2s ease, opacity .2s ease;
}
.gryrf-menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(249, 115, 22, .1);
    border: 1px solid rgba(249, 115, 22, .18);
    cursor: pointer;
    transition: all .2s ease;
}
.gryrf-menu-icon:hover {
    background: rgba(249, 115, 22, .2);
    border-color: rgba(249, 115, 22, .35);
}
.gryrf-menu-icon:hover #nav-open {
    transform: scale(1.08);
}

#nav-close {
    display: none;
    height: 22px;
    filter: brightness(0) invert(1);
}

.gryrf-menu {
    width: 280px;
    flex-direction: column;
    gap: 0;
    background: linear-gradient(180deg,
        rgba(45, 31, 23, .98) 0%,
        rgba(38, 26, 20, .98) 100%);
    backdrop-filter: blur(18px);
    position: absolute;
    align-items: stretch;
    height: auto;
    top: 64px;
    right: 12px;
    padding: 10px 0;
    z-index: 60;
    margin: 0;
    list-style: none;
    display: none;
    border-radius: 16px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(249, 115, 22, .12);
}

.gryrf-menu li {
    position: relative;
}
.gryrf-menu li a {
    font-size: .95rem;
    color: #d6bfa6;
    text-decoration: none;
    font-weight: 500;
    transition: all .25s ease;
    padding: 12px 22px;
    display: block;
    border-left: 3px solid transparent;
    border-radius: 0 12px 12px 0;
    margin: 2px 6px;
}
.gryrf-menu li a:hover {
    color: #fef3e2;
    background: linear-gradient(90deg,
        rgba(249, 115, 22, .18) 0%,
        rgba(249, 115, 22, 0) 100%);
    border-left-color: #f97316;
    padding-left: 26px;
}

.gryrf-menu.open {
    display: flex;
    flex-direction: column;
    animation: menuFadeIn .25s ease-out;
}
.gryrf-menu.open #nav-open {
    display: none;
}
.gryrf-menu.open #nav-close {
    display: block;
}

@keyframes menuFadeIn {
    0% { opacity: 0; transform: translateY(-8px) scale(.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─────── Game Card ─────── */
.gryrf-game-item {
    border-radius: 14px;
    position: relative;
    background: linear-gradient(160deg,
        rgba(45, 31, 23, .9) 0%,
        rgba(38, 26, 20, .95) 100%);
    padding: 10px;
    box-shadow:
        0 1px 0 rgba(254, 243, 226, .04) inset,
        0 4px 14px rgba(0, 0, 0, .3),
        0 0 0 1px rgba(249, 115, 22, .08);
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    overflow: hidden;
}
.gryrf-game-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    pointer-events: none;
    background: linear-gradient(135deg,
        rgba(249, 115, 22, 0) 0%,
        rgba(251, 113, 133, 0) 50%,
        rgba(251, 191, 36, 0) 100%);
    opacity: 0;
    transition: opacity .35s ease;
}
.gryrf-game-item:hover {
    transform: translateY(-4px);
    box-shadow:
        0 1px 0 rgba(254, 243, 226, .05) inset,
        0 18px 38px rgba(249, 115, 22, .18),
        0 0 0 1px rgba(249, 115, 22, .28);
}
.gryrf-game-item:hover::after {
    opacity: .6;
    background: linear-gradient(135deg,
        rgba(249, 115, 22, .06) 0%,
        rgba(251, 113, 133, .04) 50%,
        rgba(251, 191, 36, .05) 100%);
}

.gryrf-game-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.gryrf-game-cover {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}
.gryrf-game-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0) 60%,
        rgba(28, 20, 16, .35) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.gryrf-game-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: transform .4s ease, filter .3s ease;
}
.gryrf-game-cover img:hover {
    transform: scale(1.06);
    filter: saturate(1.15);
}
.gryrf-game-item:hover .gryrf-game-cover::before {
    opacity: 1;
}

.gryrf-game-cover-recommend {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}
.gryrf-game-cover-recommend img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: transform .4s ease;
}
.gryrf-game-cover-recommend img:hover {
    transform: scale(1.06);
}

.gryrf-game-item h3 {
    color: #fef3e2;
    margin: 6px 0;
    font-size: .82rem;
    font-weight: 600;
}
.gryrf-game-item p {
    color: #a89484;
    margin: 0;
    font-size: .85rem;
}

.gryrf-game-info {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    padding: 8px 4px 4px;
}
.gryrf-game-info p:first-child {
    color: #fef3e2;
    font-size: .84rem;
    font-weight: 600;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.gryrf-game-info p:nth-child(2) {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5em;
    max-height: 4.5em;
    font-size: .76rem;
    color: #a89484;
    font-weight: 400;
}
.gryrf-game-info p:last-child {
    font-size: .72rem;
    color: #8a7565;
    font-weight: 500;
    margin-top: 2px;
}

.common-game-right {
    display: flex;
    width: 20%;
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-radius: 8px;
    right: 0;
    justify-content: center;
    align-items: center;
}

/* ─────── Section Containers ─────── */
.gryrf-recomed-div {
    margin: 0 12px;
    border-radius: 14px;
    padding: 4px 0 12px;
}

.gryrf-detail-recomed-div {
    margin: 12px 20px;
    border-radius: 14px;
    padding: 12px 0;
}

.gryrf-common-recommend-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg,
        rgba(45, 31, 23, .95) 0%,
        rgba(56, 38, 24, .95) 100%);
    border-radius: 12px;
    border: 1px solid rgba(249, 115, 22, .1);
    position: relative;
    overflow: hidden;
}
.gryrf-common-recommend-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #f97316, #fb7185);
    border-radius: 4px 0 0 4px;
}
.gryrf-common-recommend-title::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle,
        rgba(249, 115, 22, .12) 0%,
        rgba(249, 115, 22, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}
.gryrf-common-recommend-title p {
    color: #fef3e2;
    font-size: 1.02rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: .3px;
    position: relative;
    z-index: 1;
    padding-left: 8px;
}
.gryrf-common-recommend-title img {
    width: 18px;
    height: 18px;
    opacity: .65;
    transition: all .2s ease;
    filter: brightness(0) invert(1) sepia(1) saturate(6) hue-rotate(350deg);
    cursor: pointer;
    position: relative;
    z-index: 1;
}
.gryrf-common-recommend-title img:hover {
    opacity: 1;
    transform: translateX(2px);
}

/* ─────── Grid Layouts ─────── */
.gryrf-common-recommend-content {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}
.gryrf-common-recommend-content-2 {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
}
.gryrf-game-big-2 {
    grid-column: span 2;
    grid-row: span 2;
}
.game-big-3 {
    grid-column: span 3;
    grid-row: span 3;
}

/* ─────── Footer ─────── */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px 32px;
    background: linear-gradient(180deg,
        rgba(28, 20, 16, .4) 0%,
        rgba(21, 16, 12, .95) 100%);
    text-align: center;
    margin-top: 48px;
    border-top: 1px solid rgba(249, 115, 22, .12);
    position: relative;
}
footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent, #f97316, transparent);
}

.gryrf-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-bottom: 14px;
}
.gryrf-footer-links a {
    font-size: .78rem;
    color: #8a7565;
    text-decoration: none;
    transition: color .25s ease;
    position: relative;
}
.gryrf-footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: #f97316;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}
.gryrf-footer-links a:hover {
    color: #fb923c;
}
.gryrf-footer-links a:hover::after {
    transform: scaleX(1);
}

footer .gryrf-copyright {
    font-size: .75rem;
    color: #6a5645;
    margin: 8px 0 0;
    letter-spacing: .3px;
}

/* ─────── Floating Buttons ─────── */
#back-top,
#back-home {
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all .25s ease;
    filter: brightness(0) invert(1) sepia(1) saturate(6) hue-rotate(350deg);
    opacity: .85;
    padding: 8px;
    background: rgba(45, 31, 23, .7);
    border-radius: 50%;
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, .2),
        0 6px 16px rgba(0, 0, 0, .35);
    backdrop-filter: blur(8px);
    box-sizing: content-box;
}
#back-top:hover,
#back-home:hover {
    opacity: 1;
    transform: scale(1.08);
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, .4),
        0 8px 22px rgba(249, 115, 22, .3);
    background: rgba(249, 115, 22, .2);
}

#flow {
    position: fixed;
    bottom: 96px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 4px;
    z-index: 100;
    transition: opacity .3s ease;
}

/* ─────── Game Detail ─────── */
.gryrf-game-detail-title {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 24px;
    background: linear-gradient(160deg,
        rgba(45, 31, 23, .92) 0%,
        rgba(38, 26, 20, .95) 100%);
    border-radius: 18px;
    box-shadow:
        0 1px 0 rgba(254, 243, 226, .05) inset,
        0 12px 32px rgba(0, 0, 0, .35),
        0 0 0 1px rgba(249, 115, 22, .1);
    margin: 20px;
    overflow: hidden;
}
.gryrf-game-detail-title::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle,
        rgba(249, 115, 22, .14) 0%,
        rgba(249, 115, 22, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.game-detail-iframe {
    width: 100%;
}

.gryrf-game-detail-img {
    width: 100%;
    position: relative;
}
.gryrf-game-detail-img img {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
    aspect-ratio: 1 / .8;
    display: block;
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, .15),
        0 10px 26px rgba(0, 0, 0, .4);
    transition: all .3s ease;
}
.gryrf-game-detail-img img:hover {
    transform: scale(1.02);
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, .25),
        0 14px 32px rgba(249, 115, 22, .2);
}

.gryrf-detail-info {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 4px 8px;
    order: 1;
    z-index: 1;
}
.gryrf-detail-info h2 {
    color: #fef3e2;
    font-size: 1.7rem;
    margin: 0 0 12px 0;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.3px;
}
.gryrf-detail-info p {
    color: #d6bfa6;
    font-size: .95rem;
    margin: 6px 0;
    line-height: 1.7;
}
.gryrf-detail-info a {
    text-decoration: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    order: -1;
    margin-bottom: 12px;
}

/* ─────── Game Instructions / Article blocks ─────── */
.gryrf-game-instructions {
    display: flex;
    flex-wrap: wrap;
    margin: 20px;
    background: linear-gradient(160deg,
        rgba(45, 31, 23, .92) 0%,
        rgba(38, 26, 20, .95) 100%);
    padding: 24px;
    border-radius: 14px;
    box-shadow:
        0 1px 0 rgba(254, 243, 226, .04) inset,
        0 6px 20px rgba(0, 0, 0, .3),
        0 0 0 1px rgba(249, 115, 22, .08);
}
.gryrf-game-instructions p {
    color: #d6bfa6;
    line-height: 1.75;
    font-size: .95rem;
}

/* ─────── Play Button ─────── */
.gryrf-game-gameplay-button {
    display: flex;
    background: linear-gradient(135deg, #f97316 0%, #fb7185 50%, #f59e0b 100%);
    background-size: 200% 100%;
    background-position: 0% 50%;
    border-radius: 14px;
    padding: 14px 38px;
    width: fit-content;
    justify-content: center;
    align-items: center;
    box-shadow:
        0 8px 24px rgba(249, 115, 22, .35),
        0 0 0 1px rgba(254, 243, 226, .12) inset;
    margin: 0 auto;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}
.gryrf-game-gameplay-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, .2) 0%,
        rgba(255, 255, 255, 0) 50%);
    opacity: 0;
    transition: opacity .3s ease;
}
.gryrf-game-gameplay-button:hover {
    transform: translateY(-2px) scale(1.02);
    background-position: 100% 50%;
    box-shadow:
        0 14px 32px rgba(249, 115, 22, .45),
        0 0 0 1px rgba(254, 243, 226, .2) inset;
}
.gryrf-game-gameplay-button:hover::before {
    opacity: 1;
}
.gryrf-game-gameplay-button img {
    width: 50px;
    height: 50px;
    transition: transform .3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25));
}
.gryrf-game-gameplay-button:hover img {
    transform: scale(1.08) rotate(8deg);
}
.gryrf-game-gameplay-button p {
    color: #fff;
    margin: 0 14px 0 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

/* ─────── Game Iframe Page ─────── */
.gryrf-game-iframe {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100vh;
    position: relative;
}
#iframe-menu-btn {
    margin-top: 20px;
    margin-left: 60px;
    position: absolute;
    height: 40px;
}
#iframe-back-btn {
    margin-top: 20px;
    margin-left: 20px;
    position: absolute;
    height: 44px;
    cursor: pointer;
    filter: brightness(0) invert(1) sepia(1) saturate(6) hue-rotate(350deg);
    opacity: .9;
    transition: transform .2s ease, opacity .2s ease;
    padding: 10px;
    background: rgba(45, 31, 23, .7);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    box-sizing: content-box;
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, .2),
        0 6px 16px rgba(0, 0, 0, .35);
}
#iframe-back-btn:hover {
    opacity: 1;
    transform: scale(1.06);
    background: rgba(249, 115, 22, .25);
}

/* ─────── News / Article Pages ─────── */
.gryrf-news-detail {
    color: #d6bfa6;
    text-align: start;
    padding: 28px 22px;
    margin: 20px 16px;
    background: linear-gradient(160deg,
        rgba(45, 31, 23, .85) 0%,
        rgba(38, 26, 20, .92) 100%);
    border-radius: 16px;
    box-shadow:
        0 1px 0 rgba(254, 243, 226, .04) inset,
        0 8px 24px rgba(0, 0, 0, .3),
        0 0 0 1px rgba(249, 115, 22, .08);
}
.gryrf-news-detail img {
    width: 100%;
    object-fit: contain;
    border-radius: 12px;
}
.gryrf-news-detail h3 {
    color: #fef3e2;
    font-size: 1.55rem;
    margin: 0 0 8px;
    padding-bottom: 14px;
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, #f97316, #fb7185, transparent) 1;
    font-weight: 800;
    letter-spacing: -.3px;
    line-height: 1.3;
}
.gryrf-news-detail h4 {
    color: #fb923c;
    font-size: 1.12rem;
    margin: 28px 0 10px 0;
    font-weight: 700;
    position: relative;
    padding-left: 14px;
}
.gryrf-news-detail h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: linear-gradient(180deg, #f97316, #fb7185);
    border-radius: 3px;
}
.gryrf-news-detail p {
    color: #d6bfa6;
    font-size: .94rem;
    line-height: 1.8;
    margin: 10px 0;
}
.gryrf-news-detail a {
    color: #fb923c;
    text-decoration: none;
    border-bottom: 1px dashed rgba(251, 146, 60, .4);
    transition: color .2s ease, border-color .2s ease;
}
.gryrf-news-detail a:hover {
    color: #fbbf24;
    border-bottom-color: rgba(251, 191, 36, .8);
}
.gryrf-news-detail ul {
    padding-left: 22px;
    margin: 10px 0;
}
.gryrf-news-detail li {
    color: #d6bfa6;
    margin: 8px 0;
    font-size: .92rem;
    line-height: 1.7;
}
.gryrf-news-detail li::marker {
    color: #f97316;
}
.gryrf-news-detail strong {
    color: #fef3e2;
    font-weight: 600;
}

/* ─────── 404 Page ─────── */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}
.error-page h1 {
    font-size: 2em;
    color: #fef3e2;
    margin: 12px 0;
}
.error-page p {
    font-size: 1.1em;
    color: #a89484;
    padding: .5rem 1rem;
}
.error-page img {
    width: 100%;
    max-width: 320px;
    padding: 1.5rem;
}

/* ─────── Game Mark / New Badge ─────── */
.gryrf-game-mark {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 4vh;
    position: absolute;
    border-radius: 0 0 8px 8px;
    top: -10px;
    left: -10px;
    z-index: 2;
}
.gryrf-game-mark img {
    width: 50px;
    height: 25px;
}
.gryrf-game-new {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 4vh;
    position: absolute;
    border-radius: 0 0 8px 8px;
    top: 0;
    left: -10px;
    z-index: 2;
}
.gryrf-game-new img {
    width: 50px;
    height: 50px;
}
.gryrf-game-mark p {
    color: #fff;
    font-size: 1rem;
    margin: 0 10px;
    font-weight: 600;
}

#gryrf-game-body {
    margin-top: 24px;
}

/* ─────── Iframe Menu (in-page) ─────── */
.iframe-menu {
    display: flex;
    width: 60%;
    flex-direction: column;
    gap: 0;
    background: linear-gradient(180deg,
        rgba(45, 31, 23, .98) 0%,
        rgba(38, 26, 20, .98) 100%);
    backdrop-filter: blur(18px);
    position: absolute;
    align-items: stretch;
    height: 100vh;
    top: 0;
    right: 0;
    z-index: 8;
    margin: 0;
    list-style: none;
    display: none;
    padding: 10px;
    border-radius: 12px 0 0 12px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, .45);
}
.iframe-menu.open {
    display: flex;
    flex-direction: column;
}
.iframe-menu li a {
    font-size: .95rem;
    color: #d6bfa6;
    text-decoration: none;
    font-weight: 500;
    transition: color .25s, padding-left .25s;
    padding: 10px 16px;
    display: block;
    border-radius: 8px;
}
.iframe-menu li a:hover {
    color: #fb923c;
    background: rgba(249, 115, 22, .1);
    padding-left: 22px;
}

.iframe-list-item a {
    display: flex;
    flex-direction: row;
    margin: 0;
    justify-content: space-between;
    align-items: center;
}
.iframe-list-item a img {
    margin: 0;
    height: 40px;
    width: 40px;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    display: block;
}
.iframe-list-item a p {
    margin: 0 16px;
    position: relative;
    color: #fef3e2;
}
.iframe-list-item-close a {
    display: flex;
    flex-direction: row;
    margin: 0;
    justify-content: flex-end;
    align-items: center;
}
.iframe-list-item-close img {
    margin: 0;
    height: 40px;
    width: 40px;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    display: block;
    cursor: pointer;
}
#iframe-close-btn {
    right: 0;
    top: 0;
}

/* ─────── Touch / Interaction ─────── */
@media (hover: none) and (pointer: coarse) {
    .gryrf-game-item:active {
        transform: translateY(-2px) scale(.98);
        box-shadow:
            0 0 0 1px rgba(249, 115, 22, .25),
            0 10px 22px rgba(249, 115, 22, .15);
    }
    .gryrf-game-cover img:active {
        transform: scale(1.03);
    }
    .recommend-item-btn:active {
        transform: translateY(-2px) scale(.97);
    }
    #back-top:active,
    #back-home:active {
        transform: scale(.9);
    }
}

.gryrf-game-item,
.recommend-item-btn,
.gryrf-common-recommend-title,
.gryrf-game-gameplay-button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

/* ─────── Animations ─────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .35); }
    50%      { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0); }
}

.gryrf-game-item {
    animation: fadeInUp .45s ease both;
}
.gryrf-game-item:nth-child(1) { animation-delay: .05s; }
.gryrf-game-item:nth-child(2) { animation-delay: .1s; }
.gryrf-game-item:nth-child(3) { animation-delay: .15s; }
.gryrf-game-item:nth-child(4) { animation-delay: .2s; }
.gryrf-game-item:nth-child(5) { animation-delay: .25s; }
.gryrf-game-item:nth-child(6) { animation-delay: .3s; }

/* ─────── Responsive ─────── */
@media (max-width: 480px) {
    .gryrf-game-item-div {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .gryrf-recommend-content,
    .gryrf-recommend-content-hot {
        grid-template-columns: repeat(2, 1fr);
    }
    .gryrf-game-detail-title {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 18px;
    }
    #flow {
        bottom: 76px;
        right: 10px;
    }
    .gryrf-nav-subtitle {
        display: none;
    }
    .gryrf-navbar {
        height: 60px;
    }
    .gryrf-nav-logo img {
        height: 38px;
        width: 38px;
    }
    .gryrf-nav-title {
        font-size: 1.08rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .gryrf-game-item-div {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .gryrf-recommend-content,
    .gryrf-recommend-content-hot {
        grid-template-columns: repeat(4, 1fr);
    }
}
