@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --bg-dark: #121212;
    --bg-light: #1A1A1A;
    --bg-input: #2C2C2C;
    --primary-red: #FBC02D;
    --primary-yellow: #FBC02D;
    --text-white: #FFFFFF;
    --text-grey: #AAAAAA;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: auto;
    margin-bottom: 20px ;
    padding: 0 20px;
}

a {
    color: var(--text-white);
    text-decoration: none;
}

.icon_logo {
    width: 70px;
    cursor: pointer;
}

.main-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--bg-light);
}

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

.logo {
    font-weight: 700;
    font-size: 24px;
    color: var(--primary-red);
}

.main-nav a {
    margin: 0 15px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-yellow);
}

#user-auth-section {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    border: none;
    padding: 5px;
    border-radius: 50px;
    cursor: pointer;
    color: var(--text-white);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-yellow);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.dropdown-content {
    display: none; 
    position: absolute;
    right: 0;
    top: calc(100% + 2px); 
    background-color: var(--bg-light);
    min-width: 250px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1000;
    border-radius: 8px;
    border: 1px solid #333;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 5px;
}

.dropdown-content.active {
    display: block;
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #333;
    margin-bottom: 5px;
}

.dropdown-header strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-white);
    line-height: 1.2;
}

.dropdown-header small {
    color: var(--text-grey);
    font-size: 0.85rem;
}

.dropdown-content a {
    color: var(--text-grey);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.1s ease;
}

.dropdown-content a:hover {
    background-color: var(--bg-input);
    color: var(--text-white);
}

.dropdown-content a i {
    width: 20px;
    text-align: center;
    color: #888;
    transition: color 0.2s ease;
}

.dropdown-content a:hover i {
    color: var(--primary-yellow);
}

.user-section .btn {
    padding: 8px 20px;
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--bg-dark);
}

.btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--bg-input);
    border-radius: 5px;
    color: var(--text-white);
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border: 1px solid var(--primary-yellow);
}

h2.section-title {
    color: var(--primary-yellow);
    margin-bottom: 1rem;
    text-align: left;
}

.hero {
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 18px;
    color: var(--text-grey);
    margin-bottom: 2rem;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 15px;
    margin-top: 2rem;
    text-align: center;
}

.game-card {
    background: linear-gradient(60deg, #ff6b35, #ff9500);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(251, 192, 45, 0.1);
}

.game-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.game-card p {
    padding: 1px;
    font-weight: 600;
    font-size: small;
}

/* ==================== BARU: Flash Sale Section ==================== */
.flash-sale-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ff6b35, #ff9500);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.flash-sale-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="flash" patternUnits="userSpaceOnUse" width="20" height="20"><polygon fill="rgba(255,255,255,0.1)" points="10,0 15,8 10,16 5,8"/></pattern></defs><rect width="100" height="100" fill="url(%23flash)"/></svg>') repeat;
    animation: flashMove 3s linear infinite;
}

@keyframes flashMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sale-timer {
    background-color: var(--primary-yellow);
    color: var(--bg-dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
}

.flash-sale-container {
    position: relative;
    overflow: hidden;
}

.flash-sale-scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-yellow) transparent;
}

.flash-sale-scroll::-webkit-scrollbar {
    height: 6px;
}

.flash-sale-scroll::-webkit-scrollbar-thumb {
    background-color: var(--primary-yellow);
    border-radius: 3px;
}

