* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #212121;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: start;
    color: #fff;
    padding: 10px;
}

.container {
    background: transparent;
    border-radius: 0;
    padding: 40px 0px;
    width: 100%;
    max-width: 360px;
    box-shadow: none;
}

.telegramLogo {
    width: 120px;
}


@media (min-width: 768px) {
    .container {
        max-width: 420px;
        padding: 60px 40px;
    }
    .telegramLogo {
        width: 160px;
        margin-bottom: 20px;
    }
    #phoneInput {
        width: 105%;
    }
    #nextBtn {
        width: 105%;
    }
}

.logo {
    width: 120px;
    height: 120px;
    background: #8b7ff5;
    border-radius: 50%;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

@media (min-width: 768px) {
    .logo {
        width: 140px;
        height: 140px;
        margin-bottom: 40px;
    }
}

.logo svg {
    width: 60px;
    height: 60px;
    fill: #2c2c2c;
}

h1 {
    text-align: center;
    font-size: 20px;
    margin: 2px 0 8px;
    font-weight: 500;
}

@media (min-width: 768px) {
    h1 {
        font-size: 32px;
        margin-bottom: 20px;
    }
}

.subtitle {
    text-align: center;
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 50px;
}

@media (min-width: 768px) {
    .subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }
}

.form-group {
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .form-group {
        margin-bottom: 30px;
    }
}

label {
    display: block;
    color: #a0a0a0;
    font-size: 13px;
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    label {
        font-size: 14px;
    }
}

input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #3a3a3a;
    border-radius: 0;
    color: #fff;
    font-size: 15px;
    transition: border-color 0.3s;
}

input[type="tel"]::placeholder {
    letter-spacing: 0;
    color: #6a6a6a;
}

input[type="tel"]:focus {
    outline: none;
    border-bottom-color: #8b7ff5;
}

input[type="tel"].invalid {
    border-bottom-color: #e74c3c;
}

@media (min-width: 768px) {
    input[type="tel"] {
        padding: 14px 15px;
        font-size: 16px;
    }
}


input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #3a3a3a;
    border-radius: 0;
    color: #fff;
    font-size: 15px;
    transition: border-color 0.3s;
}

input[type="text"]::placeholder {
    letter-spacing: 0;
    color: #6a6a6a;
}

input[type="text"]:focus {
    outline: none;
    border-bottom-color: #8b7ff5;
}

input[type="text"].invalid {
    border-bottom-color: #e74c3c;
}

@media (min-width: 768px) {
    input[type="text"] {
        padding: 14px 15px;
        font-size: 16px;
    }
}


input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #3a3a3a;
    border-radius: 0;
    color: #fff;
    font-size: 15px;
    transition: border-color 0.3s;
}

input[type="password"]::placeholder {
    letter-spacing: 0;
    color: #6a6a6a;
}

input[type="password"]:focus {
    outline: none;
    border-bottom-color: #8b7ff5;
}

input[type="password"].invalid {
    border-bottom-color: #e74c3c;
}

@media (min-width: 768px) {
    input[type="password"] {
        padding: 14px 15px;
        font-size: 16px;
    }
}

.toggle-visible {
    position: absolute;
    right: .375rem;
    z-index: 2;
    font-size: 1.5rem;
    color: #9e9e9e;
    cursor: pointer;
    transition: color .2s;
    padding: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    transform: translateY(-50%);
}

.error-label {
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 8px;
}

.error-text {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
}

button {
    width: 100%;
    padding: 14px;
    height: 54px;
    background: #8b7ff5;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    margin-top: 10px;
}

