/* ============================================
   STYLE CSS
   ============================================ */

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-font-smoothing: antialiased; 
}

:root {
    --primary: #9d0b0e;
    --secondary: #8e8e93;
    --bg: #f2f2f7;
    --text: #1c1c1e;
    --card: #ffffff;
    --border: #c6c6c8;
    --danger: #ff3b30;
    --success: #34c759;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
}

.container { 
    max-width: 400px; 
    width: 100%; 
    margin: 0 auto; 
}

/* ========== CARDS ========== */
.card {
    background: var(--card);
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 16px;
    border: 0.5px solid var(--border);
}

/* ========== HEADER ========== */
.header { 
    text-align: center; 
    margin-bottom: 24px; 
}
.logo { 
    width: 150px; 
    height: 150px; 
    margin: 0 auto 16px; 
}
.logo img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
}
.header h1 { 
    font-size: 28px; 
    font-weight: 600; 
    color: var(--text); 
}
.header p { 
    color: var(--secondary); 
    font-size: 15px; 
    margin-top: 4px; 
}

/* ========== PROGRESS STICKY ========== */
.progress-sticky {
    position: sticky; 
    top: 16px; 
    z-index: 100;
    background: rgba(255,255,255,0.95); 
    backdrop-filter: blur(10px);
    border-radius: 30px; 
    padding: 8px 16px; 
    margin-bottom: 16px;
    display: flex; 
    align-items: center; 
    gap: 12px;
    border: 0.5px solid rgba(255,255,255,0.5);
}
.brand-name { 
    font-weight: 600; 
    font-size: 14px; 
    flex: 1; 
    color: var(--text); 
}
.progress-bar { 
    width: 100px; 
    height: 6px; 
    background: rgba(0,0,0,0.1); 
    border-radius: 10px; 
    overflow: hidden; 
}
.progress-fill { 
    height: 100%; 
    width: 0%; 
    background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 40%, white)); 
    border-radius: 10px; 
    transition: width 0.2s; 
}
.progress-text { 
    font-size: 12px; 
    font-weight: 600; 
    color: var(--primary); 
}

/* ========== BANNER ========== */
.banner {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    gap: 12px;
    flex-wrap: wrap;
}
.banner-item { 
    text-align: center; 
    flex: 1; 
    min-width: 80px; 
    animation: float 3s ease-in-out infinite; 
}
.banner-item:nth-child(2) { animation-delay: 0.5s; }
.banner-item:nth-child(3) { animation-delay: 1s; }
@keyframes float { 
    0%,100% { transform: translateY(0); } 
    50% { transform: translateY(-5px); } 
}
.banner-item i { 
    font-size: 28px; 
    color: color-mix(in srgb, var(--primary) 80%, black); 
    margin-bottom: 8px; 
    display: block; 
}
.banner-item span { 
    font-size: 11px; 
    font-weight: 600; 
    color: color-mix(in srgb, var(--primary) 80%, black); 
    display: block; 
}

/* ========== VOUCHER ========== */
.voucher {
    background: var(--primary);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 9;
}
.voucher::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shine 6s infinite;
}
@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    20% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}
.voucher::after { 
    content: '🍵'; 
    position: absolute; 
    bottom: -10px; 
    right: -10px; 
    font-size: 80px; 
    opacity: 0.1; 
}
.voucher-header { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 12px; 
    position: relative; 
    z-index: 2; 
}
.voucher-badge { 
    background: rgba(255,255,255,0.2); 
    padding: 4px 12px; 
    border-radius: 30px; 
    font-size: 11px; 
}
.voucher-code { 
    font-size: 22px; 
    font-weight: 700; 
    font-family: monospace; 
    background: color-mix(in srgb, var(--primary) 80%, black); 
    padding: 12px; 
    border-radius: 16px; 
    text-align: center; 
    margin: 12px 0; 
    position: relative; 
    z-index: 2; 
}
.voucher-benefits { 
    display: flex; 
    gap: 8px; 
    justify-content: center; 
    margin: 12px 0; 
    position: relative; 
    z-index: 2; 
}
.voucher-benefits span { 
    background: white; 
    padding: 5px 12px; 
    border-radius: 30px; 
    font-size: 12px;
    color: color-mix(in srgb, var(--primary) 80%, black); 
}
.btn-claim {
    width: 100%; 
    background: white; 
    color: var(--primary); 
    border: none;
    padding: 14px; 
    border-radius: 30px; 
    font-weight: 700; 
    cursor: pointer;
    margin-top: 12px; 
    position: relative; 
    z-index: 2;
    transition: all 0.3s;
}
.btn-claim.claimed { 
    background: #ffd966; 
    color: #1c1c1e; 
}
.countdown {
    background: white;
    border-radius: 16px;
    padding: 12px;
    text-align: center;
    position: relative;
    z-index: 2;
    color: black;
}
.countdown-timer { 
    font-family: monospace; 
    font-size: 28px; 
    font-weight: 600; 
}

