body {
    margin: 0;
    background-color: #1e1e1e;
    font-family: 'Inter', sans-serif;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container {
    width: 100%;
    max-width: 360px;
    padding: 2rem;
    box-sizing: border-box;
    text-align: center;
}

.logo {
    background-color: #865cf4;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo img {
    width: 200%;
    height: auto;
}

h1 {
    font-size: 1.5rem;
    margin: 0.5rem 0;
}

.subtitle {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-wrapper label {
    position: absolute;
    top: -0.65rem;
    left: 1rem;
    background: #1e1e1e;
    padding: 0 0.3rem;
    font-size: 0.75rem;
    color: #aaa;
    z-index: 1;
}

input[type="tel"],
input[type="text"],
.custom-select-wrapper {
    width: 100%;
    font-size: 1rem;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    color: white;
}

input[type="tel"]:focus,
input[type="text"]:focus,
.custom-select-wrapper.open {
    border-color: #865cf4;
    box-shadow: 0 0 0 1px rgba(134, 92, 244, 0.6);
    outline: none;
}

.custom-select-wrapper {
    position: relative;
    cursor: pointer;
}

.custom-select-display {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 1rem;
    color: #fff;
    gap: 0.5rem;
    padding: 0;
}

.flag-icon {
    width: 24px;
    height: 18px;
    background-size: cover;
    background-position: center;
    border-radius: 3px;
}

.country-name {
    flex: none;
    margin-left: 8px;
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 0.9rem;
    color: #aaa;
}

.country-search-input {
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 0;
    height: 1px;
    opacity: 0;
    color: transparent;
    background: transparent;
    pointer-events: auto;
}


.custom-select-wrapper.open .country-search-input {
    opacity: 1;
    height: auto;
    visibility: visible;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #444;
    pointer-events: auto;
}


.custom-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    margin-top: 4px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.custom-select-wrapper.open .custom-select-dropdown {
    display: block;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.country-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}

.country-list .option {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    transition: background 0.2s;
    cursor: pointer;
}

.country-list .option:hover,
.country-list .option.highlighted {
    background-color: #3a3a3a;
}

.country-list .option img {
    width: 24px;
    height: 18px;
    margin-right: 12px;
}

.country-list .option .code {
    margin-left: auto;
    color: #aaa;
    font-size: 0.9rem;
}

button {
    margin-top: 1rem;
    padding: 0.9rem;
    background-color: #865cf4;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

button:hover {
    background-color: #9c74ff;
}

.qr-link {
    display: block;
    margin-top: 1.5rem;
    color: #a98ef8;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
}

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

#next-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
    height: 48px;
    padding: 0.9rem;
}

#next-button.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.verify-page {
    max-width: 360px;
    margin: auto;
    text-align: center;
}

.emoji {
    font-size: 80px;
    margin-bottom: 1.5rem;
}

.verify-phone {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

#edit-phone {
    background: none;
    border: none;
    font-size: 1rem;
    color: #aaa;
    padding: 0;
    margin-left: 0.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transform: translateY(-2px);
}


#edit-phone svg {
    width: 16px;
    height: 16px;
    stroke: #aaa;
    stroke-width: 2;
}


.verify-text {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.code-input {
    background-color: #1e1e1e;
    border: 1px solid #444;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    width: 100%;
    transition: border 0.3s;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.code-input:focus {
    outline: none;
    border-color: #865cf4;
    box-shadow: 0 0 0 1px rgba(134, 92, 244, 0.6);
}

.visibility-toggle {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
}

.input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input {
    width: 100%;
    height: 48px;
    background-color: #1e1e1e;
    color: white;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 0 2.75rem 0 1rem; /* відступ під іконку */
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.password-input:focus {
    border-color: #865cf4;
}

.password-toggle {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 1rem;
    margin: auto 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    z-index: 2;
}

.password-toggle:hover {
    color: white;
}

#password-next-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
    height: 48px;
    padding: 0.9rem;
    background-color: #865cf4;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    width: 100%;
}

#password-next-btn.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


.eye-symbol {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url('/app/static/eye.svg');
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
}
