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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===== HEADER ===== */
header {
    background: #0a0a0a;
    border-bottom: 1px solid #2a2a2a;
    padding: 12px 20px;
    padding-top: calc(12px + env(safe-area-inset-top));
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo img {
    height: 45px;
    width: auto;
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
}

nav a {
    color: #ffffff;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 4px 0;
}

nav a:hover {
    color: #ffc107;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    min-height: 40px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
}

.btn-login {
    color: #ffc107;
    background: transparent;
    border: 1px solid #ffc107;
}

.btn-login:hover,
.btn-login:focus {
    background: #ffc107;
    color: #0a0a0a;
}

.btn-daftar {
    color: #ffffff;
    background: linear-gradient(135deg, #e60000, #a30000);
    border: 1px solid #e60000;
}

.btn-daftar:hover,
.btn-daftar:focus {
    background: linear-gradient(135deg, #ff1a1a, #cc0000);
    box-shadow: 0 0 12px rgba(230, 0, 0, 0.5);
}

/* ===== MAIN ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 48px 0 60px;
    border-bottom: 1px solid #1f1f1f;
    margin-bottom: 60px;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-left h1 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 15px;
    color: #b0b0b0;
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Tabel Hero */
.hero-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    background: #141414;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
}

.hero-table td {
    padding: 10px 16px;
    font-size: 14px;
    border-bottom: 1px solid #2a2a2a;
}

.hero-table tr:last-child td {
    border-bottom: none;
}

.hero-table td:first-child {
    color: #ffc107;
    font-weight: 600;
    width: 40%;
}

.hero-table td:last-child {
    color: #e0e0e0;
}

/* Tombol Masuk */
.btn-masuk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 36px;
    min-height: 48px;
    background: linear-gradient(135deg, #e60000, #a30000);
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid #e60000;
    cursor: pointer;
}

.btn-masuk:hover,
.btn-masuk:focus {
    background: linear-gradient(135deg, #ff1a1a, #cc0000);
    box-shadow: 0 0 16px rgba(230, 0, 0, 0.6);
    transform: translateY(-2px);
}

/* Banner Hero */
.hero-right img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* ===== SECTION ===== */
section {
    margin-bottom: 60px;
}

section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 32px;
    padding-bottom: 12px;
    border-bottom: 2px solid #ffc107;
    display: inline-block;
}

/* ===== PANDUAN PERMAINAN ===== */
#panduan .game-card {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 28px;
    align-items: center;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

#panduan .game-card:hover {
    border-color: #ffc107;
    transform: translateY(-2px);
}

.game-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    display: block;
}

.game-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #ffc107;
    margin-bottom: 12px;
}

.game-content p {
    font-size: 15px;
    color: #b0b0b0;
    line-height: 1.7;
    margin-bottom: 16px;
}

.game-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-content ul li {
    position: relative;
    padding-left: 24px;
    font-size: 14px;
    color: #d0d0d0;
    line-height: 1.8;
}

.game-content ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #e60000;
    font-weight: 700;
}

/* ===== FAQ ===== */
#faq h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffc107;
    margin-top: 24px;
    margin-bottom: 8px;
}

#faq p {
    color: #b0b0b0;
    font-size: 15px;
    margin-bottom: 8px;
}

/* ===== REVIEWS ===== */
#reviews article {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

#reviews article:hover {
    border-color: #ffc107;
    transform: translateY(-2px);
}

#reviews h3 {
    font-size: 16px;
    font-weight: 600;
    color: #ffc107;
    margin-bottom: 8px;
}

#reviews p {
    color: #b0b0b0;
    font-size: 15px;
    font-style: italic;
}

/* ===== FOOTER ===== */
footer {
    background: #080808;
    border-top: 1px solid #2a2a2a;
    padding: 48px 20px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    margin-top: 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid #1f1f1f;
}

.footer-col h3 {
    font-size: 16px;
    font-weight: 700;
    color: #ffc107;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.footer-col p {
    font-size: 14px;
    color: #b0b0b0;
    line-height: 1.7;
}

.footer-col p strong {
    color: #e60000;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    font-size: 14px;
    color: #b0b0b0;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 2px 0;
}

.footer-col ul a:hover {
    color: #ffc107;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: #666666;
    line-height: 1.6;
}

.footer-bottom strong {
    color: #ffc107;
}

/* ===== INPUT (aksesibilitas iOS zoom) ===== */
input, select, textarea, button {
    font-family: inherit;
    font-size: 16px;
}

/* ===== RESPONSIVE — TABLET ===== */
@media (max-width: 992px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    #panduan .game-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
}

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 12px;
    }

    .logo img {
        height: 38px;
    }

    nav ul {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 14px;
        padding: 6px 0;
    }

    .auth-buttons {
        order: -1;
        align-self: flex-end;
    }

    .btn {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 38px;
    }

    main {
        padding: 0 16px 60px;
    }

    .hero {
        padding: 32px 0 40px;
        margin-bottom: 40px;
    }

    .hero-left h1 {
        font-size: 22px;
    }

    .hero-desc {
        font-size: 14px;
    }

    .hero-table td {
        padding: 8px 12px;
        font-size: 13px;
    }

    .btn-masuk {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }

    section h2 {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .game-content h3 {
        font-size: 18px;
    }

    .game-content p {
        font-size: 14px;
    }

    .game-content ul li {
        font-size: 13px;
    }

    #faq h3 {
        font-size: 16px;
    }

    #reviews h3 {
        font-size: 15px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .footer-col h3 {
        font-size: 15px;
    }

    .footer-col p,
    .footer-col ul a {
        font-size: 13px;
    }
}

/* ===== RESPONSIVE — SMALL MOBILE ===== */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    nav ul {
        gap: 12px;
    }

    nav a {
        font-size: 13px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 36px;
    }

    .auth-buttons {
        gap: 8px;
    }

    section h2 {
        font-size: 20px;
    }

    #faq h3 {
        font-size: 16px;
    }

    #reviews h3 {
        font-size: 15px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom p {
        font-size: 12px;
    }

    .hero-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .game-card {
        padding: 16px;
    }

    #reviews article {
        padding: 16px 18px;
    }
}

/* ===== LANDSCAPE HP ===== */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        position: relative;
    }

    .hero {
        padding: 24px 0 32px;
    }
}