/* CSS Variables (Disesuaikan dengan tema hitam & ungu) */
:root {
    --bg-color: #03001C;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0b0;
    --accent-primary: #9f5afd;
    --accent-secondary: #7c3aed;
    --glass-bg: rgba(0, 0, 0, 0.3); 
    --glass-border: rgba(255, 255, 255, 0.1);
    --error-bg: rgba(255, 100, 100, 0.1);
    --error-border: rgba(255, 100, 100, 0.5);
    --error-text: #ffc0c0;
    --glow-color: rgba(159, 90, 253, 0.5);
}

/* Keyframes untuk Animasi Nebula */
@keyframes nebula-drift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* Gaya Dasar diubah agar bisa scroll */
html, body {
    margin: 0; padding: 0; width: 100%;
}
body {
    font-family: 'Poppins', sans-serif; color: var(--text-primary);
    background-color: var(--bg-color);
}

/* Background Kosmik (Nebula CSS + Canvas) */
#galaxy-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(ellipse at 70% 20%, #533483 0%, transparent 50%),
        radial-gradient(ellipse at 30% 30%, #293462 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, #464194 0%, transparent 40%),
        radial-gradient(ellipse at 10% 90%, #03001C 0%, transparent 60%);
    background-size: 200% 200%;
    animation: nebula-drift 40s alternate infinite;
    z-index: -2;
}

#star-canvas {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
}

/* Wrapper konten tidak lagi membatasi tinggi */
main.content-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    gap: 40px;
}

/* Kontainer Aplikasi */
.container {
    width: 100%;
    max-width: 900px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    flex-shrink: 0;
}

/* Styling lainnya */
h1 {
    color: #fff; text-align: center; font-family: 'Playfair Display', serif;
    font-size: 32px; margin: 0 0 30px 0;
    text-shadow: 0 0 10px var(--glow-color);
}

.search-form { display: flex; gap: 10px; margin-bottom: 30px; }
#keyword-input {
    flex-grow: 1; padding: 14px 20px; font-size: 16px;
    background-color: rgba(0, 0, 0, 0.2); border: 1px solid var(--glass-border);
    border-radius: 10px; color: var(--text-primary); transition: all 0.3s ease;
}
#keyword-input::placeholder { color: var(--text-secondary); }
#keyword-input:focus {
    outline: none; border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(159, 90, 253, 0.3);
}
#search-button {
    padding: 14px 25px; font-size: 16px; font-weight: 600; color: #fff;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border: none; border-radius: 10px; cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; gap: 8px;
}
#search-button svg { width: 18px; height: 18px; stroke: #fff; }
#search-button:hover {
    transform: translateY(-2px); box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
}
#search-button:disabled {
    background: #555; cursor: not-allowed; transform: translateY(0); box-shadow: none;
}
#button-text { display: inline-block; }

.results-area { margin-top: 20px; }
.status {
    text-align: center; font-style: italic; color: var(--text-secondary);
    padding: 30px 15px; background: rgba(0,0,0,0.2); border-radius: 10px;
}
.error { color: var(--error-text); background-color: var(--error-bg); border: 1px solid var(--error-border); }

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    align-items: start;
}

.result-category { animation: fadeIn 0.5s ease-out forwards; }
.result-category h2 {
    border-bottom: 1px solid var(--glass-border); padding-bottom: 10px;
    margin: 0 0 20px 0; 
    color: #fff;
    font-size: 22px; font-weight: 600;
}
.result-item {
    background: rgba(255, 255, 255, 0.05); border: 1px solid transparent;
    padding: 15px 20px; margin-bottom: 12px; border-radius: 10px;
    display: flex; justify-content: space-between; align-items: center;
    transition: all 0.3s ease;
}
.result-item:hover {
    transform: scale(1.02); border-color: var(--accent-primary);
    background: rgba(159, 90, 253, 0.1);
}
.result-item .content-wrapper { flex-grow: 1; margin-right: 15px; display: flex; flex-direction: column; gap: 5px; }
.result-item .deskripsi { color: var(--text-primary); font-weight: 400; }
.result-item .detail-2d { color: var(--text-secondary); font-size: 13px; font-style: italic; }
.result-item .kode {
    font-weight: bold; font-size: 18px; color: var(--accent-primary);
    font-family: "Courier New", Courier, monospace; background-color: rgba(159, 90, 253, 0.15);
    padding: 8px 12px; border-radius: 8px; flex-shrink: 0;
}

