@font-face {
    font-family: 'HelveticaNeue';
    src: url('font/HelveticaNeueLight.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'HelveticaNeue';
    src: url('font/HelveticaNeueMedium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

:root {
    --nemt-navy: #11116d;
    --nemt-blue: #176fa5;
    --nemt-deep-blue: #0d4b83;
    --nemt-teal: #31d0c0;
    --muted-label: #9f9f9f;
    --white: #ffffff;
    --panel-light: #f4f4f4;
    --panel-mid: #e8e8e8;
    --panel-dark: #dddddd;
    --page-background: #f4f8fc;
    --field-border: #cbd8e8;
    --field-text: #263f72;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'HelveticaNeue', -apple-system, BlinkMacSystemFont, sans-serif;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    background-color: var(--page-background);
    color: var(--nemt-navy);
    overflow: hidden;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.wallpage-app {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--page-background);
}

/* ================================
   FIRST SCREEN
================================ */

.intro-screen,
.signup-screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.intro-screen {
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(-10px);
}

.intro-logo {
    width: clamp(240px, 20vw, 320px);
    height: auto;
    display: block;
    margin-bottom: 44px;
    filter: drop-shadow(0 18px 22px rgba(15, 23, 42, 0.06));
}

/* ================================
   BUTTON
================================ */

.gradient-btn {
    min-width: 180px;
    min-height: 40px;
    border: none;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(180deg, var(--nemt-teal) 0%, var(--nemt-blue) 58%, var(--nemt-deep-blue) 100%);
    box-shadow: 0 16px 30px rgba(24, 73, 137, 0.22);
    padding: 10px 30px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(24, 73, 137, 0.28);
    filter: saturate(1.08);
}

.gradient-btn:active {
    transform: translateY(0);
}

/* ================================
   SIGNUP SCREEN
================================ */

.signup-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--page-background);
}

.signup-left {
    display: none;
}

.signup-left::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(49, 208, 192, 0.08), transparent 66%);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.signup-logo {
    position: relative;
    z-index: 1;
    width: clamp(270px, 21vw, 380px);
    height: auto;
    display: block;
    transform: translateY(0);
    filter: drop-shadow(0 20px 28px rgba(15, 23, 42, 0.08));
}

.signup-right {
    position: relative;
    width: min(100%, 626px);
    height: min(874px, calc(100svh - 40px));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(31, 59, 90, 0.13);
    overflow: hidden;
    transform: scale(0.8);
    transform-origin: center;
}

.signup-right::before {
    display: none;
}

.signup-card {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transform: none;
    overflow: hidden;
}

.signup-card-header {
    flex: 0 0 162px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #edf1f6;
    background: #ffffff;
}

.signup-card-logo {
    display: block;
    width: 200px;
    height: auto;
}

.signup-card h1 {
    display: none;
}

.signup-divider {
    display: none;
}

.form-area {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    padding: 30px 74px 24px;
    scrollbar-color: #cbd8e8 transparent;
    scrollbar-width: thin;
}

.form-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    color: var(--field-text);
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    padding-left: 2px;
}

.form-group input,
.form-group select,
.selector-btn {
    width: 100%;
    min-height: 60px;
    border: 1px solid var(--field-border);
    outline: none;
    border-radius: 999px;
    background-color: #f8fafc;
    color: #111827;
    padding: 0 29px;
    font-size: 20px;
    font-weight: 400;
    box-shadow: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.form-group input::placeholder {
    color: #64748b;
    opacity: 1;
}

.form-group input:hover,
.form-group select:hover,
.selector-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(31, 59, 90, 0.08);
}

.form-group input:focus,
.form-group select:focus,
.selector-btn:focus {
    background-color: #ffffff;
    border-color: #1f5596;
    box-shadow: 0 0 0 3px rgba(31, 85, 150, 0.12);
}

