@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    font-family: 'Roboto', Verdana, Geneva, Tahoma, sans-serif;
    background-color: #0c0c0f;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: #f5f5f7;
}

body:before {
    content: "";
    mix-blend-mode: color-dodge;
    position: fixed;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    z-index: -1;
    overflow: hidden;
    background: url('pattern.png') 0 0 repeat;
    background-size: 20vh;
    transform: rotate(7deg);
    opacity: 0.1;
    animation: backgroundScroll 150s linear infinite;
}

@keyframes backgroundScroll {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: -100% 0;
    }
}

input,
textarea,
button,
select,
a {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    outline: none;
}

h1 {
    font-size: 32px;
    color: #ffffff;
    text-align: center;
    margin: 0 0 20px 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

*::-webkit-scrollbar {
    display: none;
}

#app {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
}

.hidden {
    display: none;
}

/* Header — абсолютно прозрачный с эффектом жидкого преломления */
.header {
    background-color: transparent;
    backdrop-filter: blur(15px) saturate(140%);
    -webkit-backdrop-filter: blur(15px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    width: 100vw;
    box-sizing: border-box;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    max-width: 40vw;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* User Panel — прозрачное жидкое стекло с тонкой гранью */
.user-panel {
    background: transparent;
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    bottom: 24px;
    right: 24px;
    position: fixed;
    display: flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 30px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 90;
}

.user-panel:hover {
    transform: translateY(-4px);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.user-panel>* {
    pointer-events: none;
}

.user-avatar {
    border-radius: 50%;
    width: 26px;
    height: 26px;
    margin-right: 10px;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

/* Кнопки — кристально прозрачное стекло с эффектом преломления линзы */
button {
    background: rgba(255, 255, 255, 0.02);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px) saturate(160%);
    -webkit-backdrop-filter: blur(15px) saturate(160%);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

button:hover {
    transform: translateY(-2px) scale(1.02);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

button:active {
    transform: translateY(1px) scale(0.98);
    background: rgba(255, 255, 255, 0.01);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.02);
}

button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

button[type="submit"] {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px 36px;
    border-radius: 24px;
    font-size: 16px;
    width: 100%;
    max-width: 340px;
    margin: 12px auto 0 auto;
    font-weight: 600;
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

button[type="submit"]:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

button[type="submit"] i {
    color: #ffffff;
}

i {
    font-size: 14px;
    margin-right: 8px;
}

/* Content Area */
.content {
    padding: 40px 20px;
    text-align: center;
    box-sizing: border-box;
    width: 100vw;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.main-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.error-message {
    color: #ff4d4d;
    background-color: rgba(255, 77, 77, 0.05);
    border: 1px solid rgba(255, 77, 77, 0.1);
    padding: 14px 20px;
    border-radius: 18px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
    backdrop-filter: blur(15px);
}

.login-container,
.upload-container {
    color: #ffffff;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.login-container p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

/* Контейнеры полей ввода */
.input-group {
    position: relative;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 8px;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.3s;
}

/* Поля ввода — полностью прозрачные с преломлением */
.input-field {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);

    width: 100%;
    box-sizing: border-box;
    padding: 16px 20px 16px 52px;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    border-radius: 20px;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.input-field:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.input-field:focus+.input-icon {
    color: rgba(255, 255, 255, 0.65);
}

textarea.input-field {
    min-height: 120px;
    resize: vertical;
    padding-top: 18px;
}

/* Файловый лейбл — прозрачная пунктирная область */
.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 18px 24px;
    margin-top: 8px;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.file-label i {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s;
}

.file-label:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.file-label:hover i {
    transform: translateY(-2px);
    color: #ffffff;
}

input[type="file"] {
    display: none;
}

/* Мобильная адаптация */
@media (max-width: 600px) {
    .header {
        padding: 12px 16px;
    }

    .site-title {
        font-size: 20px;
    }

    .page-title {
        font-size: 13px;
    }

    button {
        padding: 10px 18px;
        font-size: 13px;
        border-radius: 16px;
    }

    button[type="submit"] {
        padding: 14px 28px;
        border-radius: 18px;
        font-size: 15px;
    }

    .content {
        padding: 24px 16px;
    }

    .main-title {
        font-size: 24px;
    }

    .file-label,
    .input-field {
        padding-top: 14px;
        padding-bottom: 14px;
        font-size: 14px;
        border-radius: 16px;
    }

    .input-field {
        padding-left: 46px;
    }

    .input-icon {
        left: 18px;
        font-size: 14px;
    }

    .user-panel {
        bottom: 16px;
        right: 16px;
        left: 16px;
        justify-content: center;
        box-sizing: border-box;
    }
}