/* --- MEDIEVAL VARIABLES & GLOBAL STYLES --- */
:root {
    --med-gold-light: #ffd700;
    --med-gold-dark: #b8860b;
    --med-brown-dark: #1a110a;
    --med-brown-leather: #2c1e16;
    --med-iron-border: #4a3000; /* Coklat tua besi berkarat untuk border */
}

body {
    font-family: 'Cinzel', serif; /* REKOMENDASI: Gunakan font serif seperti Cinzel atau Trajan dari Google Fonts jika memungkinkan */
    font-size: var(--normal-font-size);
    /* Latar belakang bertekstur kulit gelap */
    background:
        radial-gradient(circle at center, rgba(44, 30, 22, 0.8) 0%, rgba(26, 17, 10, 1) 100%),
        repeating-linear-gradient(45deg, #1a110a, #1a110a 5px, #24160f 5px, #24160f 10px);
    color: var(--text-color);
}

/* Efek Teks Emas yang Dipahat */
h1, h2, h3, h4, h5, h6, .navbar-brand a, .card-title, .hitung, .btn-card {
    text-shadow: 2px 2px 0px #000, -1px -1px 1px rgba(255, 215, 0, 0.3);
    letter-spacing: 1px;
}


/* --- SCROLLBAR ALA GULUNGAN KUNO --- */
body::-webkit-scrollbar {
    width: 12px; /* Lebih lebar seperti mekanisme kuno */
}

body::-webkit-scrollbar-track {
    background-color: #0d0805;
    border-left: 2px solid #4a3000;
    border-right: 2px solid #4a3000;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

body::-webkit-scrollbar-thumb {
    /* Gradasi emas metalik dengan tekstur */
    background: repeating-linear-gradient(
        45deg,
        #b8860b,
        #ffd700 10px,
        #966F33 20px
    );
    border: 2px solid #1a110a;
    border-radius: 4px;
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.2);
}


/* --- BUTTONS (Lempengan Emas) --- */
.backToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 15px;
    z-index: 99;
    /* Gaya tombol lempengan logam */
    border: 3px ridge var(--med-gold-dark);
    background: linear-gradient(180deg, #b8860b 0%, #e6c200 50%, #b8860b 100%);
    color: #1a110a;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 18px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.7), inset 0 0 5px rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    border-radius: 2px; /* Sudut sedikit tajam */
}

.backToTopBtn:hover {
    background: linear-gradient(180deg, #ffd700 0%, #fff0a3 50%, #ffd700 100%);
    box-shadow: 0 0 15px var(--med-gold-light);
    transform: translateY(-3px);
}

.row .logo-pasar .logo-pasaran {
  margin: 15px;
  width: 15%;
  border-radius: 4px;
}

/* Tombol Hitung/Generate (Lempengan Emas Berat) */
.hitung, .tombol .btn-card  {
    background: linear-gradient(to bottom, #b8860b 0%, #ffd700 50%, #966F33 100%);
    /* Border ridge memberikan efek bingkai 3D kuno */
    border: 4px ridge rgba(184, 134, 11, 0.8);
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    height: auto;
    padding: 10px 8px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.6), inset 0 1px 3px rgba(255,255,255,0.4);
    border-radius: 4px;
}
.nav-item .btn-login {
    background: linear-gradient(to bottom, #b8860b 0%, #ffd700 50%, #966F33 100%);
    /* Border ridge memberikan efek bingkai 3D kuno */
    border: 4px ridge rgba(184, 134, 11, 0.8);
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    height: auto;
    padding: 8px 25px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.6), inset 0 1px 3px rgba(255,255,255,0.4);
    border-radius: 4px;
}

.hitung:hover, .tombol .btn-card:hover, .nav-item .btn-login:hover {
    background: linear-gradient(to bottom, #ffd700 0%, #ffe680 50%, #b8860b 100%);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    color: #fff;
}

/* Tombol Hapus (Segel Merah) */
.hapus {
    background: linear-gradient(180deg, #8b0000 0%, #5c0000 100%);
    border: 3px ridge #ff0000;
    color: #fdfbf7;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    height: 45px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.7);
    border-radius: 4px;
    text-shadow: 1px 1px 2px #000;
}

.hapus:hover {
    background: linear-gradient(180deg, #b30000 0%, #8b0000 100%);
    box-shadow: 0 0 15px #ff0000;
}


/* --- NAVBAR (Balok Kayu & Besi) --- */
.navbar {
    height: 90px; /* Sedikit lebih tinggi untuk detail */
}

.navbar-toggler {
    border: none !important;
    outline: 0;
    box-shadow: none;
}

.navbar-color {
    /* Latar belakang tekstur kayu gelap */
    background: linear-gradient(to bottom, rgba(44, 30, 22, 0.9), rgba(26, 17, 10, 1)),
                url('https://www.transparenttextures.com/patterns/wood-pattern.png');
    /* Border bawah seperti plat besi */
    border-bottom: 5px solid;
    border-image: linear-gradient(to right, #1a110a, #b8860b, #ffd700, #b8860b, #1a110a) 1;
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
}

.navbar-brand .logo {
    width: 200px;
    height: auto;
    filter: drop-shadow(0px 0px 5px #b8860b); /* Logo bersinar */
}

.navbar-nav>li {
    padding-left: 20px;
    padding-right: 20px;
    font-weight: 600;
}

.navbar-nav>li a {
    color: #e0d5c1; /* Warna perkamen */
    text-transform: uppercase;
    text-shadow: 1px 1px 2px #000;
    transition: all 0.3s ease;
}

.navbar-nav>li a:hover {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Animasi Teks Menu */
.in-show {
    animation: waviyMedieval 1.5s infinite ease-in-out;
    animation-delay: calc(.1s * var(--i));
}

@keyframes waviyMedieval {
    0%, 100% {
        transform: translateY(0);
        color: #ffd700;
        text-shadow: 0 0 10px #b8860b, 0 0 20px #b8860b; /* Efek api/sihir */
    }
    50% {
        transform: translateY(-10px);
        color: #fff;
        text-shadow: 0 0 5px #ffd700;
    }
}

.main {
background: rgba(0,0,0,.8);
    border: 5px groove #b8860b;
    box-shadow: 0 15px 30px rgba(0,0,0,0.8), inset 0 0 50px rgba(0,0,0,0.7);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* --- CARDS & CONTAINERS (Peti Harta Karun) --- */
.card {
    /* Tekstur interior seperti kulit/peti */
    background: linear-gradient(135deg, #3e2723, #2c1e16);
    /* Border groove untuk bingkai ukiran */
    border: 5px groove #b8860b;
    box-shadow: 0 15px 30px rgba(0,0,0,0.8), inset 0 0 50px rgba(0,0,0,0.7);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* Opsional: Menambahkan efek sudut logam dengan pseudo-element */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid rgba(255, 215, 0, 0.2);
    pointer-events: none;
    margin: 5px;
}


.logo-pools {
    /* Bingkai emas di dalam kartu */
    border: 3px ridge #ffd700;
    margin: 2.2rem 2.2rem 5px 2.2rem;
    border-radius: 10px;
    background: radial-gradient(circle, #3e2723 0%, #1a110a 100%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.9);
}

.logo-pools img {
    height: 130px;
    width: 130px;
    padding: 10px;
}

.card-body .card-title {
    color: #ffd700;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid #4a3000;
    display: inline-block;
}

.card-body .card-allow {
    color: #e0d5c1;
    text-transform: uppercase;
    font-size: 25px;
    font-weight: 500;
    text-shadow: 1px 1px 2px #000;
}

.card-body .card-result {
    color: #1a110a;
    font-weight: 900;
    font-size: 48px;
    margin: 15px 20px;
    padding: 10px;
    /* Lempengan hasil yang menyala */
    background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
    border: 4px ridge #ffeb99;
    border-radius: 6px;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4), inset 0 2px 5px rgba(255,255,255,0.5);
    text-shadow: 1px 1px 1px rgba(255,255,255,0.5);
}

.card-body .card-time {
    color: #e6c200;
    font-size: 18px;
    text-transform: uppercase;
    font-weight: bold;
}


.close-btn {
    color: #ff0000;
    background: none;
    border: none;
    font-weight: bold;
    transition: 0.5s;
    float: inline-end;
    font-size: 18pt;
    height: 35px;
    text-shadow: 0 0 5px #000;
}

.close-btn:hover {
    transform: rotate(90deg) scale(1.2);
    color: #ff4d4d;
    text-shadow: 0 0 10px #ff0000;
}


/* --- MODAL MEDIEVAL --- */
.modal-content {
    /* Latar belakang modal seperti penjara bawah tanah/ruang harta */
    background: linear-gradient(135deg, #2c1e16, #0d0805);
    border: 6px ridge #b8860b; /* Bingkai sangat tebal */
    box-shadow: 0 0 50px rgba(0,0,0,0.9);
}

.modal-header {
    border-bottom: 3px ridge #4a3000;
    background-color: rgba(0,0,0,0.3);
}

.modal-footer {
    border-top: 3px ridge #4a3000;
    background-color: rgba(0,0,0,0.3);
}

.modal-body {
    font-weight: bold;
    margin-top: -30px;
    color: #e0d5c1;
}

.row .logo-pasar {
    display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
    background: url('../img/Backdrop-Logo.webp') center center no-repeat;
    background-size: cover;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9), 0 0 20px #000;
    perspective: 1000px;
    border: 3px groove #b8860b;
    border-radius: 4px;
}

/* Kotak-kotak input di dalam modal */
.row .no-result, .row .generate, .row .generate-name, .row .generate-result, .row .generate-dua {
    justify-content: center;
    border-radius: 4px;
    /* Border besi */
    border: 2px solid #4a3000;
    background-color: #1a110a; /* Latar sangat gelap */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
    color: #ffd700;
    align-items: center;
    display: flex;
    font-weight: bold;
	padding: 2px;
}
/* end Modal Baru */


/* --- TABEL & GENERATOR --- */
.history-result-name {
    color: #ffd700;
    text-shadow: 1px 1px 2px #000;
}

.convert-title {
    font-size: 24px;
    color: #e0d5c1;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 3px groove #b8860b;
    display: inline-block;
    margin-bottom: 15px;
}

.convert-winning {
    font-size: 18px;
    color: #ffd700;
    font-weight: bold;
}

/* Tab Navigasi */
.generator-tab {
    background-color: #2c1e16;
    border-bottom: 4px ridge #b8860b;
}

.generator-tab .nav-item .nav-link {
    color: #b8860b;
    background-color: #1a110a;
    font-weight: bold;
    border: 2px solid transparent;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
}

.generator-tab .nav-item .nav-link.active,
.generator-tab .nav-item .nav-link:hover {
    /* Tab aktif menyala */
    background: linear-gradient(180deg, #b8860b 0%, #ffd700 100%);
    color: #1a110a;
    border: 2px ridge #ffe680;
    box-shadow: 0 -5px 15px rgba(184, 134, 11, 0.4);
}

/* Input Fields */
.tab-content .tab-pane form .winning .scroll,
.tab-content .tab-pane form .additional .scroll {
    background: #0d0805; /* Sangat gelap */
    color: #ffd700;
    border: 2px solid #4a3000; /* Border besi */
    border-radius: 25px;
    height: 40px;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 8px #000;
    font-weight: bold;
}


.result .hasil {
    /* Hasil akhir seperti batu permata emas */
    background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
    color: #fff;
    font-weight: 700;
    margin: auto;
    padding: 15px 30px;
    border-radius: 35px;
    border: 4px ridge #fff0a3;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7), inset 0 2px 5px #fff;
    text-transform: uppercase;
    font-size: 2em;
}

.shio {
    color: #ffd700;
    text-shadow: 1px 1px 2px #000;
    font-size: 1.5em;
    font-weight: bold;
}

.nomor {
    color: #e0d5c1;
    font-size: 1.2em;
    text-shadow: 1px 1px 2px #000;
}

.shio-border {
    margin: 15px;
    border: 5px groove #b8860b;
    border-radius: 15px;
    background: radial-gradient(circle, #3e2723 0%, #0d0805 100%);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    padding: 10px;
}


/* --- FOOTER --- */
.footer-clean {
    padding: 50px 0;
    background: linear-gradient(to bottom, #1a110a, #0d0805);
    color: #e0d5c1;
    border-top: 5px groove #b8860b;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
}

.footer-clean h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-weight: 800;
    font-size: 18px;
    color: #ffd700;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px #000;
    letter-spacing: 1px;
}

.footer-clean ul a {
    color: #e0d5c1;
    text-decoration: none;
    opacity: 0.8;
    transition: 0.3s;
}
.footer-clean .item.social {
  text-align: right;
}

.footer-clean ul a:hover {
    opacity: 1;
    color: #ffd700;
    padding-left: 5px; /* Sedikit bergeser saat di-hover */
    text-shadow: 0 0 5px #b8860b;
}

.footer-clean .item.social>a {
    font-size: 24px;
    width: 50px;
    height: 50px;
    line-height: 46px; /* Disesuaikan dengan border */
    background-color: #2c1e16;
    border: 2px solid #4a3000;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    margin-left: 10px;
    margin-top: 22px;
    color: #b8860b;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
    transition: 0.3s all ease;
}

.footer-clean .item.social>a:hover {
    background-color: #b8860b;
    color: #1a110a;
    border-color: #ffd700;
    box-shadow: 0 0 15px #ffd700;
    transform: scale(1.1);
}


/* --- SWEETALERT CUSTOM --- */
.my-swal-popup {
    background: linear-gradient(135deg, #2c1e16, #1a110a) !important;
    color: #ffd700 !important;
    border: 4px ridge #b8860b !important;
    border-radius: 8px !important;
    box-shadow: 0 0 40px rgba(0,0,0,0.9) !important;
}

.swal2-title, .swal2-content {
    text-shadow: 1px 1px 2px #000;
}

.swal2-confirm {
    background: linear-gradient(180deg, #b8860b 0%, #ffd700 100%) !important;
    color: #1a110a !important;
    border: 3px ridge #ffe680 !important;
    font-weight: bold !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5) !important;
}

.swal2-confirm:hover {
    background: linear-gradient(180deg, #ffd700 0%, #ffe680 100%) !important;
    box-shadow: 0 0 20px #ffd700 !important;
}

.footer {
  background: linear-gradient(160deg, #1e120c 0%, #150d08 100%);
  border: 1px solid #5C3A21;
  border-radius: 15px;
  padding: 30px;
  margin: 30px auto;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 8px 20px rgba(0,0,0,0.4);
  color: #E6CFA0;
  line-height: 1.7;
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #8B6508, #FFD700, #8B6508);
}

.footer h1, .footer h2, .footer h3, .footer h4 {
  background: linear-gradient(to bottom, #FFD700, #B8860B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  margin-top: 25px;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.footer h1 {
  font-size: 2em;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 25px;
}

.footer h2 { font-size: 1.6em; }
.footer h3 { font-size: 1.3em; }

.footer p {
  margin-bottom: 20px;
  text-align: justify;
}

.footer a, p a {
  color: #FFD700;
  text-decoration: none;
  border-bottom: 1px dashed #B8860B;
  transition: all 0.3s ease;
  font-weight: 600;
}

.footer a:hover, p a:hover {
  color: #FFFACD;
  border-bottom-style: solid;
  border-color: #FFD700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.footer img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 2px solid #8B6508;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  margin: 20px auto;
  display: block;
}

.footer ul, .footer ol {
  margin-left: 20px;
  margin-bottom: 20px;
  padding-left: 20px;
}

.footer li {
  margin-bottom: 10px;
}

.footer li::marker {
  color: #D4AF37;
  font-weight: bold;
}

.footer blockquote {
  background: linear-gradient(90deg, rgba(139, 101, 8, 0.15) 0%, transparent 100%);
  border-left: 4px solid #D4AF37;
  padding: 15px 20px;
  margin: 20px 0;
  font-style: italic;
  border-radius: 0 8px 8px 0;
  color: #FFF8DC;
}

.footer table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: #1a0f0a;
  border: 1px solid #5C3A21;
  border-radius: 8px;
  overflow: hidden;
}

.footer th, .footer td {
  padding: 12px 15px;
  border: 1px solid #3e2723;
  text-align: left;
}

.footer th {
  background: linear-gradient(180deg, #3e2723 0%, #26160d 100%);
  color: #FFD700;
  font-weight: 700;
  text-transform: uppercase;
}

.footer tr:nth-child(even) {
  background-color: #1e120c;
}

.footer tr:hover {
  background-color: #2a1a11;
}

@media screen and (max-width: 768px) {
  .footer {
    padding: 20px;
    margin: 20px 10px;
    font-size: 15px;
  }
  
  .footer h1 { font-size: 1.7em; }
  .footer h2 { font-size: 1.4em; }
  
  .footer th, .footer td {
    padding: 10px;
    font-size: 14px;
  }

}