* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

input,
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

:root {
    --app-green: #25D366;
    --app-dark-green: #008069;
}

.login-card {
    background: white;
    border-radius: 10px;
    padding: 40px 20px;
    border-width: 0.8px;
    border-color: black;
    border-style: solid;
    color: #111b21;
    text-align: left;
}

.title {
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 400;
}

.subtitle {
    font-size: 13px;
    margin-bottom: 24px;
}

.subtitle .phone_code {
    font-weight: bold;
}

.p_edit {
    color: #008069;
    text-decoration: none;
}

.p_edit:hover,
.p_edit:active {
    text-decoration: underline;
}

.verification-code {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    font-family: monospace;
    font-size: 20px;
    background-color: #f4f4f4;
    height: 80px;
    border-radius: 5px;
    position: relative;
}

.verification-code .code {
    background-color: white;
    border: 0.5px solid #8696a0;
    border-radius: 4px;
    padding: 5px;
    min-width: 30px;
    text-align: center;
    display: none;
}

.verification-code .line {
    display: none;
}

.verification-code .loading {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid gray;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.qr-code-link {
    text-align: center;
    text-decoration: none;
    font-size: 17px;
    cursor: pointer;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    color: var(--app-green);
    ;
}

.qr-code-link:hover {
    text-decoration: underline;
}

.qr-code-link::after {
    content: "";
    width: 7px;
    height: 7px;
    border-top: 3px solid #111b21;
    border-right: 3px solid #111b21;
    transform: rotate(45deg);
    margin-left: 6px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.steps {
    margin: 30px 0;
}

.step {
    margin-bottom: 15px;
    font-size: 13px;
    color: #111b21;
}

.bottom-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bottom-link {
    color: #008069;
    text-decoration: none;
    font-size: 14px;
}

.bottom-link:hover {
    text-decoration: underline;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #fcf5eb;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--app-dark-green);
    font-size: 20px;
    font-weight: bold;
}

.download-btn {
    background-color: var(--app-green);
    color: white;
    padding: 8px 16px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 500;
}

.container {
    max-width: 450px;
    margin: 40px auto;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    padding: 40px;
    border-width: 0.8px;
    border-color: black;
    border-style: solid;
    color: #111b21;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 2rem;
    font-weight: 400;
}

.subtitle {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 24px;
}

.phone-input {
    margin-bottom: 24px;
}

.country-select {
    position: relative;
    margin-bottom: 16px;
}

.selected-country {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border: 1px solid #0a0a0a;
    border-radius: 20px;
    cursor: pointer;
    background: white;
    transition: all 0.2s ease;
}

.selected-country:hover {
    border-color: #008069;
}

.selected-country img {
    width: 24px;
    height: 18px;
    margin-right: 12px;
    border-radius: 2px;
    object-fit: cover;
}

.selected-country span {
    flex: 1;
    font-size: 14px;
}

.selected-country .country-code {
    flex: none;
    color: #666;
    margin-left: auto;
    margin-right: 8px;
    font-weight: 500;
}

.selected-country::after {
    content: "";
    border: solid #666;
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.selected-country.active::after {
    transform: rotate(-135deg);
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    visibility: hidden;
}

.country-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.search-box {
    margin: 15px 8px 8px 8px;
    background-color: #f0f2f5;
    border-radius: 8px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background-color: transparent;
    color: #111b21;
}

.search-box::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%238696a0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

.search-box input::placeholder {
    color: #8696a0;
}

.country-items {
    height: calc(300px - 56px);
    overflow-y: auto;
}

.country-items::-webkit-scrollbar {
    width: 6px;
}

.country-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.country-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.country-items::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.country-item {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

.country-item:last-child {
    border-bottom: none;
}

.country-item:hover {
    background-color: #f0f2f5;
}

.country-item img {
    width: 24px;
    height: 18px;
    margin-right: 12px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.country-item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.country-item-content .country-name {
    font-size: 14px;
    color: #111b21;
    font-weight: 400;
}

.country-item-content .country-name-en {
    font-size: 12px;
    color: #8696a0;
}

.country-item .country-code {
    flex: none;
    color: #666;
    margin-left: auto;
    font-size: 14px;
    font-weight: 500;
}

.phone-number-input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #0a0a0a;
    border-radius: 20px;
    font-size: 16px;
    line-height: 20px;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.next-btn {
    width: 92px;
    height: 38px;
    background-color: var(--app-dark-green);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 16px;
    line-height: 38px;
}

.qr-code-link {
    text-align: center;
    text-decoration: none;
    font-size: 17px;
    cursor: pointer;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
}

.qr-code-link:hover {
    text-decoration: underline;
}

.qr-code-link::after {
    content: "";
    width: 7px;
    height: 7px;
    border-top: 3px solid #111b21;
    border-right: 3px solid #111b21;
    transform: rotate(45deg);
    margin-left: 6px;
}

.encryption-notice {
    text-align: center;
    color: #666;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.encryption-notice img {
    width: 16px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.loading-overlay img {
    width: 120px;
    height: auto;
    margin-bottom: 5px;
    filter: grayscale(100%);
    opacity: 0.5;
}

.loading-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8696a0;
    font-size: 14px;
}

.loading-text svg {
    width: 18px;
    height: 18px;
}

.loading-bar {
    width: 60%;
    height: 3px;
    margin-bottom: 20px;
    background-color: lightgray;
}

.tutorial-section {
    margin-top: 30px;
}

.tutorial-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.tutorial-image {
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tutorial-link {
    color: #25D366;
    text-decoration: none;
    margin-top: 10px;
    display: block;
}

@media (max-width: 768px) {
    .tutorial-images {
        grid-template-columns: 1fr;
    }
}

.copy-btn {
    display: block;
    margin: 0 auto 20px;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background-color: #128C7E;
}