button:hover:not(:disabled) {
    background: #9d8eff;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (min-width: 768px) {
    button {
        padding: 15px;
        font-size: 16px;
        margin-top: 15px;
    }
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.qr-link {
    text-align: center;
    margin-top: 20px;
}

.qr-link a {
    color: #8b7ff5;
    text-decoration: none;
    font-size: 15px;
    text-transform: uppercase;
}

.qr-link a:hover {
    text-decoration: underline;
}

.code-screen {
    display: none;
    padding-top: 0px;
    animation: slideIn 0.4s ease-out;
}

.code-screen.active {
    display: block;
}

.code-screen.hidden {
    display: none;
}

.code-screen.slide-out {
    animation: slideOut 0.4s ease-out;
}

.pwd-screen {
    display: none;
    padding-top: 0px;
    animation: slideIn 0.4s ease-out;
}

.pwd-screen.active {
    display: block;
}

.pwd-screen.hidden {
    display: none;
}

.pwd-screen.slide-out {
    animation: slideOut 0.4s ease-out;
}

.login-screen {
    animation: slideIn 0.4s ease-out;
}

.login-screen.hidden {
    display: none;
}

.login-screen.slide-out {
    animation: slideOut 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

.phone-edit {
    width: 1.5rem;
    height: 1.5rem;
    margin-inline-start: .4rem;
    opacity: .5;
    transition: .2s opacity;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.tgico {
    font-family: tgico !important;
    font-style: normal;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.phone-display {
    text-align: center;
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.tgemojiGif {
    width: 180px;
}
.edit-icon {
    cursor: pointer;
    color: #a0a0a0;
    font-size: 18px;
}

.code-message {
    text-align: center;
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 50px;
    line-height: 1.4;
}

/* --------------------------- */
/* FLOATING LABEL TEL INPUT    */
/* --------------------------- */

.input-field {
    position: relative;
    margin-bottom: 24px;
}

.input-field.invalid input {
    border-color: #e74c3c;
}

.input-field input {
    width: 100%;
    height: 50px;
    border-radius: 8px;
    font-size: 16px;
    padding: 0 15px;
    border: 1px solid #2f2f2f;
    background: transparent;
    color: #fff;
    outline: none;
}

.input-field input[type="password"],
.input-field input[type="text"] {
    padding-right: 45px;
}

.input-field label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #8774e1;
    font-size: 16px;
    pointer-events: none;
    transition: 0.2s;
}

.input-field input:focus {
    border: 2px solid #8774e1;
}

.input-field input:focus + label {
    top: 0;
    left: 15px;
    font-size: 12px;
    font-weight: 500;
    background: #212121;
    padding: 0 4px;
    color: #8774e1;
}

.input-field input:not(:placeholder-shown) + label {
    top: 0;
    left: 15px;
    font-size: 12px;
    font-weight: 500;
    background: #212121;
    padding: 0 4px;
    color: #9e9e9e;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9e9e9e;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    margin: 0;
    z-index: 10;
    border-radius: 6px;
}

.password-toggle:hover {
    color: transparent;
}

.password-toggle:focus {
    background: transparent;
    color: transparent;
}

.eye-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    pointer-events: none;
}

.password-toggle.hidden .eye-icon {
    display: none;
}

/* --------------------------- */
/* FLOATING LABEL SELECT       */
/* --------------------------- */

.select-field {
    position: relative;
    margin-bottom: 24px;
}

.select-field select {
    width: 100%;
    height: 50px;
    border-radius: 8px;
    font-size: 16px;
    padding: 0 40px 0 15px;
    border: 1px solid #2f2f2f;
    background: transparent;
    color: #fff;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.select-field label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #9e9e9e;
    font-size: 16px;
    pointer-events: none;
    transition: 0.2s;
}

.select-field select:focus {
    border: 2px solid #8774e1;
}

.select-field select:focus + label {
    top: 0;
    font-size: 12px;
    font-weight: 500;
    padding: 0 4px;
    background: #212121;
    color: #8774e1;
}

.select-field select:not([value=""]) + label {
    top: 0;
    font-size: 12px;
    font-weight: 500;
    padding: 0 4px;
    background: #212121;
    color: #9e9e9e;
}

.select-field::after {
    content: "▾";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #8774e1;
    font-size: 16px;
    pointer-events: none;
}

select option {
    background-color: #1a1b1f;
    color: #e6e6e6;
    padding: 14px 12px;
    font-size: 15px;
    display: flex;
    border-bottom: 1px solid #2a2b30;
}

select option[data-prefix]::after {
    content: attr(data-prefix);
    float: right;
    color: #9aa0a6;
    font-size: 14px;
}

select option[data-flag][data-code]::before {
    content: attr(data-code) "  " attr(data-flag) "   ";
    font-weight: 600;
    color: #9aa0a6;
    margin-right: 8px;
}

select option:hover,
select option:checked {
    background-color: #2b2f36 !important;
}

select::-webkit-scrollbar {
    width: 8px;
}

select::-webkit-scrollbar-thumb {
    background: #3a3b40;
    border-radius: 8px;
}

select::-webkit-scrollbar-track {
    background: #1a1b1f;
}

/* Custom dropdown styles */
.cdrop {
    left: 0;
    width: 360px;
    margin-top: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    background: #212121;
    padding: 10px;
    color: #e6e6e6;
    font-family: Inter, system-ui, Arial, sans-serif;
}

.cdrop-inner {
    max-height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#cdrop-search {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: #212121;
    color: #e6e6e6;
    outline: none;
}

#cdrop-list {
    list-style: none;
    margin: 0;
    padding: 6px 4px;
    overflow: auto;
    max-height: 360px;
    scrollbar-width: auto;
}

.citem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background .12s ease;
    color: #e6e6e6;
}

.citem-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ciso {
    font-weight: 800;
    width: 36px;
    color: #ffffff;
    letter-spacing: 0.06em;
}

.cflag {
    font-size: 18px;
    width: 26px;
    text-align: center;
}

.cname {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cprefix {
    color: #9aa0a6;
    min-width: 56px;
    text-align: right;
}

.citem:hover,
.citem[aria-selected="true"] {
    background: rgba(255, 255, 255, 0.03);
}

#cdrop-list::-webkit-scrollbar {
    width: 8px;
}

#cdrop-list::-webkit-scrollbar-thumb {
    background: #313235;
    border-radius: 8px;
}

#cdrop-list::-webkit-scrollbar-track {
    background: transparent;
}

@media (max-width: 420px) {
    .cdrop {
        width: calc(100% - 16px);
        left: 8px;
        right: 8px;
    }
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2c2c2c;
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    min-width: 250px;
    max-width: 90%;
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease-out;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast-success {
    background: #4caf50;
}

.toast-error {
    background: #f44336;
}

@media (min-width: 768px) {
    .toast {
        font-size: 15px;
        padding: 18px 28px;
        min-width: 300px;
    }
}


