@tailwind base;
@tailwind components;
@tailwind utilities;

[x-cloak] {
    display: none;
}

/* =====================================================
   FIX MOBILE: cegah scroll/swipe horizontal & swipe navigasi
   - overflow-x: clip TIDAK merusak position: sticky
     (penting! header mobile, sidebar & sticky bar tetap jalan)
   - fallback hidden untuk browser lama
   - overscroll-behavior-x: none matikan gesture swipe back/forward
===================================================== */
html,
body {
    max-width: 100%;
    overflow-x: hidden; /* fallback browser lama */
    overflow-x: clip;
    overscroll-behavior-x: none;
}

#app {
    max-width: 100%;
    overflow-x: clip;
}

/* Smooth scroll untuk link anchor di landing (#klasemen, #leaderboard, dll) */
html {
    scroll-behavior: smooth;
}

/* =====================================================
   Scrollbar custom sesuai tema (opsional, biar makin ganteng)
===================================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #f6f1e4; /* parchment */
}
::-webkit-scrollbar-thumb {
    background: #14532d; /* forest */
    border-radius: 8px;
    border: 2px solid #f6f1e4;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9971f; /* gold */
}

/* Warna seleksi teks senada tema */
::selection {
    background: rgba(201, 151, 31, 0.35); /* gold transparan */
    color: #123524;
}

/* =====================================================
   Rapikan input number (hilangkan panah spinner bawaan)
   Biar input nomor urut tampil bersih kayak di desain
===================================================== */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type='number'] {
    -moz-appearance: textfield;
}