/* ── Utility ── */
.hidden { display: none !important; }

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f5f7ff 100%);
    min-height: 100vh;
    color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ── */
.header {
    text-align: center;
    padding: 32px 0 16px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 36px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a56db;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    text-align: left;
}

/* ── Main ── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Search Card ── */
.search-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
}

.search-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.5;
}

.input-group {
    display: flex;
    align-items: center;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
    background: #f9fafb;
}

.input-group:focus-within {
    border-color: #1a56db;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.input-prefix {
    padding: 0 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    color: #9ca3af;
}

.input-group input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', monospace;
    background: transparent;
    letter-spacing: 0.5px;
}

.input-group input::placeholder {
    font-weight: 400;
    color: #c0c4cc;
}

.input-group button {
    padding: 14px 20px;
    background: #1a56db;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.input-group button:hover {
    background: #1648b8;
}

.input-group button:disabled {
    background: #93a3c0;
    cursor: not-allowed;
}

.hint {
    font-size: 12px;
    color: #dc2626;
    margin-top: 8px;
    padding-left: 4px;
}

/* ── Result Cards ── */
#result-section { display: none; }
#result-valid,
#result-invalid,
#result-error { display: none; }

.result-card {
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
}

.result-card.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.result-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* Valid */
.result-valid {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid #86efac;
}

.result-valid h3 { color: #15803d; }

.result-details {
    text-align: left;
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.detail-row:last-child { border-bottom: none; }

.detail-row .label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.detail-row .value {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
}

.compliance-note {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

/* Invalid */
.result-invalid {
    background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
    border: 1px solid #fca5a5;
}

.result-invalid h3 { color: #dc2626; }

.result-msg {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.result-sub {
    font-size: 12px;
    color: #9ca3af;
}

/* Error */
.result-error {
    background: linear-gradient(135deg, #fffbeb 0%, #fef9ee 100%);
    border: 1px solid #fcd34d;
}

.result-error h3 { color: #b45309; }

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 32px 0 16px;
}

.footer p {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.6;
}

.footer-sub {
    margin-top: 4px;
    font-size: 11px;
}

/* ── Responsive ── */
@media (max-width: 400px) {
    .container { padding: 16px 12px; }
    .search-card { padding: 20px 16px; }
    .result-card { padding: 20px 16px; }
    .input-group button { padding: 14px 14px; }
}