.result-category.is-empty {
    opacity: 0.5;
}
.result-category.is-empty::after {
    content: 'Tidak ada hasil di kategori ini.';
    display: block;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 14px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* STYLE UNTUK SHIO CHECKER */
.shio-checker h3 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}
.shio-form {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}
#shio-input {
    flex-grow: 1;
    padding: 14px 20px;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    text-align: center;
}
#shio-input::placeholder { color: var(--text-secondary); }
#shio-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(159, 90, 253, 0.3);
}
#shio-button {
    padding: 14px 25px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
#shio-button svg { width: 18px; height: 18px; stroke: #fff; }
#shio-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
}
#shio-button:disabled {
    background: #555;
    cursor: not-allowed;
    transform: translateY(0);
    box-shadow: none;
}
.shio-result-area {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}
.shio-result-area.shio-success {
    background-color: rgba(159, 90, 253, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--text-primary);
}
.shio-result-area.shio-error {
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
}
.shio-name {
    font-weight: bold;
    font-size: 20px;
    color: var(--accent-primary);
    margin-left: 8px;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
}

/* Hoki Generator Styles */
.hoki-generator h3 { color: #fff; font-size: 22px; margin-bottom: 10px; font-family: 'Playfair Display', serif; }
.hoki-numbers { display: flex; justify-content: center; gap: 15px; margin-bottom: 25px; flex-wrap: wrap; }
.hoki-number { font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 20px; color: var(--accent-primary); background-color: rgba(159, 90, 253, 0.15); padding: 10px 15px; border-radius: 10px; min-width: 60px; text-align: center; display: inline-block; transition: all 0.3s ease; }
.generate-button { padding: 12px 25px; font-size: 16px; font-weight: 600; color: #fff; background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary)); border: none; border-radius: 10px; cursor: pointer; transition: all 0.3s ease; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; }
.generate-button svg { width: 18px; height: 18px; stroke: #fff; }
.generate-button:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5); }
.generate-button:disabled { opacity: 0.7; cursor: not-allowed; }
.hoki-features { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--text-secondary); }

/* === STYLE UNTUK HASIL SHIO (EMOJI) === */
.shio-result-area {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
    font-size: 20px; /* Diperbesar agar lebih menonjol */
    font-weight: 600;
    transition: all 0.3s ease;
}
.shio-result-area.shio-success { background-color: rgba(159, 90, 253, 0.1); border: 1px solid var(--accent-primary); color: var(--text-primary); }
.shio-result-area.shio-error { background-color: var(--error-bg); border: 1px solid var(--error-border); color: var(--error-text); font-size: 16px; font-weight: 400; }
.shio-name { color: var(--accent-primary); margin: 0 5px; } /* Atur margin untuk nama shio */

/* STYLE UNTUK LAYOUT ALAT BANTU (DUAL COLUMN) */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dua kolom sama lebar */
    gap: 30px; /* Jarak antar kolom */
    margin-top: 40px;
    align-items: stretch; /* Membuat tinggi kedua card sama */
}
.tool-card {
    padding: 30px;
    background: var(--glass-bg);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    text-align: center;
    animation: fadeIn 0.8s ease-out forwards;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.tool-card .hoki-description,
.tool-card .shio-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* --- Style untuk Landing Page Lengkap --- */
.landing-footer {
    width: 100%; 
    max-width: 900px; 
    margin-top: 80px;
    padding: 60px 40px;
    text-align: center; 
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}
.landing-footer .section-title {
    font-family: 'Playfair Display', serif; 
    font-size: 32px;
    color: #fff; 
    margin-bottom: 20px; 
    text-shadow: 0 0 10px var(--glow-color);
}
.landing-footer .intro-text {
    color: var(--text-secondary); 
    font-size: 16px;
    line-height: 1.7; 
    max-width: 700px;
    margin: 0 auto 60px auto;
}
.landing-footer .subsection-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: var(--text-primary);
    margin: 60px 0 30px 0;
    text-align: center;
}
.how-it-works-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 600px;
    counter-reset: step-counter;
}
.how-it-works-list li {
    display: flex;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 30px;
    position: relative;
    padding-left: 60px;
}
.how-it-works-list li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--glow-color);
}
.how-it-works-list .step-content h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--text-primary);
}
.how-it-works-list .step-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}
.features-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 25px; 
    margin-top: 20px;
}
.feature-card {
    background: var(--glass-bg); 
    padding: 30px; 
    border-radius: 15px;
    border: 1px solid var(--glass-border); 
    transition: all 0.3s ease;
    text-align: left;
}
.feature-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2); 
    border-color: var(--accent-primary); 
}
.feature-icon { 
    color: var(--accent-primary); 
    margin-bottom: 15px; 
}
.feature-icon svg { 
    width: 40px; 
    height: 40px; 
}
.feature-card h3 { 
    font-size: 20px; 
    font-weight: 600; 
    color: var(--text-primary); 
    margin: 0 0 10px 0; 
}
.feature-card p { 
    font-size: 14px; 
    color: var(--text-secondary); 
    line-height: 1.6; 
    margin: 0; 
}
.final-cta {
    margin: 60px 0 40px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.footer-credit { 
    margin-top: 40px; 
    color: var(--text-secondary); 
    font-size: 14px; 
    opacity: 0.7; 
}
/* =================================== */
/*   STYLE UNTUK ALAT PENGECEKAN TOGEL */
/* =================================== */
.results-container {
    width: 100%;
    margin-top: 40px; /* Jarak dari kontainer di atasnya */
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    animation: fadeIn 1s ease-out;
}

.results-title {
    color: #fff;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin: 0 0 30px 0;
    text-shadow: 0 0 10px var(--glow-color);
}
.togel-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#togel-keyword-input {
    flex-grow: 1;
    padding: 14px 20px;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}