/* ========== FORM ========== */
.form-group { margin-bottom: 20px; }
.form-label { 
    font-size: 13px; 
    font-weight: 600; 
    color: var(--text); 
    margin-bottom: 6px; 
    display: block; 
}
.form-input {
    width: 100%; 
    padding: 14px 16px; 
    background: white;
    border: 1px solid var(--border); 
    border-radius: 16px; 
    font-size: 15px;
}
.form-input:focus { 
    outline: none; 
    border-color: var(--primary); 
}
.form-input.error { 
    border-color: var(--danger); 
}

/* ========== DROPDOWN ========== */
.dropdown-container { position: relative; }
.dropdown-results {
    position: absolute; 
    top: 100%; 
    left: 0; 
    right: 0; 
    background: white;
    border-radius: 16px; 
    margin-top: 5px; 
    max-height: 200px; 
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
    display: none; 
    z-index: 1000;
    border: 0.5px solid var(--border);
}
.dropdown-results.show { display: block; }
.dropdown-item { 
    padding: 12px 16px; 
    cursor: pointer; 
    border-bottom: 0.5px solid var(--border); 
}
.dropdown-item:hover { background: var(--bg); }

/* ========== SLIDER ========== */
.slider-container { 
    background: none; 
    border-radius: 16px; 
    padding: 16px; 
    border: 1px solid var(--border); 
}
.slider-value { 
    font-size: 20px; 
    font-weight: 600; 
    text-align: center; 
    margin-bottom: 12px; 
    color: var(--primary); 
}
input[type=range] { 
    width: 100%; 
    height: 6px; 
    background: linear-gradient(90deg, #ff3b30, #ffcc00, #34c759); 
    border-radius: 10px; 
    -webkit-appearance: none; 
}
input[type=range]::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    width: 24px; 
    height: 24px; 
    background: white; 
    border-radius: 50%; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); 
    border: 2px solid var(--primary); 
    cursor: pointer; 
    margin-top: -9px; 
}
.range-labels { 
    display: flex; 
    justify-content: space-between; 
    margin-top: 8px; 
    font-size: 11px; 
    color: var(--secondary); 
}
.slider-hint { 
    font-size: 11px; 
    text-align: center; 
    margin-top: 8px; 
}

/* ========== RADIO GROUP ========== */
.radio-group { 
    display: flex; 
    gap: 10px; 
    background: none; 
    padding: 5px; 
    border-radius: 30px; 
    border: 1px solid var(--border); 
}
.radio-option { 
    font-size: 12px; 
    flex: 1; 
    text-align: center; 
    padding: 10px; 
    border-radius: 30px; 
    background: white; 
    font-weight: 500; 
    cursor: pointer; 
}
.radio-option.active { 
    background: var(--primary); 
    color: white; 
}
.radio-option input { display: none; }