.form-group select,
.selector-btn {
    appearance: none;
    -webkit-appearance: none;
    text-align: left;
    background-image:
        linear-gradient(45deg, transparent 50%, #c8c8c8 50%),
        linear-gradient(135deg, #c8c8c8 50%, transparent 50%);
    background-position:
        calc(100% - 38px) 50%,
        calc(100% - 28px) 50%;
    background-size: 10px 10px, 10px 10px;
    background-repeat: no-repeat;
    padding-right: 66px;
}

.submit-btn {
    flex: 0 0 auto;
    width: calc(100% - 148px);
    min-width: 0;
    min-height: 64px;
    margin: 0 74px 32px;
    background: #1f5596;
    font-size: 20px;
    font-weight: 900;
}

/* ================================
   MODAL DESIGN
================================ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.modal-content {
    width: min(430px, 100%);
    max-height: 86vh;
    background-color: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
    animation: modalPop 0.28s ease both;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-bottom: 1px solid #eef2f7;
}

.modal-header h3 {
    color: var(--nemt-navy);
    font-size: 18px;
    font-weight: 800;
}

.modal-header button {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background-color: #f8fafc;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header button:hover {
    background-color: #eef2f7;
    color: var(--nemt-navy);
}

.modal-body {
    padding: 30px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.success-icon {
    background-color: #d1fae5;
    color: #10b981;
}

.modal-body p {
    color: #475569;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.55;
    margin-bottom: 26px;
}

.modal-btn {
    width: 100%;
    min-height: 44px;
}

.county-modal-content {
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.county-search {
    padding: 18px 22px;
    border-bottom: 1px solid #eef2f7;
}

.county-search input,
.other-county-container input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    outline: none;
    padding: 0 18px;
    color: var(--nemt-navy);
    font-size: 14px;
    font-weight: 700;
}

.county-search input:focus,
.other-county-container input:focus {
    border-color: #184989;
    box-shadow: 0 0 0 4px rgba(24, 73, 137, 0.09);
}

.county-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.county-list li {
    padding: 14px 22px;
    color: #3f4770;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

.county-list li:hover {
    background-color: #f8fafc;
    color: #184989;
}

.other-county-container {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.other-county-container label {
    color: #3f4770;
    font-size: 14px;
    font-weight: 800;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 1200px) {
    .signup-screen {
        grid-template-columns: none;
    }

    .signup-right {
        padding: 0;
    }

    .signup-card {
        width: 100%;
    }

    .signup-logo {
        width: clamp(250px, 22vw, 340px);
    }
}

@media (max-width: 900px) {
    html,
    body {
        width: 100%;
        min-height: 100%;
        height: auto;
    }

    body {
        overflow-x: hidden;
        overflow-y: auto;
        background-color: var(--page-background);
    }

    .wallpage-app {
        width: 100%;
        min-height: 100svh;
        height: auto;
        overflow: visible;
        background: var(--page-background);
    }

    .intro-screen,
    .signup-screen {
        position: relative;
        inset: auto;
        width: 100%;
        min-height: 100svh;
        height: auto;
    }

    .intro-screen {
        padding: 40px 22px;
    }

    .intro-center {
        width: 100%;
        min-height: calc(100svh - 80px);
        transform: none;
        gap: 32px;
    }

    .intro-logo {
        width: min(270px, 72vw);
        margin-bottom: 0;
    }

    .intro-center .gradient-btn {
        min-width: 190px;
        min-height: 42px;
        font-size: 14px;
    }

    .signup-screen {
        display: flex;
        flex-direction: row;
        min-height: 100svh;
        padding: 12px;
        background: var(--page-background);
        overflow: hidden;
    }

    .signup-left {
        width: 100%;
        min-height: 185px;
        padding: 34px 22px 24px;
        align-items: center;
        justify-content: center;
        overflow: visible;
    }

    .signup-left::before {
        width: 330px;
        height: 330px;
        opacity: 0.9;
    }

    .signup-logo {
        width: min(255px, 70vw);
        transform: none;
    }

    .signup-right {
        width: min(100%, 626px);
        height: calc(100svh - 24px);
        min-height: 0;
        align-items: center;
        justify-content: center;
        padding: 0;
        border-radius: 20px;
        background: #ffffff;
        box-shadow: 0 18px 45px rgba(31, 59, 90, 0.13);
        overflow: hidden;
    }

    .signup-right::before {
        display: none;
    }

    .signup-card {
        width: 100%;
        height: 100%;
        transform: none;
    }

    .signup-card h1 {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .signup-divider {
        display: none;
    }

    .form-area {
        gap: 22px;
        padding: 28px 48px 24px;
    }

    .form-group {
        gap: 9px;
    }

    .form-group label {
        font-size: 14px;
        padding-left: 4px;
    }

    .form-group input,
    .form-group select,
    .selector-btn {
        min-height: 58px;
        padding-left: 24px;
        padding-right: 56px;
        font-size: 18px;
        font-weight: 400;
        box-shadow: none;
    }

    .form-group select,
    .selector-btn {
        background-position:
            calc(100% - 31px) 50%,
            calc(100% - 23px) 50%;
        background-size: 8px 8px, 8px 8px;
    }

    .submit-btn {
        width: calc(100% - 96px);
        min-width: 0;
        min-height: 60px;
        margin: 0 48px 28px;
        font-size: 19px;
    }

    .modal {
        padding: 18px;
        align-items: center;
    }

    .modal-content {
        width: min(430px, 100%);
        max-height: 88svh;
        border-radius: 22px;
    }

    .county-modal-content {
        min-height: 0;
        height: min(520px, 88svh);
    }
}

@media (max-width: 520px) {
    .intro-screen {
        padding: 34px 18px;
    }

    .intro-center {
        min-height: calc(100svh - 68px);
        gap: 28px;
    }

    .intro-logo {
        width: min(245px, 76vw);
    }

    .intro-center .gradient-btn {
        min-width: 178px;
        min-height: 40px;
    }

    .signup-left {
        min-height: 160px;
        padding: 28px 18px 18px;
    }

    .signup-left::before {
        width: 270px;
        height: 270px;
    }

    .signup-logo {
        width: min(225px, 74vw);
    }

    .signup-right {
        width: 100%;
        height: calc(100svh - 24px);
        min-height: 0;
        border-radius: 20px;
        padding: 0;
    }

    .signup-card h1 {
        display: none;
    }

    .signup-divider {
        margin-bottom: 26px;
    }

    .form-area {
        gap: 20px;
        padding: 26px 20px 22px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group select,
    .selector-btn {
        min-height: 58px;
        padding-left: 22px;
        padding-right: 52px;
        font-size: 17px;
    }

    .submit-btn {
        width: calc(100% - 40px);
        min-width: 0;
        min-height: 60px;
        margin: 0 20px 24px;
        font-size: 19px;
    }

    .modal {
        padding: 14px;
    }

    .modal-header {
        padding: 16px 18px;
    }

    .modal-body {
        padding: 26px 20px 22px;
    }

    .county-search {
        padding: 16px 18px;
    }

    .county-list li {
        padding: 14px 18px;
    }

    .other-county-container {
        padding: 18px;
    }
}

@media (max-width: 380px) {
    .signup-left {
        min-height: 145px;
    }

    .signup-logo {
        width: min(205px, 76vw);
    }

    .signup-right {
        height: calc(100svh - 24px);
        min-height: 0;
        padding: 0;
        border-radius: 18px;
    }

    .signup-card h1 {
        font-size: 28px;
    }

    .form-area {
        gap: 16px;
    }

    .form-group input,
    .form-group select,
    .selector-btn {
        min-height: 54px;
        font-size: 16px;
    }

    .submit-btn {
        min-height: 56px;
        margin-top: 0;
    }
}

@media (max-height: 720px) and (max-width: 900px) {
    .signup-left {
        min-height: 135px;
        padding-top: 22px;
        padding-bottom: 12px;
    }

    .signup-logo {
        width: min(210px, 64vw);
    }

    .signup-right {
        min-height: 0;
        padding: 0;
    }

    .signup-card h1 {
        display: none;
    }

    .signup-divider {
        display: none;
    }

    .form-area {
        gap: 14px;
        padding: 20px 20px 16px;
    }

    .form-group input,
    .form-group select,
    .selector-btn {
        min-height: 46px;
        font-size: 15px;
    }

    .submit-btn {
        width: calc(100% - 40px);
        min-width: 0;
        margin: 0 20px 18px;
        min-height: 50px;
        font-size: 17px;
    }
}
