*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e0e0e0;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 460px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-align: center;
}

.card__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 99px;
    margin-bottom: 24px;
}

.card__badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.8); }
}

.card__title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 24px;
}

.card__subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 8px;
    line-height: 1.5;
}

/* ── Fields ──────────────────────────────────────────── */

.field {
    margin-bottom: 18px;
    text-align: left;
}

.field__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
    padding-left: 4px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.field__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field__input-wrap--icon .field__input {
    padding-left: 44px;
}

.field__icon {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    fill: #475569;
    pointer-events: none;
}

.field__input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    color: #e0e7ff;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    outline: none;
    transition: all 0.25s ease;
    caret-color: #10b981;
}

.field__input::placeholder {
    color: #334155;
    font-weight: 400;
}

.field__input:focus {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.field__suffix {
    position: absolute;
    right: 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    pointer-events: none;
}

.field-row {
    display: flex;
    gap: 14px;
}

.field-row .field {
    flex: 1;
}

/* ── Button ──────────────────────────────────────────── */

.card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    letter-spacing: 0.02em;
    margin-top: 8px;
}

.card__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #34d399, #10b981);
}

.card__btn:active {
    transform: translateY(0);
}

.card__btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ── Error ────────────────────────────────────────────── */

.card__error {
    color: #f87171;
    font-size: 0.85rem;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 10px;
    text-align: left;
}

/* ── Spinner ──────────────────────────────────────────── */

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Result ───────────────────────────────────────────── */

.result-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-icon svg {
    width: 40px;
    height: 40px;
    fill: #fff;
}

.result-icon--ok {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}

.result-icon--ko {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.3);
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.card__result-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e0e7ff;
    margin-bottom: 8px;
}

.card__detail {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px 20px;
    margin: 20px 0;
    text-align: left;
}

.card__detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
}

.card__detail-row + .card__detail-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card__detail-label { color: #64748b; }
.card__detail-value {
    color: #cbd5e1;
    font-weight: 600;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
}

/* ── 3DS Challenge ────────────────────────────────────── */

.challenge-iframe {
    width: 100%;
    height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    margin-top: 16px;
    background: #fff;
}

/* ── Footer ───────────────────────────────────────────── */

.card__env {
    margin-top: 20px;
    font-size: 0.7rem;
    color: #475569;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.card__env--test { color: #f59e0b; }

.card__secure {
    margin-top: 12px;
    font-size: 0.75rem;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.card__secure svg {
    width: 14px;
    height: 14px;
    fill: #475569;
}