#togel-keyword-input::placeholder { color: var(--text-secondary); }
#togel-keyword-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(159, 90, 253, 0.3);
}

#togel-search-button {
    padding: 14px 25px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
#togel-search-button:disabled {
    background: #555;
    cursor: not-allowed;
}

.togel-single-result-area {
    margin-top: 20px;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* KARTU HASIL YANG DIROMBAK TOTAL */
.togel-result-card {
    background: transparent; /* Hilangkan background kartu agar menyatu */
    border: none; /* Hilangkan border kartu */
    padding: 0; /* Hapus padding kartu */
    text-align: center;
    width: 100%;
    max-width: 400px; /* Lebar maksimal kartu */
    animation: fadeIn 0.5s ease;
}

.pasaran-info {
    margin-bottom: 15px; /* Jarak antara info dan nomor */
}

.pasaran-name {
    font-weight: 600;
    font-size: 20px; /* Ukuran font lebih besar */
    color: var(--text-primary);
    margin: 0 0 5px 0;
}

.pasaran-meta {
    font-size: 13px; /* Ukuran font lebih kecil */
    color: var(--text-secondary);
    margin: 0;
}

/* KOTAK NOMOR YANG BARU */
.togel-result-number {
    font-family: "Poppins", sans-serif; /* Ganti font agar lebih modern */
    font-weight: 700; /* Tebal */
    font-size: 42px; /* Ukuran font sangat besar */
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.3); /* Latar belakang gelap */
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    display: flex; /* Gunakan flexbox untuk menata spasi */
    justify-content: center; /* Sejajarkan ke tengah */
    gap: 15px; /* Jarak antar digit */
}

.togel-result-number span {
    color: var(--accent-primary); /* Warna ungu untuk setiap digit */
}

/* Style untuk pesan loading atau error */
.status-message {
    color: var(--text-secondary);
    font-style: italic;
}
.status-message.error {
    color: var(--error-text);
}

/* -- RESPONSIVE -- */
@media (max-width: 820px) {
    /* Perkecil padding utama agar konten tidak terpotong */
    .container, 
    .results-container { /* <-- TAMBAHKAN INI */
        padding: 30px 20px;
    }

    /* Buat layout utama menjadi 1 kolom */
    .tools-grid {
        grid-template-columns: 1fr;
    }

    /* Buat form pencarian menumpuk ke bawah agar tidak terpotong */
    .search-form,
    .shio-form,
    .togel-search-form { /* <-- TAMBAHKAN INI */
        flex-direction: column; /* Tombol akan pindah ke bawah input */
        align-items: stretch; /* Buat input dan tombol selebar kontainer */
    }

    /* Perkecil ukuran font judul agar tidak terlalu besar */
    h1 {
        font-size: 28px;
    }

    .shio-checker h3, .hoki-generator h3, .results-title { /* <-- TAMBAHKAN INI */
        font-size: 20px;
    }
    #togel-search-button {
        align-self: center; /* Posisikan tombol di tengah, jangan meregang */
        width: auto;        /* Biarkan lebarnya sesuai konten + padding */
        padding-left: 50px; /* Beri padding horizontal agar tidak terlalu kecil */
        padding-right: 50px;
    }
}