.flash-item {
    flex: 0 0 auto;
    width: 110px;
    background-color: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.flash-item:hover {
    transform: translateY(-5px);
}

.flash-item-image {
    width: 50%;
    height: 50px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flash-item-content {
    padding: 10px;
}

.flash-item-title {
    font-size: 14px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flash-item-price {
    color: var(--primary-yellow);
    font-weight: 700;
    font-size: 16px;
}

.flash-item-original-price {
    text-decoration: line-through;
    color: var(--text-grey);
    font-size: 12px;
}

/* ==================== BARU: Latest Articles Section ==================== */
.latest-articles-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.latest-articles-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.latest-articles-section .section-title {
    margin-bottom: 0;
}

.view-all-link {
    background-color: var(--bg-input);
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.view-all-link:hover {
    background-color: #3c3c3c;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    color: var(--text-white);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.article-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.article-card-content {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-card-content h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    flex-grow: 1;
}

.article-card-author {
    font-size: 0.85rem;
    color: var(--text-grey);
    margin-top: auto; 
}

/* ==================== BARU: Main Footer ==================== */
.main-footer {
    background-color: var(--bg-dark); 
    color: #ffffff; 
    padding: 3rem 0 0 0;
    margin-top: 3rem;
    border-top: 1px solid #2b2a2a;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 3rem;
}

.footer-column.about .footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-red); 
    margin-bottom: 0.5rem;
}

.footer-column p {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 1rem;
}

.footer-column .social-icons {
    display: flex;
    gap: 1rem;
}

.footer-column .social-icons a {
    color: #ffffff;
    font-size: 16px;
}

.footer-column .social-icons a:hover {
    color: var(--primary-red);
}

.footer-column.links .footer-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.footer-column.links ul {
    list-style: none;
}

.footer-column.links ul li {
    margin-bottom: 0.75rem;
}

.footer-column.links ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-column.links ul li a:hover {
    color: var(--primary-yellow);
}

.footer-column.social-media .social-icons-large {
    display: flex;
    gap: 1rem;
}

.footer-column.social-media .social-icons-large a {
    color: var(--bg-dark);
    background-color: var(--primary-red);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    transition: background-color 0.3s ease;
}

.footer-column.social-media .social-icons-large a:hover {
    background-color: #e1bee7;
}

.footer-bottom {
    border-top: 1px solid #272727;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 14px;
    color: var(--text-white);
}

/* ==================== BARU: Halaman Artikel (List & Detail) ==================== */
.page-main-title {
    font-size: 2rem;
    color: var(--primary-yellow);
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 2px solid var(--bg-input);
    padding-bottom: 1rem;
}

.article-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.article-content-main {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
}

.article-title {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-meta {
    color: var(--text-grey);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.article-main-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.article-body {
    line-height: 1.8;
    font-size: 1.05rem;
}

.article-body h2 {
    font-size: 1.8rem;
    color: var(--primary-yellow);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.article-body h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.article-body p {
    margin-bottom: 1.5rem;
}
.article-body ul, .article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.article-body a {
    color: var(--primary-yellow);
    text-decoration: underline;
}

.article-sidebar .sidebar-widget {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.article-sidebar .sidebar-widget h3 {
    color: var(--primary-yellow);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bg-input);
}

.article-sidebar .sidebar-widget ul {
    list-style: none;
}

.article-sidebar .sidebar-widget ul li {
    margin-bottom: 0.75rem;
}

.article-sidebar .sidebar-widget ul li a {
    color: var(--text-grey);
    transition: color 0.3s ease;
}

.article-sidebar .sidebar-widget ul li a:hover {
    color: var(--text-white);
}

.category-tabs {
    display: flex;
    gap: 10px;
    margin: 2.5rem 0 1.5rem 0;
    flex-wrap: wrap; 
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--bg-input);
    background-color: var(--bg-light);
    color: var(--text-grey);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-tab:hover {
    background-color: var(--bg-input);
    color: var(--text-white);
}

.category-tab.active {
    background-color: var(--primary-yellow);
    color: var(--bg-dark);
    border-color: var(--primary-yellow);
}

.category-content.hidden {
    display: none;
}

.game-card.hidden {
    display: none;
}

.show-more-btn {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 12px;
    background-color: var(--bg-input);
    color: var(--text-white);
    border: 1px solid #444;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.show-more-btn:hover {
    background-color: #3c3c3c;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-card {
    background-color: var(--bg-light);
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    cursor: pointer;
}

.auth-tabs h3 {
    padding: 0 20px;
    color: var(--text-grey);
}

.auth-tabs h3.active {
    color: var(--primary-yellow);
    border-bottom: 2px solid var(--primary-yellow);
}

#register-form {
    display: none;
}

/* ==================== BARU: Style Tambahan untuk Halaman Auth ==================== */

.auth-card .form-intro {
    color: var(--text-grey);
    margin-bottom: 2rem;
    font-size: 14px;
}

.recaptcha-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.terms-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-grey);
    margin-bottom: 1.5rem;
}

.terms-container label a {
    color: var(--primary-yellow);
    text-decoration: underline;
}

.auth-card button:disabled {
    background-color: var(--bg-input);
    cursor: not-allowed;
    opacity: 0.6;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-grey);
    margin: 2rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--bg-input);
}

.divider:not(:empty)::before {
    margin-right: .25em;
}

.divider:not(:empty)::after {
    margin-left: .25em;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border: 1px solid var(--bg-input);
    border-radius: 5px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
    background-color: var(--bg-light);
    color: var(--text-white);
}

.btn-social:hover {
    background-color: var(--bg-input);
}

.btn-social img {
    width: 20px;
    height: 20px;
}

.auth-message {
    margin-top: 1.5rem;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    display: none; 
}

.auth-message.success {
    background-color: #2e7d32; 
    color: white;
    display: block;
}

.auth-message.error {
    background-color: #d32f2f; 
    color: white;
    display: block;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: var(--bg-input);
    border-radius: 5px;
    padding: 5px;
    margin: 0 20px;
}

.search-container input {
    background: none;
    border: none;
    color: var(--text-white);
    padding: 5px 10px;
    outline: none;
    width: 100%; 
    flex-grow: 1;
}

.search-container button {
    background: none;
    border: none;
    color: var(--text-grey);
    cursor: pointer;
    padding: 5px;
    flex-shrink: 0;
}

.hamburger-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

.slider-container {
    position: relative;
    max-width: 1100px;
    margin: 2rem auto;
    overflow: hidden;
    border-radius: 8px;
}

.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    box-sizing: border-box;
}

.slide img {
    width: 100%;
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    z-index: 100;
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}


/* ==================== Responsif ==================== */
@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: wrap;
    }

    .search-container {
        order: 3;
        width: 100%;
        margin: 15px 0 0 0;
    }

    .hamburger-menu {
        display: block;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background-color: var(--bg-light);
        padding: 1rem 0;
        margin-top: 1rem;
    }

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

    .main-nav a {
        padding: 10px 0;
        border-bottom: 1px solid var(--bg-input);
    }

    .main-nav a:last-child {
        border-bottom: none;
    }

    .icon_logo {
        width: 50px;
    }

    .user-section .btn{
        margin-top: 10px;
    }

    .logo {
        margin-top: 10px;
    }

    .dropdown-content.active {
    margin-right: -90px;
    }

    .flash-item {
    width: 120px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sale-timer {
        margin-top: 10px;
    }

    .flash-sale-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0px;
    }

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

    .game-card p {
        font-size: 0.75rem; 
    }

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


@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column .social-icons,
    .footer-column.social-media .social-icons-large {
        justify-content: center;
    }
}

@media (min-width: 992px) {
    .article-detail-layout {
        grid-template-columns: 2.5fr 1fr;
    }
}