body {
    background: #f0f2f5;
    min-height: 100vh;
}

/* Navbar */

.navbar {
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}

/* Tabs */

.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: .6rem 1.25rem;
    transition: color .15s;
}

.nav-tabs .nav-link:hover {
    color: #0d6efd;
    border-bottom-color: #b8d0ff;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
    background: transparent;
    font-weight: 600;
}

/* Cards */

.card {
    border: 1px solid #e4e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.section-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #8a92a0;
    margin-bottom: .75rem;
}

/* Type selector grid */

.type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 4px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    font-size: .77rem;
    color: #495057;
    line-height: 1.2;
}

.type-btn i {
    font-size: 1.25rem;
}

.type-btn:hover {
    border-color: #86b0ff;
    color: #0d6efd;
    background: #f5f8ff;
}

.type-btn.active {
    border-color: #0d6efd;
    background: #0d6efd;
    color: #fff;
}

/* Preview card */

.preview-card {
    min-height: 440px;
}

.placeholder-icon {
    font-size: 5rem;
    display: block;
}

#qrcode-container img,
#qrcode-container canvas,
#qrcode-container svg {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .12);
}

/* Encoded data preview */

.encoded-data {
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 150px;
    overflow-y: auto;
    font-size: .77rem;
    margin: 0;
}

details summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: '▶  ';
    font-size: .65em;
}

details[open] summary::before {
    content: '▼  ';
}

/* Decode drop zone */

.decode-drop {
    border: 2px dashed #ced4da;
    border-radius: 12px;
    padding: 3.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
    color: #6c757d;
    background: #fafbfc;
}

.decode-drop:hover,
.decode-drop.drag-over {
    border-color: #0d6efd;
    background: #f0f5ff;
    color: #0d6efd;
}

.decode-drop i.bi-cloud-upload {
    display: block;
    font-size: 2.75rem;
}

.decoded-pre {
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 260px;
    overflow-y: auto;
}

/* Footer */

footer {
    background: #1e2124;
    color: #adb5bd;
    padding: 14px 0;
    text-align: center;
    margin-top: 2rem;
}

footer p {
    margin: 0;
    font-size: .82rem;
    line-height: 2;
}

footer a {
    color: #ffc107;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */

@media (max-width: 576px) {
    .type-btn {
        padding: 8px 2px;
        font-size: .7rem;
    }

    .type-btn i {
        font-size: 1.1rem;
    }
}
