@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

* {
    box-sizing: border-box;
}

body {
    max-width: 660px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0 auto;
    padding: 0;
    background-color: #f8fafc;
    background-image:
        radial-gradient(ellipse at 10% 5%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 90%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(124, 58, 237, 0.03) 0%, transparent 60%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== HEADER ========== */
header {
    width: 100%;
    max-width: 660px;
    display: flex;
    background: linear-gradient(135deg, #312e81 0%, #4338ca 40%, #6366f1 100%);
    color: #FFFFFF;
    height: 6vh;
    z-index: 10;
    box-shadow: 0 4px 24px rgba(67, 56, 202, 0.3);
    position: sticky;
    top: 0;
}

#nav-open {
    display: block;
    position: relative;
    height: 3vh;
}

#nav-close {
    display: none;
    position: relative;
    height: 4vh;
}

.jexbu-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo-icon {
    height: 4vh;
    width: 4vh;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.08);
}

.logo-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.jexbu-navbar {
    display: flex;
    background: linear-gradient(135deg, #312e81 0%, #4338ca 40%, #6366f1 100%);
    color: #FFFFFF;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0px 20px;
    position: relative;
}

/* ========== SIDE MENU ========== */
.jexbu-menu {
    display: flex;
    width: 65%;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
    position: absolute;
    align-items: start;
    height: 100vh;
    top: 6vh;
    right: 0px;
    padding: 15px 1.2rem;
    z-index: 10;
    margin: 0;
    list-style-type: none;
    display: none;
    box-shadow: -8px 0 40px rgba(67, 56, 202, 0.15);
    border-left: 3px solid #6366f1;
}

.jexbu-menu li {
    position: relative;
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
}

.jexbu-menu li:last-child {
    border-bottom: none;
}

.jexbu-menu.open {
    display: flex;
    flex-direction: column;
}

.jexbu-menu.open #nav-open {
    display: none;
}

.jexbu-menu.open #nav-close {
    display: block;
}

.jexbu-menu li a {
    font-size: 0.95rem;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    padding: 13px 0;
    letter-spacing: 0.2px;
}

.jexbu-menu li a:hover {
    color: #6366f1;
    transform: translateX(6px);
}

#jexbu-menu {
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========== GAME CARD ========== */
.jexbu-game-item {
    border-radius: 16px;
    position: relative;
    background: #ffffff;
    padding: 6px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(67, 56, 202, 0.05);
}

.jexbu-game-item::before {
    display: none;
}

.jexbu-game-item:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: #c7d2fe;
    box-shadow: 0 12px 36px rgba(67, 56, 202, 0.14);
}

.jexbu-game-item a {
    text-decoration: none;
}

/* ========== GAME COVER ========== */
.jexbu-game-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.jexbu-game-cover img:hover {
    transform: scale(1.06);
    border-radius: 12px;
}

.jexbu-game-cover-recommend img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.jexbu-game-cover-recommend img:hover {
    transform: scale(1.06);
}

/* ========== GAME TEXT ========== */
.jexbu-game-item h3 {
    color: #1e293b;
    margin: 5px 0px;
    font-size: 0.75rem;
    font-weight: 700;
}

.jexbu-game-item p {
    color: #64748b;
    margin: 0px;
    font-size: 1rem;
}

.jexbu-game-info {
    display: flex;
    justify-content: center;
    align-items: start;
    flex-direction: column;
    padding: 5px 2px;
}

.jexbu-game-info p {
    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: 0.85rem;
    color: #475569;
    font-weight: 500;
}

.jexbu-game-info p:last-child {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ========== COMMON GAME RIGHT ========== */
.common-game-right {
    display: flex;
    width: 20%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 10px;
    right: 0px;
    justify-content: center;
    align-items: center;
}

.common-game-right img {}

/* ========== SECTION DIVIDERS ========== */
.jexbu-recomed-div {
    margin: 0px 10px;
    border-radius: 14px;
    padding: 10px 0px;
}

.jexbu-detail-recomed-div {
    margin: 10px 20px;
    border-radius: 14px;
    padding: 10px 0px;
}

/* ========== SECTION TITLE BAR ========== */
.jexbu-common-recommend-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 16px;
    background: linear-gradient(135deg, #312e81 0%, #4338ca 50%, #6366f1 100%);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 4px 16px rgba(67, 56, 202, 0.2);
}

.jexbu-common-recommend-title p {
    color: #fff;
    font-size: 0.95rem;
    margin: 12px 0px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.jexbu-common-recommend-title img {
    width: 22px;
    height: 22px;
}

/* ========== GRIDS ========== */
.jexbu-common-recommend-content {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.jexbu-common-recommend-content-2 {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.jexbu-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: 24px 15px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%);
    text-align: center;
    margin-top: 30px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 24px rgba(30, 27, 75, 0.2);
}

.jexbu-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 10px;
}

.jexbu-footer-links a {
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.jexbu-footer-links a:hover {
    color: #a5b4fc;
    text-decoration: none;
}

footer .jexbu-copyright {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.55);
    margin: 10px 0px;
    font-weight: 500;
}

/* ========== FLOATING BUTTONS ========== */
#back-top,
#back-home {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: transform 0.3s;
}

#back-top:hover,
#back-home:hover {
    transform: scale(1.2);
}

#flow {
    position: fixed;
    bottom: 10rem;
    right: 0.6rem;
    display: none;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 0.5rem;
    gap: 10PX;
    border-radius: 10rem;
    box-shadow: 0 4px 20px rgba(67, 56, 202, 0.15);
    transition: all 0.3s;
    border: 1.5px solid #e2e8f0;
}

