:root {
    --bg: #1e1e24;
    --card: #2b2b33;
    --text: #e9e9f0;
    --accent: #3fa46a;
    --danger: #d64e4e;
    --radius: 12px;
    --transition: .2s;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
}

.wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.card {
    background: var(--card);
    padding: 2rem 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
    width: 420px;
}

/* Заголовок */
h1 {
    margin-top: 0;
    font-weight: 500;
    font-size: 1.4rem;
    text-align: center;
}

/* Общее для всех управляемых контролов */
input[type="text"],
button {
    width: 100%;
    height: 48px;               /* фиксированная высота */
    padding: 0 1rem;            /* по горизонтали 1rem, по вертикали — убираем */
    font-size: 1rem;
    border-radius: var(--radius);
    border: none;
    box-sizing: border-box;     /* чтобы width/height учитывали отступы */
    margin-bottom: 1rem;
    display: block;
    cursor: pointer;
    transition: var(--transition);
}

/* Кнопка дополнительным стилингом */
button {
    background: var(--accent);
    color: var(--text);
    font-weight: 600;
    line-height: 48px;          /* центрируем текст по высоте */
}

button:hover {
    filter: brightness(1.08);
}

/* Скрытый блок */
.hidden {
    display: none;
}

/* Статус */
#status {
    margin-top: 1rem;
    text-align: center;
}

/* Блок результата */
#result-block {
    margin-top: 1.4rem;
}

#result-block label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 500;
}

/* Поле вывода ключа — тот же размер, что и кнопка */
#result-block input {
    background: #444;
    color: #fff;
}

/* Спиннер */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent);
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rot 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: .5rem;
}

@keyframes rot {
    to { transform: rotate(360deg); }
}