/* ========== BUTTONS ========== */
.btn-proposal {
    width: 100%; 
    background: var(--primary); 
    color: white; 
    border: none;
    padding: 14px; 
    border-radius: 30px; 
    font-weight: 700; 
    margin: 20px 0;
    cursor: pointer; 
    position: relative; 
    overflow: hidden;
}
.btn-proposal::before {
    content: '';
    position: absolute; 
    top: -50%; 
    left: -50%;
    width: 200%; 
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
    animation: btnShine 4s infinite;
}
@keyframes btnShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    30% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.sticky-button { 
    position: sticky; 
    bottom: 16px; 
    padding: 12px; 
    background: rgba(255,255,255,0.95); 
    backdrop-filter: blur(10px); 
    border-radius: 30px; 
    margin-top: 20px; 
}
.btn-wa { 
    width: 100%; 
    background: var(--primary); 
    color: white; 
    border: none; 
    padding: 16px; 
    border-radius: 30px; 
    font-size: 17px; 
    font-weight: 700; 
    cursor: pointer; 
    position: relative; 
    overflow: hidden; 
}
.btn-wa:disabled { 
    background: var(--primary); 
    cursor: not-allowed; 
    opacity: 0.6; 
}
.btn-wa::before {
    content: '';
    position: absolute; 
    top: -50%; 
    left: -50%;
    width: 200%; 
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    animation: waShine 5s infinite;
}
@keyframes waShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    30% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* ========== INFO BOX ========== */
.info-box {
    background: none;
    border-radius: 16px; 
    padding: 12px; 
    margin: 12px 0;
    font-size: 12px; 
    text-align: center;
    border-left: none;
    animation: fadePulse 3s ease-in-out infinite;
}
@keyframes fadePulse { 
    0%,100% { opacity: 0.9; } 
    50% { opacity: 1; } 
}
.info-box a { 
    color: var(--primary); 
    text-decoration: none; 
    font-weight: 600; 
}
.info-text { 
    text-align: center; 
    font-size: 11px; 
    color: var(--danger); 
    margin: 8px 0; 
}
.info-text.hide { display: none; }
.info-text.warning { color: var(--secondary); }

/* ========== ERROR TEXT ========== */
.error-text { 
    color: var(--danger); 
    font-size: 11px; 
    margin-top: 4px; 
    display: none; 
}
.error-text.show { display: block; }

/* ========== FOOTER ========== */
.footer { 
    text-align: center; 
    padding: 24px; 
    color: var(--secondary); 
    font-size: 12px; 
    border-top: 1px solid var(--border); 
    margin-top: 20px; 
}

/* ========== POPUP ========== */
.popup { 
    position: fixed; 
    bottom: 24px; 
    left: 50%; 
    transform: translateX(-50%) translateY(100px); 
    background: var(--primary); 
    color: white; 
    padding: 12px 24px; 
    border-radius: 40px; 
    font-size: 14px; 
    z-index: 1000; 
    transition: transform 0.3s; 
    white-space: nowrap; 
}
.popup.show { transform: translateX(-50%) translateY(0); }

/* ========== PROPOSAL POPUP ========== */
.proposal-popup-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background: rgba(0,0,0,0.85); 
    backdrop-filter: blur(8px); 
    z-index: 2000; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    padding: 16px; 
}
.proposal-popup-overlay.show { display: flex; }
.proposal-popup { 
    background: white; 
    border-radius: 28px; 
    max-width: 400px; 
    width: 100%; 
    max-height: 85vh; 
    overflow-y: auto; 
    padding: 20px; 
}
.close-btn {
    position: sticky;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
    margin-bottom: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}
.proposal-video { 
    width: 100%; 
    border-radius: 16px; 
    margin-bottom: 12px; 
}
.proposal-images img { 
    width: 100%; 
    border-radius: 16px; 
    margin-bottom: 12px; 
}

/* ========== FLOATING BUTTON ========== */
.floating-proposal-btn {
    position: fixed;
    bottom: 90px;
    right: 16px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: all 0.3s ease;
}
.floating-proposal-btn:hover {
    transform: scale(1.05);
    background: #c49a3a;
}
.floating-proposal-btn.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}