#flow:hover {
    box-shadow: 0 8px 28px rgba(67, 56, 202, 0.25);
    transform: translateY(-3px);
    border-color: #c7d2fe;
}

/* ========== GAME DETAIL ========== */
.jexbu-game-detail-title {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0px 1rem;
    border-radius: 16px;
}

.game-detail-iframe {
    width: 100%;
}

.jexbu-game-detail-img {
    width: 100%;
}

.jexbu-game-detail-img img {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
    aspect-ratio: 1 / 0.8;
    display: block;
    box-shadow: 0 4px 20px rgba(67, 56, 202, 0.1);
}

.jexbu-detail-info {
    position: relative;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin: 0px 20px;
    order: 1;
}

.jexbu-detail-info h2 {
    color: #1e293b;
    font-size: 1rem;
    margin: 10px;
    font-weight: 400;
}

.jexbu-detail-info p {
    color: #475569;
    font-size: 1rem;
    margin: 10px 0px;
    line-height: 1.7;
}

.jexbu-detail-info a {
    text-decoration: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    order: -1;
}

/* ========== GAME INSTRUCTIONS ========== */
.jexbu-game-instructions {
    display: flex;
    flex-wrap: wrap;
    margin: 10px 20px;
    background: linear-gradient(135deg, #312e81 0%, #4338ca 50%, #6366f1 100%);
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(67, 56, 202, 0.25);
}

.jexbu-game-instructions p {
    color: #FFFFFF;
    line-height: 1.6rem;
    font-size: 1rem;
}

/* ========== PLAY BUTTON ========== */
.jexbu-game-gameplay-button {
    display: flex;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 14px;
    margin: 10px;
    width: 50%;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -140px;
    right: -30px;
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jexbu-game-gameplay-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.5);
}

.jexbu-game-gameplay-button img {
    width: 120px;
    height: 120px;
}

.jexbu-game-gameplay-button p {
    color: #fff;
    margin: 0px;
}

/* ========== IFRAME / GAME PAGE ========== */
.jexbu-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;
    width: 40px;
}

#iframe-back-btn {
    margin-top: 20px;
    margin-left: 20px;
    position: absolute;
    height: 50px;
    width: 50px;
}

/* ========== NEWS / ARTICLE PAGES ========== */
.jexbu-news-detail {
    color: #475569;
    text-align: start;
    padding: 24px;
    margin: 20px 10px;
    background: #ffffff;
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 2px 16px rgba(67, 56, 202, 0.06);
    line-height: 1.7;
}

.jexbu-news-detail img {
    width: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.jexbu-news-detail h3 {
    color: #4338ca;
    font-weight: 900;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.jexbu-news-detail h4 {
    color: #312e81;
    font-weight: 800;
    font-size: 1.05rem;
    margin-top: 20px;
    margin-bottom: 8px;
}

.jexbu-news-detail a {
    color: #4338ca;
    text-decoration: none;
    font-weight: 600;
}

.jexbu-news-detail a:hover {
    text-decoration: underline;
    color: #312e81;
}

.jexbu-news-detail ul {
    padding-left: 20px;
}

.jexbu-news-detail li {
    margin-bottom: 8px;
}

/* ========== ERROR PAGE ========== */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 80vh;
    justify-content: center;
}

.error-page h1 {
    font-size: 2em;
    color: #1e293b;
}

.error-page p {
    font-size: 1.4em;
    color: #64748b;
    padding: 1rem;
}

.error-page img {
    width: 100%;
    padding: 2rem 1rem;
}

/* ========== GAME MARKS ========== */
.jexbu-game-mark {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    height: 4vh;
    position: absolute;
    border-radius: 0px 0px 10px 10px;
    top: -10px;
    left: -10px;
}

.jexbu-game-mark img {
    width: 50px;
    height: 25px;
}

.jexbu-game-new {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    height: 4vh;
    position: absolute;
    border-radius: 0px 0px 10px 10px;
    top: 0px;
    left: -10px;
}

.jexbu-game-new img {
    width: 50px;
    height: 50px;
}

.jexbu-game-mark p {
    color: #fff;
    font-size: 1rem;
    margin: 0px 10px;
}

#jexbu-game-body {
    margin-top: 30px;
}

/* ========== IFRAME MENU ========== */
.iframe-menu {
    display: flex;
    width: 60%;
    flex-direction: column;
    gap: 35px;
    background: #ffffff;
    position: absolute;
    align-items: start;
    height: 100vh;
    top: 0vh;
    right: 0px;
    z-index: 8;
    margin: 0;
    list-style-type: none;
    display: none;
    padding: 10px 10px;
    box-shadow: -8px 0 40px rgba(67, 56, 202, 0.15);
    border-left: 3px solid #6366f1;
}

.iframe-menu.open {
    display: flex;
    flex-direction: column;
}

.iframe-menu li a {
    font-size: 1rem;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s, transform 0.2s;
}

.iframe-menu li a:hover {
    color: #6366f1;
    transform: translateX(5px);
}

.iframe-list-item a {
    display: flex;
    flex-direction: row;
    margin: 0px;
    justify-content: space-between;
    align-items: center;
}

.iframe-list-item a img {
    margin: 0px;
    height: 40px;
    width: 40px;
    border-radius: 10px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    display: block;
}

.iframe-list-item a p {
    margin: 0px 20px;
    position: relative;
}

.iframe-list-item-close a {
    display: flex;
    flex-direction: row;
    margin: 0px;
    justify-content: end;
    align-items: center;
}

.iframe-list-item-close img {
    margin: 0px;
    height: 40px;
    width: 40px;
    border-radius: 10px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    display: block;
}

#iframe-close-btn {
    right: 0px;
    top: 0px;
}
