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

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', '맑은 고딕', sans-serif;
    background: #f0f4f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Header ─── */
header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

header img {
    height: 52px;
    object-fit: contain;
}

.lang-switch {
    display: flex;
    gap: 8px;
}

.lang-switch button {
    padding: 6px 16px;
    border: 1.5px solid #1a73e8;
    background: transparent;
    color: #1a73e8;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.lang-switch button.active,
.lang-switch button:hover {
    background: #1a73e8;
    color: #fff;
}

/* ─── Main ─── */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    padding: 40px 36px;
    width: 100%;
    max-width: 480px;
}

.card h1 {
    font-size: 22px;
    color: #1a1a2e;
    margin-bottom: 6px;
    text-align: center;
}

.card .subtitle {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #444;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d0d7de;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background: #fafafa;
}

.form-group input:focus {
    border-color: #1a73e8;
    background: #fff;
}

.btn-query {
    width: 100%;
    padding: 13px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}

.btn-query:hover {
    background: #1558c0;
}

.btn-query:disabled {
    background: #a0c0f0;
    cursor: not-allowed;
}

/* ─── Result ─── */
#result {
    margin-top: 28px;
}

.result-box {
    border-radius: 10px;
    padding: 20px;
    font-size: 14px;
}

.result-box.success {
    background: #eaf4ff;
    border: 1.5px solid #90c8f8;
}

.result-box.error {
    background: #fff2f2;
    border: 1.5px solid #f8a0a0;
    color: #c0392b;
    text-align: center;
    padding: 16px;
}

.result-box .badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    margin-left: 6px;
}

.badge.valid   { background: #d4edda; color: #155724; }
.badge.invalid { background: #f8d7da; color: #721c24; }

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.result-table tr td {
    padding: 8px 4px;
    border-bottom: 1px solid #d8eaf8;
    vertical-align: top;
}

.result-table tr:last-child td {
    border-bottom: none;
}

.result-table td:first-child {
    color: #555;
    width: 40%;
    font-weight: 500;
    white-space: nowrap;
}

.result-table td:last-child {
    color: #1a1a2e;
    font-weight: 600;
}

/* ─── Footer ─── */
footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #aaa;
}

/* ─── Responsive ─── */
@media (max-width: 520px) {
    .card {
        padding: 28px 18px;
    }
    header img {
        height: 40px;
    }
    .lang-switch {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .lang-switch button {
        padding: 5px 12px;
        font-size: 12px;
    }
}
