/* --- RESET & BACKGROUND UTAMA --- */
* { box-sizing: border-box; outline: none; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #0F172A; /* Warna Biru Tua */
    color: #FDFCF0; /* Warna Krem */
    padding: 20px; /* Padding lebih kecil untuk HP */
}

/* Container utama agar tidak terlalu lebar di layar besar */
.main-container {
    width: 100%;
    max-width: 400px; /* Lebar maksimal ideal untuk form */
    text-align: center;
    margin: auto; /* Posisi tengah */
}

/* --- HEADER --- */
.header-section {
    margin-bottom: 30px;
}

.logo-dreaming {
    font-family: 'Playfair Display', serif;
    font-size: 48px; /* Ukuran default */
    font-weight: 700;
    color: #FDFCF0;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.social-handle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 1.5px;
    opacity: 0.9;
}

.social-handle i { font-size: 16px; }

/* --- FORM BOX (KOTAK FORM) --- */
.form-box {
    background: rgba(253, 252, 240, 0.05);
    border-radius: 20px;
    /* Padding responsif: atas/bawah 30px, kiri/kanan 25px */
    padding: 30px 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(253, 252, 240, 0.1);
    width: 100%; /* Memenuhi container */
}

.form-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* --- INPUTS --- */
/* Memberi jarak yang cukup antar input agar tidak menimpa di HP */
.input-group { margin-bottom: 20px; text-align: left; }

label { 
    font-size: 11px; 
    color: rgba(253, 252, 240, 0.7); 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    display: block; 
    margin-bottom: 8px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 14px 18px; /* Padding input yang pas */
    background: transparent;
    border: 1px solid rgba(253, 252, 240, 0.3);
    border-radius: 10px;
    color: #FDFCF0;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    /* Menghilangkan shadow bawaan iOS */
    -webkit-appearance: none; 
    appearance: none;
}

input:focus { 
    border-color: #FDFCF0;
    background: rgba(253, 252, 240, 0.08);
}

/* Mengubah warna ikon kalender di Chrome/Android */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) sepia(1) saturate(5) hue-rotate(180deg);
    cursor: pointer;
}

/* --- BUTTON --- */
button {
    width: 100%;
    padding: 16px;
    margin-top: 10px;
    border-radius: 10px;
    border: none;
    background-color: #FDFCF0;
    color: #0F172A;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}
button:hover { 
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 252, 240, 0.2);
    background-color: #fff;
}

/* --- RESULT AREA --- */
#result-container { display: none; margin-top: 30px; animation: fadeIn 0.6s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Style dasar badge, warna akan diatur di Javascript */
.tier-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.user-name { font-family: 'Playfair Display', serif; font-size: 24px; margin-bottom: 15px; }
.point-label { font-size: 11px; letter-spacing: 2px; opacity: 0.7; text-transform: uppercase; }
.point-value { 
    font-family: 'Playfair Display', serif; 
    font-size: 56px; 
    font-weight: 700;
    margin: 5px 0;
    color: #FDFCF0;
    line-height: 1.1;
}

/* --- BOTTOM LINKS (DAFTAR & CLAIM) --- */
.bottom-links {
    margin-top: 30px;
    display: flex;
    flex-direction: column; /* Menyusun ke bawah */
    gap: 15px; /* Jarak antar baris */
}

.link-item {
    font-size: 13px;
    letter-spacing: 1px;
    opacity: 0.9;
    color: rgba(253, 252, 240, 0.8);
}

.link-item a {
    color: #FDFCF0; /* Warna Krem */
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(253, 252, 240, 0.5);
    margin-left: 5px;
    transition: all 0.3s ease;
    padding-bottom: 2px;
}

.link-item a:hover {
    opacity: 1;
    border-bottom: 1px solid #FDFCF0;
    text-shadow: 0 0 10px rgba(253, 252, 240, 0.3);
}

/* --- FOOTER --- */
.footer {
    margin-top: auto;
    padding-top: 30px;
    font-size: 11px;
    letter-spacing: 1px;
    opacity: 0.6;
}

/* --- LOADER & ERROR --- */
.loader { display: none; width: 30px; height: 30px; border: 3px solid rgba(253, 252, 240, 0.2); border-top: 3px solid #FDFCF0; border-radius: 50%; animation: spin 1s linear infinite; margin: 25px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.error-msg { background: rgba(255, 99, 71, 0.15); border: 1px solid #ff6347; color: #ff6347; padding: 15px; border-radius: 12px; font-size: 13px; margin-top: 20px; }

/* --- KHUSUS UNTUK LAYAR KECIL (HP) --- */
@media (max-width: 480px) {
    .logo-dreaming { font-size: 40px; } /* Font judul lebih kecil */
    .social-handle { font-size: 11px; }
    .form-box { padding: 25px 20px; } /* Padding kotak lebih pas di HP */
    .point-value { font-size: 48px; } /* Angka point tidak terlalu besar */
}

/* --- TAMPILAN KARTU MEMBER DIGITAL (REVISI) --- */
.card-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px; /* Lebar kita batasi agar tidak terlalu besar */
    margin: 0 auto 20px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card-img {
    width: 100%;
    display: block;
    height: auto;
}

/* Style Text agar pas di kotak putih */
.card-text {
    position: absolute;
    font-family: 'Poppins', sans-serif;
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    
    /* Background putih untuk menimpa tulisan lama */
    background-color: #fff; 
    
    /* Padding kita kecilkan agar tidak menutupi label di bawahnya */
    padding: 4px 10px 2px 5px; 
    
    white-space: nowrap;
    
    /* Ukuran font responsif, tapi dibatasi max 14px */
    font-size: 3vw; 
    line-height: 1; /* Jarak antar baris rapat */
}

/* KHUSUS DESKTOP (Layar Besar) */
@media (min-width: 450px) {
    .card-text { font-size: 13px; }
}

/* --- PENGATURAN POSISI (KOORDINAT) --- */
/* Saya geser ke atas sedikit dibanding sebelumnya */

/* 1. Posisi Nama */
.pos-nama {
    top: 45.9%;   /* Naik ke atas agar tidak kena label NAMA */
    left: 8.5%;   
    width: 50%;   /* Lebar area */
    height: 6%;   /* Tinggi area putih */
    display: flex;
    align-items: center; /* Teks di tengah vertikal */
}

/* 2. Posisi Point/Tanggal */
.pos-tgl {
    top: 60%;     /* Naik ke atas */
    left: 8.5%;
    width: 35%;
    height: 6%;
    display: flex;
    align-items: center;
}

/* 3. Posisi Tier */
.pos-tier {
    top: 72.7%;   /* Naik ke atas */
    left: 8.5%;
    width: 35%;
    height: 6%;
    color: #D4AF37; /* Warna Emas */
    display: flex;
    align-items: center;
}

/* --- TOMBOL DOWNLOAD --- */
.btn-download {
    width: auto; /* Lebar menyesuaikan teks */
    padding: 12px 25px;
    background: transparent;
    border: 1px solid #FDFCF0;
    color: #FDFCF0;
    margin-top: 15px;
    font-size: 13px;
    border-radius: 50px; /* Bentuk kapsul */
}

.btn-download:hover {
    background: #FDFCF0;
    color: #0F172A;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 252, 240, 0.3);
}

.btn-download i {
    margin-right: 8px; /* Jarak ikon download */
}