* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: url('https://picsum.photos/1600/900?random') no-repeat center center fixed;
    background-size: cover;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.85);
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
}

.navbar a:hover {
    background: #007bff;
}

.navbar a.active {
    background: #007bff;
    color: #fff;
}

.for-sale-text {
    margin-top: 80px;
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    z-index: 998;
    animation: fadeIn 1s ease-in;
    display: <?php echo $page === 'home' ? 'block' : 'none'; ?>;
}

.visitor-country {
    margin-top: 20px;
    text-align: center;
    font-size: 20px;
    color: #f1f1f1;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
    z-index: 998;
    max-width: 600px;
    line-height: 1.5;
    display: <?php echo $page === 'home' ? 'block' : 'none'; ?>;
}

.content-section {
    margin-top: 100px;
    width: 100%;
    max-width: 900px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Styles untuk halaman Hitung */
.hitung-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}
.hitung-controls select, .hitung-controls button {
    padding: 10px;
    font-size: 1em;
    border-radius: 8px;
    border: 1px solid #ccc;
    cursor: pointer;
    background: #fff;
    color: #333;
}
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    padding: 15px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.number-btn {
    background-color: #ff6f61;
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.2em;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
}
.number-btn:hover {
    background-color: #ff4f41;
    transform: scale(1.1) rotate(2deg);
}
.number-btn:active {
    transform: scale(0.95);
}
.swiper-container {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    display: none;
    overflow: hidden;
}
.image-mode .swiper-container {
    display: block;
}
.swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}
.swiper-slide img {
    width: 250px;
    height: 250px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 5px;
}
.swiper-slide span {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
}
.number-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    max-width: 500px;
}
.nav-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 30px;
}
.nav-btn:hover {
    background-color: #45a049;
}
.nav-btn.active {
    background-color: #ff4f41;
}
.image-mode .number-grid {
    display: none;
}

/* Styles umum lain dari index.php (download, downloader, dll.) */
.download-section h2 {
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
}
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}
.download-button {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff, #f1f1f1);
    border-radius: 12px;
    width: 300px;
    height: 60px;
    padding: 0 20px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.download-button svg {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}
.downloader-form {
    width: 100%;
    max-width: 600px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.downloader-form input[type="text"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}
.downloader-form button {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.downloader-form button:hover {
    background: linear-gradient(135deg, #0056b3, #003d80);
    transform: translateY(-2px);
}
#results { margin-top: 20px; }
.item { margin-bottom: 15px; padding: 15px; background: white; border: 1px solid #ddd; border-radius: 10px; }
.thumb { max-width: 250px; display: block; margin-bottom: 10px; border-radius: 6px; }
.btn { display: inline-block; padding: 10px 14px; background: #2196f3; color: white; border-radius: 6px; text-decoration: none; font-weight: bold; }
.btn:hover { background: #1976d2; }

/* Popup untuk resolution (jika diperlukan) */
#resolutionPopup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    max-width: 400px;
    width: 90%;
    text-align: center;
}
#resolutionPopup h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 16px;
}
#resolutionPopup .resolution-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#resolutionPopup .resolution-button {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}
#resolutionPopup .resolution-button:hover {
    background: linear-gradient(135deg, #0056b3, #003d80);
}
#resolutionPopup .close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ccc;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
}

/* Contact dan Donate */
#contactBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, background 0.3s;
}
#contactBtn:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #0056b3, #003d80);
}
#contactFormWrapper {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    width: 320px;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
#contactFormWrapper input, #contactFormWrapper textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: border-color 0.3s;
}
#contactFormWrapper input:focus, #contactFormWrapper textarea:focus {
    border-color: #007bff;
    outline: none;
}
#contactFormWrapper button[type="submit"] {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 12px;
    border: none;
    width: 100%;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}
#contactFormWrapper button[type="submit"]:hover {
    background: linear-gradient(135deg, #0056b3, #003d80);
}
#contactFormWrapper h4 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #333;
}
/* Donate Section - Fixed di kiri bawah */
#donate-box-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    z-index: 998; /* di bawah contact button (z-index 999) */
    align-items: flex-end;
}

