/* =========================
   RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background: #eef2f7;
}

/* =========================
   CENTER WRAPPER FIX
   (IMPORTANT FIX)
========================= */
body {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* FIX: prevents vertical misalignment */
    padding: 20px 0;
}

/* =========================
   MAIN CONTAINER
========================= */
.container {
    width: 100%;
    max-width: 480px;
    min-height: 90vh; /* FIX: better mobile scaling */
    background: #ffffff;

    display: flex;
    flex-direction: column;

    overflow: hidden;
    border-radius: 20px;
}

/* =========================
   FLOATING LABEL FORM STYLE
========================= */
.floating-group {
    position: relative;
    margin-bottom: 18px;
}

.floating-group input,
.floating-group select,
.floating-group textarea {
    width: 100%;
    padding: 16px 12px 8px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 10px;
    outline: none;
    background: #fff;
    font-family: inherit;
}

.floating-group textarea {
    min-height: 100px;
    resize: vertical;
}

.floating-group label {
    position: absolute;
    left: 12px;
    top: 14px;
    color: #777;
    font-size: 14px;
    pointer-events: none;
    transition: 0.2s ease;
    background: #fff;
    padding: 0 4px;
}

/* Float on focus / filled */
.floating-group input:focus + label,
.floating-group input:not(:placeholder-shown) + label,
.floating-group textarea:focus + label,
.floating-group textarea:not(:placeholder-shown) + label,
.floating-group select:focus + label,
.floating-group select:valid + label {
    top: -8px;
    left: 10px;
    font-size: 12px;
    color: #2563eb;
}

/* =========================
   HEADER
========================= */
.app-header {
    position: sticky;
    top: 0;
    z-index: 10;

    background: #ffffff;
    padding: 16px;
    text-align: center;

    font-size: 18px;
    font-weight: 700;
    color: #111827;

    border-bottom: 1px solid #e5e7eb;
}

/* =========================
   CONTENT
========================= */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px 30px;
}

/* =========================
   TITLES
========================= */
h1 {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    margin-top: 24px;
    margin-bottom: 10px;
}

/* =========================
   PROGRESS BAR FIX
========================= */
.progress {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    width: 100%; /* FIX */
}

.progress div {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
}

.progress .active {
    background: #2563eb;
}

/* =========================
   INPUTS
========================= */
input,
textarea,
select {
    width: 100%;
    padding: 14px;
    margin-bottom: 14px;

    border: 1px solid #d1d5db;
    border-radius: 12px;

    font-size: 15px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* =========================
   CARD LAYOUT FIX
========================= */
.card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch; /* FIX */
}

.assist-card {
    width: 100%; /* FIX */
    padding: 16px;
    border-radius: 16px;

    background: #ffffff;
    border: 1px solid #e5e7eb;

    box-shadow: 0 2px 6px rgba(0,0,0,0.04);

    cursor: pointer;
    transition: all 0.2s ease;
}

.assist-card:active {
    transform: scale(0.98);
}

.assist-card:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.assist-card h3 {
    font-size: 15px;
    font-weight: 600;
}

.assist-card p {
    font-size: 12px;
    color: #6b7280;
}

/* =========================
   BACK BUTTON FIX (IMPORTANT)
   prevents awkward floating inside cards
========================= */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-top: 12px;
    padding: 10px 14px;

    background: #e5e7eb;
    color: #111827;

    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;

    width: fit-content;
}

/* =========================
   BUTTON GROUP (FOOTER STYLE)
========================= */
.button-group {
    background: #ffffff;
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;

    margin-top: auto;
}

.primary,
.secondary {
    width: 100%;
    padding: 14px;

    border: none;
    border-radius: 12px;

    font-size: 15px;
    font-weight: 600;
}

.primary {
    background: #2563eb;
    color: white;
}

.button-group a {
    margin-top: 50px;
    display: inline-block;
}

 .secondary {
    background: #ebe7e5;
    color: #111827;
    text-decoration: none;
}

.button-group a {
    margin-top: 30px;
    display: inline-block;
}

/* =========================
   MODAL
========================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}

.modal.show {
    display: flex;
    align-items: flex-end;
}

.modal-content {
    width: 100%;
    max-width: 480px;

    background: white;
    border-radius: 20px 20px 0 0;

    padding: 20px;

    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* =========================
   DESKTOP
========================= */
@media (min-width: 768px) {
    body {
        padding: 30px;
        background: #dbe2ea;
    }

    .container {
        border-radius: 30px;
        box-shadow: 0 20px 50px rgba(0,0,0,0.15);
        height: 90vh;
    }
}