@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

html,
body {
    height: 100%;
    min-height: 100dvh;
}

body {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    body {
        background: linear-gradient(135deg, #7b9fff 0%, #a8b8ff 25%, #c4d0ff 50%, #a8b8ff 75%, #7b9fff 100%);
    }
}

/* ── Outer wrapper ───────────────────────── */
.page-wrapper {
    display: flex;
    width: 100%;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
}

/* ── Card (white container) ─────────────── */
.login-card {
    background-color: #fff;
    width: 100%;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

@media (min-width: 768px) {
    .login-card {
        width: 460px;
        min-height: 660px;
        border-radius: 1.2rem;
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
    }
}

/* ── Screens (only ONE at a time) ────────── */
.screen {
    display: none;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 380px;
}

/* ── Logo ─────────────────────────────────── */
.logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

/* ── Typography ───────────────────────────── */
.header-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.header-subtitle {
    font-size: 1.125rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* ── Form ──────────────────────────────────── */
.form-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Input group (floating label) ──────────── */
.input-group {
    position: relative;
    margin-top: 1.25rem;
}

.input-group input {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    width: 100%;
    padding: 16px 16px;
    font-size: 1.125rem;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    background: transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* ── Phone row (prefix + input) ────────────── */
.phone-row {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.phone-row:focus-within {
    border-color: #63ccc7;
    box-shadow: 0 0 0 3px rgba(99, 204, 199, 0.3);
}

.phone-prefix {
    padding: 16px 0 16px 16px;
    font-size: 1.125rem;
    font-family: 'Montserrat', sans-serif;
    color: #111827;
    white-space: nowrap;
    user-select: none;
}

.phone-row input {
    border: none !important;
    border-radius: 0 !important;
    padding: 16px 16px 16px 6px;
    box-shadow: none !important;
    flex: 1;
}

.input-group input:focus {
    border-color: #63ccc7;
    box-shadow: 0 0 0 3px rgba(99, 204, 199, 0.3);
}

.input-group label {
    position: absolute;
    top: -8px;
    left: 12px;
    font-size: 12px;
    color: #63ccc7;
    background-color: #fff;
    padding: 0 4px;
    font-family: 'Montserrat', sans-serif;
}

/* ── Hints & errors ────────────────────────── */
.input-hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    text-align: left;
}

.input-error {
    font-size: 0.875rem;
    color: #ef4444;
    margin-top: 0.375rem;
    text-align: left;
    display: none;
}

.input-error.visible {
    display: block;
}

/* ── Submit button ─────────────────────────── */
.submit-btn {
    width: 100%;
    border-radius: 0.5rem;
    background-color: rgb(20, 184, 166);
    padding: 0.875rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 2rem;
}

.submit-btn:hover {
    background-color: rgb(13, 148, 136);
}

.submit-btn:disabled,
.submit-btn.disabled {
    background-color: #c5c7ca !important;
    color: #fff !important;
    pointer-events: none;
    cursor: not-allowed;
}

/* ── Loading screen ────────────────────────── */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    min-height: 300px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: rgb(20, 184, 166);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
}

/* ── Chat bubble (bottom-right) ────────────── */
.chat-bubble {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999999;
    width: 3.5rem;
    height: 3.5rem;
    min-width: fit-content;
    border-radius: 50%;
    background-color: rgb(38, 207, 199);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: opacity 0.2s;
}

.chat-bubble:hover {
    opacity: 0.8;
}

.chat-bubble svg {
    width: 16px;
    height: 16px;
    color: #fff;
    fill: #fff;
}

/* ── Ban screen ────────────────────────────── */
#banScreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: #000;
}

#banScreen video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
}

/* ── Shake animation ──────────────────────── */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.3s ease-in-out;
}