.donate-box {
    background: rgba(0, 0, 0, 0.85);
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-width: 280px;
}

.donate-box img {
    width: 48px;
    height: 48px;
    cursor: pointer;
    border-radius: 8px;
}

.donate-box div {
    color: #fff;
    font-size: 14px;
}

.donate-box strong {
    color: #FFD700;
}

/* Responsive: Mobile → vertical */
@media (max-width: 600px) {
    #donate-box-container {
        flex-direction: column;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 400px;
        align-items: center;
    }

    .donate-box {
        width: 100%;
        min-width: auto;
        justify-content: center;
    }

    .donate-box img {
        width: 40px;
        height: 40px;
    }
}

/* Pastikan tidak tertutup contact button */
#contactBtn {
    z-index: 999;
}

/* Popup donate */
#donate-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

#donate-popup.active {
    display: flex;
}

#donate-popup img {
    max-width: 90%;
    max-height: 90%;
    border: 4px solid white;
    border-radius: 12px;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 600px) {
    .for-sale-text {
        font-size: 32px;
        margin-top: 80px;
    }
    .visitor-country {
        font-size: 16px;
        padding: 0 15px;
    }
    .content-section {
        margin-top: 80px;
        padding: 10px;
    }
    .swiper-container {
        max-width: 100%;
        padding: 0;
        margin: 10px auto;
    }
    .swiper-slide {
        padding: 5px;
    }
    .swiper-slide img {
        width: 180px;
        height: 180px;
    }
    .swiper-slide span {
        font-size: 2em;
    }
    .hitung-controls {
        flex-direction: column;
        gap: 10px;
    }
    .hitung-controls select, .hitung-controls button {
        width: 100%;
        max-width: 200px;
    }
    .number-nav {
        gap: 5px;
        max-width: 100%;
    }
    .nav-btn {
        padding: 6px 10px;
        font-size: 0.9em;
        min-width: 25px;
    }
    .navbar ul {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .navbar a {
        font-size: 14px;
        padding: 6px 12px;
    }
    #resolutionPopup {
        width: 95%;
    }
    #contactFormWrapper {
        width: 90%;
        right: 5%;
    }
   
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #a41818;
    color: #1a1a1a;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}
.download-button:hover {
    background: #FFC107;
}
.spoiler-box {
    margin-top: 20px;
    background: #a41818;
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid #ddd;
}
.spoiler-box summary {
    font-weight: bold;
    cursor: pointer;
    list-style: none;
}
.spoiler-box summary::marker {
    content: '';
}
.spoiler-box summary:hover {
    color: #007bff;
}
.spoiler-content {
    margin-top: 10px;
}
.spoiler-content code {
    background: #eee;
    border-radius: 4px;
    padding: 2px 5px;
}
.spoiler-content pre {
    background: #272822;
    color: #f8f8f2;
    padding: 8px 12px;
    border-radius: 6px;
    overflow-x: auto;
}
.download-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFD43B;
    color: #1a1a1a;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}
.download-button:hover {
    background: #FFC107;
}
.spoiler-box {
    margin-top: 20px;
    background: #a41818;
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid #ddd;
}
.spoiler-box summary {
    font-weight: bold;
    cursor: pointer;
    list-style: none;
}
.spoiler-box summary::marker {
    content: '';
}
.spoiler-box summary:hover {
    color: #007bff;
}
.spoiler-content {
    margin-top: 10px;
}
.spoiler-content code {
    background: #a41818;
    border-radius: 4px;
    padding: 2px 5px;
}
.spoiler-content pre {
    background: #a41818;
    color: #f8f8f2;
    padding: 8px 12px;
    border-radius: 6px;
    overflow-x: auto;
}
/* container */
.hint-wrapper {
  position: relative;
  display: inline-block;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* icon */
.hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffcc00;
  color: #222;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  transition: transform .12s ease;
}

