.back-bar {
    display: flex;
    padding: 16px 16px 0;
    text-align: left;
}

.back-button {
    display: inline-block;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
    text-decoration: none;
    border: 1px solid #333;
    transition: color 0.1s, border-color 0.1s;
}

.back-button:hover {
    color: #00ff80;
    border-color: #00ff80;
}

.sub-intro {
    margin: 0;
    padding: 0 16px 16px;
    color: #888;
}

.sub-intro strong {
    color: #ccc;
}

.sub-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    text-align: left;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
}

.domain-input,
.username-input,
.url-input {
    display: flex;
    align-items: stretch;
    border: 1px solid #333;
    background: #141414;
    transition: border-color 0.1s;
}

.domain-input:focus-within,
.username-input:focus-within,
.url-input:focus-within {
    border-color: #00ff80;
}

.text-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 16px;
    color: #ccc;
    background: transparent;
    border: 0;
    outline: none;
}

.text-input::placeholder {
    color: #666;
}

.domain-suffix {
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #888;
    border-left: 1px solid #333;
    white-space: nowrap;
}

.prefix {
    display: flex;
    align-items: center;
    padding-left: 16px;
    color: #888;
}

.field-hint {
    margin: 0;
    min-height: 1.2em;
    font-size: 12px;
    color: #888;
}

.field-hint.is-error {
    color: #ff0040;
}

.field-hint.is-ok {
    color: #00ff80;
}

.field-hint.is-warn {
    color: #ffd23f;
}

.tg-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #333;
    background: #141414;
}

.tg-preview[hidden] {
    display: none;
}

.tg-avatar {
    flex: none;
    width: 56px;
    height: 56px;
    box-sizing: border-box;
    object-fit: cover;
    border: 1px solid #333;
    background: #0a0a0a;
}

.tg-avatar[hidden] {
    display: none;
}

.tg-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tg-name {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    word-break: break-word;
}

.tg-handle {
    font-size: 12px;
    color: #888;
}

.sub-warning {
    margin: 0;
    padding: 12px 16px;
    border: 1px solid #333;
    border-left: 4px solid #ff0040;
    background: #141414;
    font-size: 14px;
    color: #ccc;
}

.confirm-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid #ff0040;
    background: #141414;
}

.confirm-box[hidden] {
    display: none;
}

.confirm-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
}

.confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-secondary {
    padding: 12px 24px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
    background: transparent;
    border: 1px solid #333;
    cursor: pointer;
    transition: color 0.1s, border-color 0.1s;
}

.btn-secondary:hover {
    color: #ccc;
    border-color: #ccc;
}

.btn-primary {
    align-self: flex-start;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #111;
    background: #fff;
    border: 1px solid #fff;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s, color 0.1s, opacity 0.1s;
}

.btn-primary:hover:not(:disabled) {
    background: #00ff80;
    border-color: #00ff80;
    color: #111;
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.form-result {
    margin: 0;
    min-height: 1.2em;
    font-size: 14px;
    color: #888;
}

.form-result.is-ok {
    color: #00ff80;
}

.form-result.is-error {
    color: #ff0040;
}

@media (max-width: 768px) {
    .domain-input {
        flex-direction: column;
        align-items: stretch;
    }

    .domain-suffix {
        justify-content: center;
        padding: 8px 16px;
        border-left: 0;
        border-top: 1px solid #333;
    }

    .btn-primary {
        width: 100%;
        align-self: stretch;
    }

    .btn-secondary {
        width: 100%;
    }
}
