/* Базовые стили и сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000000;
    min-height: 50vh;
    display: flex;
    align-items: top;
    justify-content: center;
    padding: 100px 15px;
    color: #ffffff;
    line-height: 1.4;
}

/* Контейнер с эффектом "глубины" */
.container {
    background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    border: 1px solid #3a3a3c;
    box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

/* Заголовок страницы */
.container::before {
    content: "PassUp: простой пароль";
    display: block;
    font-size: 1.5em;
    /*    font-weight: 600;*/
    text-align: left;
    margin-bottom: 25px;
    color: #ffffff;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Форма */
#passwordForm {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Метки */
label {
/*    font-weight: 500;*/
    color: #e5e5ea;
    margin-bottom: -8px;
    font-size: 0.85em;
    letter-spacing: 0.2px;
}

/* Поля ввода */
input[type="text"] {
    padding: 12px 16px;
    border: 1.5px solid #3a3a3c;
    border-radius: 10px;
    font-size: 0.9em;
    background: rgba(44, 44, 46, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
    backdrop-filter: blur(20px);
}

input[type="text"]:focus {
    outline: none;
    border-color: #787880;
    background: rgba(58, 58, 60, 0.8);
    box-shadow: 0 0 0 3px rgba(120, 120, 128, 0.2);
    transform: translateY(-1px);
}

input[type="text"]::placeholder {
    color: #8e8e93;
    /*    font-weight: 400;*/
}

/* Кнопка в стиле iOS */
button {
    padding: 14px 26px;
    background: linear-gradient(135deg, #787880 0%, #5c5c60 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95em;
    /*    font-weight: 600;*/
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

button:hover {
    background: linear-gradient(135deg, #8e8e93 0%, #6c6c70 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(120, 120, 128, 0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(120, 120, 128, 0.3);
}

/* Блок результата */
.result-outer{
    margin-top: 25px;
}
.result {
    padding: 20px;
    border-radius: 10px;
    border: 1.5px solid #3a3a3c;
    text-align: center;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8e93;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    font-size: 0.95em;
}

.result:not(:empty) {
    color: #ffffff;
}

.copy-btn{
    background:'rgba(120, 120, 128, 0.3)';
    marginTop: 12px;
    float: right;
    padding:'8px 16px';
    fontSize:'0.85em';
    border:'1px solid #787880';
    visibility: hidden;
}

/* Анимация появления результата */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result:not(:empty) {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {
    .container {
        padding: 25px 20px;
        margin: 8px;
        border-radius: 14px;
    }

    body {
        padding: 12px;
        background: #000000;
    }

    .container::before {
        font-size: 1.4em;
        margin-bottom: 22px;
    }

    input[type="text"] {
        padding: 11px 14px;
        font-size: 0.85em;
    }

    button {
        padding: 13px 22px;
        font-size: 0.9em;
    }

    .result {
        padding: 18px;
        margin-top: 22px;
        font-size: 0.9em;
        min-height: 60px;
    }
}

/* Эффект при загрузке страницы */
.container {
    animation: containerSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes containerSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Дополнительные элементы в стиле iOS */
input[type="text"]::-webkit-input-placeholder {
    color: #8e8e93;
    opacity: 1;
}

/* Интеграция с системными настройками тёмной темы */
@media (prefers-color-scheme: dark) {
    body {
        background: #000000;
    }
}

/* Стили для подсказки */
.label-with-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(120, 120, 128, 0.3);
    border: 1px solid #787880;
    color: #ffffff;
    font-size: 10px;
    cursor: help;
    position: relative;
    transition: all 0.3s ease;
}

.tooltip-icon:hover {
    background: rgba(120, 120, 128, 0.5);
}

.tooltip-text {
    visibility: hidden;
    width: 240px; /* Увеличено с 160px до 240px (в 1.5 раза) */
    background: rgba(28, 28, 30, 0.95);
    color: #ffffff;
    text-align: center;
    border-radius: 8px;
    padding: 12px 15px; /* Увеличено с 8px 10px до 12px 15px */
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 1em;
    border: 1px solid #3a3a3c;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(28, 28, 30, 0.95) transparent transparent transparent;
}

.tooltip-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {
    .tooltip-text {
        width: 210px;
        font-size: 1em;
        padding: 10px 12px;
    }

    .tooltip-icon {
        width: 14px;
        height: 14px;
        font-size: 10px;
    }
}