body { 
    background-color: #f9fafc; 
    background-image: url('/hinh/bg.jpg'); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    background-attachment: fixed; 
    
    font-family: 'Segoe UI', sans-serif; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100dvh; 
    margin: 0; 
    padding: 10px; 
    position: relative; 
    overflow-y: auto; 
    overflow-x: hidden; 
    overscroll-behavior-y: auto; 
}
@media (min-width: 1024px) { body { padding: 20px; } }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.form-container { 
    background: rgba(0, 0, 0, 0.45); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); 
    border-radius: 15px; 
    padding: 20px; 
    width: 100%; 
    max-width: 500px; 
    margin: auto; 
    overflow: visible; 
    z-index: 10; 
    position: relative; 
}
@media (min-width: 1024px) { .form-container { padding: 30px; } }

.input-field { border: 1px solid #e2e8f0; border-radius: 8px; padding: 11.5px 14px; width: 100%; outline: none; font-size: 14.5px; }
.submit-btn { 
    background: #004b93; 
    color: white; 
    font-weight: bold; 
    padding: 12px; 
    border-radius: 8px; 
    cursor: pointer; 
    text-transform: uppercase; 
    transition: 0.05s; 
    margin-top: 10px !important; 
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.submit-btn:hover { background: #003a75; }
.submit-btn-outline { background: transparent; color: #004b93; font-weight: bold; padding: 12px; border-radius: 8px; cursor: pointer; text-transform: uppercase; transition: 0.3s; text-decoration: underline; }
.submit-btn-outline:hover { color: #003a75; }

.autocomplete-list { position: absolute; bottom: 100%; margin-bottom: 6px; z-index: 9999; width: 100%; background: white; border: 1px solid #e2e8f0; border-radius: 8px; max-height: 338px; overflow-y: auto; display: none; box-shadow: 0 -10px 25px rgba(0,0,0,0.15); }

#result-container { 
    display: none; 
    width: 100%; 
    max-width: 1500px; 
    background: white; 
    padding: 15px; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    height: auto !important; 
    overflow: visible !important; 
    position: relative;
    margin-bottom: 60px; 
}

@media (min-width: 1024px) { #result-container { padding: 40px; border-radius: 15px; height: auto; max-height: 100%; } }


.locked-overlay { background: #f8fafc; border: 1px dashed #004b93; padding: 12px; border-radius: 8px; text-align: center; color: #004b93; font-weight: bold; cursor: pointer; transition: color 0.3s ease; margin-top: 10px; margin-bottom: 20px; }
.locked-overlay:hover { color: #10b981; }

.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1000; justify-content: center; align-items: center; padding: 20px; }
.modal-content { background: white; border-radius: 15px; padding: 30px; max-width: 500px; width: 100%; text-align: center; }
.spinner { border: 4px solid #f3f3f3; border-top: 4px solid #004b93; border-radius: 50%; width: 45px; height: 45px; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.card-content { text-align: justify; }
.card-content p { margin-bottom: 10px; } 
.card-content p:last-child { margin-bottom: 0; }
.card-content > br { display: none; }

@media (min-width: 1024px) { .custom-vertical-line::before { content: ''; position: absolute; left: 0; top: 17.5%; height: 65%; width: 1px; background-color: #e5e7eb; } }
.section-heading { font-size: 20px; font-weight: 900; color: #004b93; text-transform: uppercase; text-align: center; padding-bottom: 16px; margin-bottom: 24px; margin-top: 0; width: 100%; position: relative; }
.section-heading::after { content: ''; position: absolute; bottom: 0; left: 17.5%; width: 65%; height: 1px; background-color: #d1d5db; }
#properties-list > div:last-child { border-bottom: 0 !important; }
.tab-item { transition: all 0.3s ease; }


.input-field { color: #4b5563 !important; font-size: 14.5px !important; font-weight: 500 !important; }
.input-field::placeholder { color: #636871 !important; font-weight: 400 !important; opacity: 1 !important; }
select.input-field:invalid { color: #636871 !important; font-weight: 400 !important; }
select.input-field option { color: #636871 !important; font-weight: 500 !important; }
.autocomplete-item { font-size: 14.5px !important; color: #636871 !important; padding: 10px 12px !important; }
.input-field:valid { background-color: #f8fafc !important; }
.input-field:invalid { background-color: #ffffff !important; }
.input-field:-webkit-autofill, .input-field:-webkit-autofill:hover, .input-field:-webkit-autofill:focus, .input-field:-webkit-autofill:active { -webkit-box-shadow: 0 0 0 30px #f8fafc inset !important; -webkit-text-fill-color: #374151 !important; transition: background-color 5000s ease-in-out 0s; }

select.input-field { -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 13px; padding-left: 8px !important; padding-right: 20px !important; cursor: pointer; }
select.input-field:focus { background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); }

.back-arrow-btn, [onclick*="goBack"] { background: transparent !important; border-radius: 0 !important; box-shadow: none !important; border: none !important; padding: 0 !important; opacity: 1 !important; display: inline-flex !important; align-items: center; justify-content: center; transition: opacity 0.2s; cursor: pointer; }
.back-arrow-btn svg, .back-arrow-btn i { font-size: 38px !important; width: auto !important; height: auto !important; padding-top: 18px !important; }


body { align-items: flex-start !important; }
.form-container { margin: auto !important; }
#result-container { margin-top: 0 !important; margin-bottom: 0 !important; }

@media (max-width: 1023px) { body { padding: 20px 10px !important; } }
@media (min-width: 1024px) { body { padding: 30px 20px !important; } }

@media (max-width: 1023px) {
    html { height: 100dvh !important; width: 100% !important; overflow: hidden !important; background-color: #1a1a1a !important; }
    body { height: 100dvh !important; width: 100% !important; overflow-y: auto !important; overflow-x: hidden !important; overscroll-behavior-y: none !important; -webkit-overflow-scrolling: touch !important; background-image: none !important; background-color: transparent !important; }
    body::before { content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; background-image: url('/hinh/bg.jpg'); background-size: cover; background-position: center; background-repeat: no-repeat; z-index: -1; pointer-events: none; }
}

body::after { content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; background: rgba(0, 0, 0, 0); z-index: 1; transition: background 0.5s ease-in-out; pointer-events: none; }
body.report-active::after { background: rgba(0, 0, 0, 0.75) !important; }
#form-container, #result-container { position: relative; z-index: 10 !important; }

/* ============================================================
   GIAO DIỆN LANDING "SỐ HỌC ỨNG DỤNG PYTAGO" (màn nhập liệu)
   ============================================================ */

/* Nền vũ trụ + trường sao (phủ lên nền cũ trên mọi thiết bị) */
body { background-color: #0b0417 !important; }
#stars {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-color: #0a0616;
    background-image:
        radial-gradient(1100px 680px at 78% 32%, rgba(168,85,247,0.32), transparent 60%),
        radial-gradient(900px 620px at 18% 68%, rgba(236,72,153,0.20), transparent 60%),
        radial-gradient(760px 520px at 50% 12%, rgba(99,102,241,0.24), transparent 62%),
        radial-gradient(1000px 900px at 92% 88%, rgba(88,28,135,0.30), transparent 60%),
        linear-gradient(180deg, #170c2b 0%, #0c0718 55%, #050309 100%);
}
#stars::before, #stars::after { content: ""; position: absolute; inset: 0; background-repeat: repeat; }
#stars::before {
    background-image:
        radial-gradient(1.6px 1.6px at 24px 32px, rgba(255,255,255,0.95), transparent),
        radial-gradient(1.4px 1.4px at 130px 90px, rgba(255,255,255,0.75), transparent),
        radial-gradient(1.2px 1.2px at 210px 160px, rgba(255,255,255,0.85), transparent),
        radial-gradient(1.5px 1.5px at 300px 60px, rgba(255,255,255,0.70), transparent),
        radial-gradient(1.3px 1.3px at 275px 240px, rgba(255,255,255,0.90), transparent),
        radial-gradient(1.1px 1.1px at 80px 260px, rgba(255,255,255,0.60), transparent);
    background-size: 340px 300px;
    animation: twinkle 4.5s ease-in-out infinite alternate;
}
#stars::after {
    background-image:
        radial-gradient(1px 1px at 60px 120px, rgba(255,255,255,0.70), transparent),
        radial-gradient(1px 1px at 190px 40px, rgba(255,255,255,0.50), transparent),
        radial-gradient(1.2px 1.2px at 250px 180px, rgba(255,255,255,0.65), transparent),
        radial-gradient(1px 1px at 20px 200px, rgba(255,255,255,0.55), transparent);
    background-size: 280px 260px; opacity: 0.7;
    animation: twinkle 6s ease-in-out infinite alternate-reverse;
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.9; } }
@media (max-width: 1023px) { body::before { background-image: none !important; } }

/* Header thương hiệu */
#main-header {
    background: linear-gradient(180deg, rgba(40,10,20,0.92) 0%, rgba(30,8,16,0.55) 70%, rgba(30,8,16,0) 100%);
}
.brand-title {
    color: #ffffff; font-weight: 800; font-size: 20px; letter-spacing: 2px;
    text-transform: uppercase; text-shadow: 0 2px 10px rgba(0,0,0,0.6); white-space: nowrap;
}
@media (max-width: 640px) { .brand-title { font-size: 15px; letter-spacing: 1px; } }

/* Khối form landing: bỏ khung tối, để nội dung nổi trên nền vũ trụ */
#form-container {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    max-width: 560px !important;
    text-align: center;
}

/* Tiêu đề hero */
.hero-head { margin-bottom: 34px; }
.hero-eyebrow {
    color: rgba(255,255,255,0.80); letter-spacing: 6px; font-size: 13px;
    font-weight: 600; text-transform: uppercase; margin: 0 0 10px;
}
.hero-title {
    color: #ffffff; font-weight: 800; font-size: 42px; line-height: 1.1;
    text-transform: uppercase; margin: 0 0 20px;
    text-shadow: 0 0 24px rgba(168,85,247,0.55), 0 4px 18px rgba(0,0,0,0.5);
}
.hero-desc {
    color: rgba(226,220,240,0.90); font-size: 15.5px; line-height: 1.75;
    max-width: 520px; margin: 0 auto;
}
@media (max-width: 640px) {
    .hero-title { font-size: 29px; }
    .hero-eyebrow { letter-spacing: 4px; font-size: 12px; }
    .hero-desc { font-size: 14.5px; }
}

/* Ô nhập trên nền tối */
#form-container .input-field {
    background: rgba(30,16,45,0.55) !important;
    border: 1px solid rgba(200,150,230,0.35) !important;
    color: #ffffff !important;
    text-align: center;
    padding: 14px !important;
    border-radius: 10px !important;
    backdrop-filter: blur(4px);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
#form-container .input-field::placeholder { color: rgba(255,255,255,0.72) !important; font-weight: 500 !important; }
#form-container select.input-field:invalid { color: rgba(255,255,255,0.72) !important; }
#form-container select.input-field option { color: #2a1840 !important; background: #ffffff !important; }
#form-container .input-field:focus {
    border-color: rgba(236,72,153,0.80) !important;
    box-shadow: 0 0 0 3px rgba(236,72,153,0.18) !important;
    background: rgba(40,20,55,0.70) !important;
}
#form-container select.input-field {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9d5ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px !important;
    padding-right: 30px !important;
    text-align-last: center;
}

/* Nút khám phá */
#form-container .submit-btn {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 55%, #be123c 100%) !important;
    color: #fff !important;
    padding: 15px !important;
    border-radius: 12px !important;
    letter-spacing: 1px;
    box-shadow: 0 10px 26px rgba(219,39,119,0.45) !important;
    margin-top: 16px !important;
    max-width: 320px;
}
#form-container .submit-btn:hover {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 55%, #e11d48 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(219,39,119,0.55) !important;
}