:root {
    --bg-dark: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent-blue: #007bff;
    --accent-glow: rgba(0, 123, 255, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

/* --- 1. THE BACKGROUND & OVERLAY --- */
body { 
    background-color: var(--bg-dark); 
    background-image: url('https://images.unsplash.com/photo-1581291518857-4e27b48ff24e?q=80&w=2940&auto=format&fit=crop'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    min-height: 100vh; 
    position: relative;
    z-index: 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 10, 0.85);
    z-index: -1; 
}

/* --- 2. PEAK GLASSMORPHISM MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
    opacity: 0; visibility: hidden; 
    transition: all 0.3s ease-in-out;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
    background: rgba(25, 25, 25, 0.4); 
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.2); 
    border-left: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1); 
    width: 90%; max-width: 480px;
    padding: 40px;
    position: relative;
    
    /* NEW: Prevent it from gluing to the top/bottom on PC */
    max-height: 90vh; /* Takes up max 90% of screen height */
    overflow-y: auto; /* Adds a scrollbar if the form is longer than the box */
    
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Optional: Make the internal scrollbar look sleek (Webkit browsers only) */
.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
.modal-content::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }

.modal-close {
    position: absolute; top: 15px; right: 20px;
    background: none; border: none; color: #666;
    font-size: 1.8rem; cursor: pointer; transition: color 0.2s;
}

.modal-close:hover { color: #fff; }

.modal-header { margin-bottom: 30px; text-align: center; }
.modal-header h2 { margin-bottom: 5px; font-size: 1.5rem; }
.modal-header p { color: var(--text-muted); font-size: 0.9rem; }

/* --- SLEEK FORM INPUTS (FLOATING LABELS) --- */
.sleek-form { display: flex; flex-direction: column; gap: 20px; }
.input-group { position: relative; width: 100%; }
.input-group input, .input-group select {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 16px 10px 16px;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--accent-blue);
    background: rgba(0, 123, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.15);
}

.input-group label {
    position: absolute; top: 50%; left: 16px; transform: translateY(-50%);
    color: #888; font-size: 1rem; pointer-events: none; transition: all 0.2s ease;
}

.input-group input:focus ~ label, .input-group input:not(:placeholder-shown) ~ label,
.select-group select:focus ~ label, .select-group select:valid ~ label {
    top: 8px; font-size: 0.7rem; color: var(--accent-blue);
}

/* --- GLOWING BUTTON --- */
.btn-glow {
    background: var(--accent-blue); color: white; border: none; padding: 16px;
    border-radius: 8px; font-weight: 600; font-size: 1rem;
    cursor: pointer; margin-top: 10px; transition: all 0.3s ease;
}

.btn-glow:hover {
    background: #0069d9; box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4); transform: translateY(-2px);
}

/* --- 3. THE GATEWAY CARDS --- */
#app-container { max-width: 800px; width: 100%; padding: 0 20px; text-align: center; z-index: 2; position: relative; margin-top: 40px; }
.top-nav { 
    width: 100%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px 40px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); 
    background: rgba(0,0,0,0.2); 
    backdrop-filter: blur(10px); 
}
.nav-logo {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}
.nav-logo:hover { color: #fff; }
.top-nav p { font-size: 0.95rem; color: var(--text-muted); }
.accent-link { color: var(--accent-blue); text-decoration: none; font-weight: bold; }

/* Mobile responsiveness for the header */
@media (max-width: 600px) {
    .top-nav { flex-direction: column; gap: 10px; padding: 15px 20px; text-align: center; }
}
.subtitle { color: var(--text-muted); margin-bottom: 40px; font-size: 1.1rem; }
.card-grid { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

.premium-card {
    background: rgba(25, 25, 25, 0.4); 
    backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.08); border-top: 1px solid rgba(255, 255, 255, 0.2); border-left: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 16px; padding: 30px; width: 320px; cursor: pointer; color: var(--text-main); text-align: left;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.premium-card:hover { 
    border-color: var(--accent-blue); box-shadow: 0 15px 35px rgba(0, 123, 255, 0.25); 
    transform: translateY(-5px); background: rgba(40, 40, 40, 0.5);
}

.premium-card h2 { margin-bottom: 12px; font-size: 1.4rem; }
.premium-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.4; }

.view { display: none; opacity: 0; transition: opacity 0.3s ease-in-out; }
.view.active { display: block; opacity: 1; }
.view.hidden { display: none; }

/* --- 4. MODAL STEP TRANSITIONS --- */
.modal-step { transition: opacity 0.3s ease, transform 0.3s ease; display: none; }
.modal-step.active { display: block; animation: fadeInSlideUp 0.4s forwards; }
@keyframes fadeInSlideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- 5. NATIVE DROPDOWN FIX --- */
.select-group select option { background-color: #1a1a1a; color: #ffffff; padding: 15px; }
.input-group select:focus { background-color: rgba(20, 20, 20, 0.9); }

/* --- 6. PAYMENT METHOD SELECTION --- */
.payment-methods-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.payment-method-card {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px; border-radius: 12px; cursor: pointer; transition: all 0.3s ease;
}
.payment-method-card:hover { background: rgba(255, 255, 255, 0.06); }
.payment-method-card.active { border-color: var(--accent-blue); background: rgba(0, 123, 255, 0.05); }

.method-left { display: flex; align-items: center; gap: 12px; }
.radio-circle { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); position: relative; transition: all 0.2s; }
.payment-method-card.active .radio-circle { border-color: var(--accent-blue); }
.payment-method-card.active .radio-circle::after {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 8px; height: 8px; background: var(--accent-blue); border-radius: 50%;
}
.hidden-radio { display: none; }
.method-badge { font-size: 0.75rem; padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

/* --- 7. EXPANDABLE TRANSFER SECTION (GRID LAYOUT FIX) --- */
.transfer-section {
    display: none; opacity: 0; transform: translateY(-10px); transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; 
    padding: 24px; background: rgba(0, 0, 0, 0.3); margin-bottom: 20px; text-align: center; 
}
.transfer-section.active { display: block; opacity: 1; transform: translateY(0); }

.bank-cards-container { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.bank-card-mini {
    background: rgba(25, 25, 25, 0.6); border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 12px; border-radius: 8px; display: flex; flex-direction: column; text-align: left; 
}

.bank-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 3px; margin-top: 8px; }
.bank-card-mini strong { font-size: 1rem; color: #fff; }
.bank-card-mini .highlight-number { color: var(--accent-blue); font-size: 1.1rem; letter-spacing: 1px; }

.account-name-display { text-align: center; font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; }

/* SVG Upload Icon Styling */
.hidden-file-input { display: none; }
.file-upload-label {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.2); border-radius: 12px; padding: 30px 20px;
    cursor: pointer; transition: all 0.3s ease; background: rgba(255, 255, 255, 0.02);
}
.file-upload-label:hover { border-color: var(--accent-blue); background: rgba(0, 123, 255, 0.05); }
.upload-icon-svg { margin-bottom: 12px; color: var(--text-muted); transition: color 0.3s ease, transform 0.3s ease; }
.file-upload-label:hover .upload-icon-svg { color: var(--accent-blue); transform: translateY(-3px); }
#file-name-display { color: var(--text-muted); font-size: 0.9rem; text-align: center; }

.btn-text {
    background: none; border: none; color: var(--text-muted); width: 100%;
    margin-top: 15px; cursor: pointer; transition: color 0.2s; font-size: 0.9rem;
}
.btn-text:hover { color: #fff; }

/* --- 8. ESTIMATOR WIZARD --- */
.estimator-container {
    background: rgba(25, 25, 25, 0.4); 
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.est-step { transition: opacity 0.3s ease, transform 0.3s ease; display: none; }
.est-step.active { display: block; animation: fadeInSlideLeft 0.4s forwards; }

@keyframes fadeInSlideLeft {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.step-question { font-size: 1.3rem; margin-bottom: 25px; color: #fff; }

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.est-option-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.est-option-card:hover { background: rgba(255, 255, 255, 0.05); transform: translateY(-3px); }

.est-option-card.active {
    border-color: var(--accent-blue);
    background: rgba(0, 123, 255, 0.08);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.15);
}

.est-icon { font-size: 2rem; margin-bottom: 10px; }
.est-title { font-size: 1rem; font-weight: 600; color: var(--text-main); }

.est-navigation { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }

/* Disabled button state for when nothing is selected */
.btn-glow.disabled { opacity: 0.5; pointer-events: none; background: #444; box-shadow: none; }

/* Large Quote Display */
.quote-display {
    background: rgba(0, 0, 0, 0.5);
    border: 1px dashed var(--accent-blue);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}
.quote-currency { font-size: 1.5rem; color: var(--accent-blue); font-weight: bold; margin-right: 5px; }
.quote-amount { font-size: 3.5rem; font-weight: bold; color: #fff; letter-spacing: -1px; }

/* --- 9. ESTIMATOR DYNAMIC FORMS --- */
.est-form-group { margin-bottom: 25px; text-align: left; }
.est-form-group label { display: block; margin-bottom: 10px; color: var(--text-main); font-weight: 600; }

.est-select, .est-input {
    width: 100%; padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px; color: #fff;
    font-size: 1rem; outline: none; transition: border-color 0.3s;
}

.est-select:focus, .est-input:focus { border-color: var(--accent-blue); background: rgba(0, 123, 255, 0.05); }
.est-select option { background-color: #1a1a1a; color: #ffffff; padding: 10px; }

/* Checkbox/Radio Grid for multiple choices */
.est-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.est-choice-label {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px; border-radius: 8px; cursor: pointer; transition: all 0.2s;
}
.est-choice-label:hover { border-color: var(--accent-blue); }
.est-choice-input { accent-color: var(--accent-blue); width: 16px; height: 16px; }