/* CSS Reset & Base Variables */
:root {
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-blue-btn: #4f86f7;
    --color-blue-btn-hover: #3b74e6;
    --color-green: #10b981;
    --color-green-btn: #16a34a;
    --color-green-btn-hover: #15803d;
    --color-red: #d93838;
    --color-bg-light: #ffffff;
    --color-card-bg: #ebf3fe;
    --color-card-border: #bfdbfe;
    --color-text-main: #1e293b;
    --color-text-muted: #64748b;
    --color-text-subtle: #94a3b8;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: var(--font-family);
    background-color: #ffffff;
    color: var(--color-text-main);
    -webkit-font-smoothing: antialiased;
}

/* App Container Layout */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 16px;
}

/* Header Component */
.header {
    width: 100%;
    max-width: 540px;
    min-height: 80px;
    height: auto;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 8px;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #475569;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.back-btn:hover {
    background-color: #f1f5f9;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.header-logo-img {
    height: 52px;
    width: 52px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.logo-text {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1;
}

.brand-blue {
    color: #0b1e36;
}

.brand-green {
    color: #10b981;
}

/* Progress Bar Component */
.progress-bar-wrapper {
    width: 100%;
    max-width: 420px;
    margin: 12px 0 24px 0;
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    background-color: #edf4ff;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* Main Content Area */
.content-container {
    width: 100%;
    max-width: 480px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-bottom: 40px;
}

/* Step Screens Management */
.step-screen {
    display: none;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.step-screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Intro Card (Step 0) Styling */
.intro-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 20px;
}

.intro-subtitle {
    font-size: 15px;
    color: #334155;
    margin: 20px 0 24px 0;
    line-height: 1.4;
    font-weight: 500;
}

.highlight-red {
    color: var(--color-red);
    font-weight: 700;
}

.highlight-blue {
    color: #2563eb;
    font-weight: 700;
}

.highlight-green {
    color: #16a34a;
    font-weight: 700;
}

/* Image Banner Styling */
.main-banner-img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    object-position: center 30%;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.final-banner-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center 30%;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Rating Card */
.rating-card {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 20px;
    width: 100%;
    background-color: #ffffff;
}

.stars {
    color: #f59e0b;
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.rating-text {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}

/* Security Note */
.security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #b45309;
    font-weight: 600;
    margin-top: 24px;
}

.disclaimer-text {
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 10px;
    line-height: 1.4;
}

.success-message-text {
    font-size: 16px;
    color: #334155;
    margin-top: 16px;
    line-height: 1.55;
    font-weight: 500;
    max-width: 420px;
}

/* Form Card Styling */
.form-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.question-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.3;
}

.question-subtitle {
    font-size: 13.5px;
    color: #334155;
    text-align: center;
    line-height: 1.4;
    font-weight: 600;
    max-width: 400px;
    margin-bottom: 12px;
}

.subtext-note {
    font-size: 14px;
    color: #334155;
    text-align: center;
    margin-top: 12px;
}

/* Loading Screen Styling */
.loading-card-wrapper {
    margin-top: 100px;
    width: 100%;
}

.loading-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.loading-bar-track {
    width: 100%;
    height: 14px;
    background-color: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width 0.05s linear;
}

.loading-subtext {
    font-size: 13.5px;
    color: #64748b;
    text-align: center;
    margin-top: 20px;
}

/* Final Screen Badge & Text */
.thank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 14px;
}

.green-check-icon {
    background-color: #10b981;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.lead-prompt-text {
    font-size: 15px;
    color: #334155;
    text-align: center;
    line-height: 1.45;
    margin-bottom: 24px;
}

.lead-form-full {
    width: 100%;
}

/* Floating Fieldset Input */
.input-floating-group {
    width: 100%;
    margin-bottom: 16px;
}

.input-fieldset {
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 0 12px 6px 12px;
    background-color: #ffffff;
    transition: border-color 0.2s;
}

.input-fieldset:focus-within {
    border-color: var(--color-primary);
}

.input-legend {
    font-size: 12px;
    color: #64748b;
    padding: 0 4px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    color: var(--color-text-main);
    padding: 6px 0;
    text-align: center;
}

.form-input::placeholder {
    color: #94a3b8;
    font-style: italic;
}

/* Button Component */
.btn-full {
    width: 100%;
}

.btn-blue {
    background-color: var(--color-blue-btn);
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 2px 4px rgba(79, 134, 247, 0.2);
}

.btn-blue:hover {
    background-color: var(--color-blue-btn-hover);
}

.btn-green {
    background-color: var(--color-green-btn);
    color: #ffffff;
    border: none;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 4px 6px rgba(22, 163, 74, 0.2);
}

.btn-green:hover {
    background-color: var(--color-green-btn-hover);
}

/* Step 1: Gender Grid */
.gender-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.gender-card {
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-md);
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}

.gender-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.gender-photo-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.btn-gender {
    width: 100%;
    background-color: var(--color-blue-btn);
    color: #ffffff;
    border: none;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.arrow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.border-arrow {
    background-color: transparent;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
}

/* Options List */
.options-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    width: 100%;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}

.option-btn:hover {
    background-color: #e0edfe;
    border-color: var(--color-primary);
    transform: translateX(2px);
}

.option-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 16px;
}

.badge-green {
    background-color: #10b981;
    color: white;
}

.badge-orange {
    font-size: 18px;
}

.badge-red {
    font-size: 18px;
}

.badge-yellow {
    font-size: 18px;
}

.option-label {
    font-size: 15px;
    font-weight: 600;
    color: #2563eb;
    flex: 1;
}

.simple-option .option-label {
    color: #3b82f6;
    font-weight: 600;
}

/* Helper Utilities */
.text-center {
    text-align: center;
}

.success-icon {
    margin-bottom: 16px;
}

.margin-top-md {
    margin-top: 16px;
}

.margin-top-lg {
    margin-top: 24px;
}

/* WhatsApp Button Component */
.whatsapp-btn-wrapper {
    width: 100%;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #25d366;
    color: #ffffff;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background-color: #1da851;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 211, 102, 0.4);
}

.whatsapp-icon {
    flex-shrink: 0;
}

/* Footer Component */
.footer {
    padding: 16px 0 24px 0;
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    width: 100%;
}

/* MOBILE RESPONSIVE STYLES */
@media (max-width: 640px) {
    .app-container {
        padding: 0 12px;
    }

    .content-container {
        max-width: 100%;
    }

    .intro-title, .question-title {
        font-size: 19px;
    }

    .main-banner-img {
        height: 220px;
    }

    .final-banner-img {
        height: 180px;
    }

    .gender-photo-img {
        height: 140px;
    }

    .gender-grid {
        gap: 10px;
    }

    .option-btn {
        padding: 12px 14px;
    }

    .option-label {
        font-size: 14px;
    }

    .btn-green, .btn-blue {
        padding: 14px 16px;
        font-size: 15px;
    }

    .loading-card-wrapper {
        margin-top: 60px;
    }
}