/* hover 'pop' */
.hint-icon:hover,
.hint-icon:focus {
  transform: translateY(-2px);
  outline: none;
}

/* tooltip box */
.hint-box {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(6px);

  /* Ukuran lebih besar dan melebar */
  min-width: 480px;
  max-width: 480px; /* tambahkan angka jika mau lebih lebar */

  padding: 12px 14px;
  background: #ffffff;
  color: #111;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  font-size: 14px;
  line-height: 1.4;

  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 999;
  margin-top: 8px;
}

/* arrow */
.hint-box::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: #fff;
  box-shadow: -3px -3px 6px rgba(0,0,0,0.05);
}

/* show on hover or focus (keyboard) */
.hint-icon:hover + .hint-box,
.hint-icon:focus + .hint-box,
.hint-wrapper.show .hint-box {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* responsive: keep tooltip inside viewport */
@media (max-width: 480px) {
  .hint-box {
    left: 0 !important;
    right: 0 !important;
    transform: none !important;

    width: calc(100vw - 40px); /* 20px padding kiri-kanan */
    max-width: none;
    min-width: 0;

    margin-left: 20px;
    margin-right: 20px;
    padding: 14px 16px;

    white-space: normal; /* biar teks turun rapi */
  }

  .hint-box::before {
    left: 30px !important; /* posisikan panah ke icon */
    transform: rotate(45deg);
  }
}

/* ======= MOBILE OVERRIDE (STRONG) - ADDED AT BOTTOM ======= */
/* This block is appended to force donate-box to be part of page flow on small screens,
   placed after all original CSS so it overrides fixed positions without deleting anything. */
@media (max-width: 600px) {
    /* Reset any fixed positioning for donate and ensure it sits in normal flow */
    #donate-box-container {
        position: relative !important;
        bottom: auto !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;

        width: 100% !important;
        margin: 20px auto 0 auto !important;

        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 12px !important;
        z-index: 1 !important;
    }

    .donate-box {
        width: 92% !important;
        max-width: 420px !important;
        padding: 10px !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }

    .donate-box img {
        width: 36px !important;
        height: 36px !important;
        margin-right: 10px !important;
    }

    /* Make sure contact form still floats but not covering donate when opened */
    #contactFormWrapper {
        width: 92% !important;
        right: 4% !important;
        bottom: 20px !important;
    }

    /* Ensure footer has space so donate is visible above it */
    footer {
        margin-bottom: 80px !important;
    }
}

.donation-page{
    padding:30px;
}

.donation-header{
    text-align:center;
    margin-bottom:30px;
}

.donation-header h2{
    font-size:32px;
    margin-bottom:10px;
}

.donation-header p{
    color:#9ca3af;
    max-width:650px;
    margin:auto;
}

.donation-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
    gap:24px;
}

.donation-card{
    background:#111827;
    border:1px solid #1f2937;
    border-radius:18px;
    padding:20px;
    display:flex;
    gap:18px;
    align-items:center;
    box-shadow:0 10px 25px rgba(0,0,0,.25);
    transition:.25s;
}

.donation-card:hover{
    transform:translateY(-4px);
    border-color:#16a34a;
}

.donation-qr{
    width:240px;
    height:240px;
    min-width:240px;
    object-fit:contain;
    object-position:center;
    background:#fff;
    padding:8px;
    border-radius:12px;
    cursor:pointer;
    flex-shrink:0;
    box-sizing:border-box;
}

.donation-content{
    display:flex;
    flex-direction:column;
    gap:10px;
    width:100%;
}

.donation-content strong{
    font-size:18px;
}

.donation-content span{
    color:#d1d5db;
    word-break:break-all;
    font-size:14px;
}

.copy-button{
    width:fit-content;
    padding:8px 14px;
    border:none;
    border-radius:10px;
    background:#16a34a;
    color:white;
    cursor:pointer;
    font-weight:600;
}

.copy-button:hover{
    background:#15803d;
}

.seo-hidden{
position:absolute;
left:-9999px;
}