@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&family=Noto+Serif+TC:wght@600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

html {
    scroll-padding-top: 110px;
}

section[id] {
    scroll-margin-top: 110px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading-overlay-card {
    min-width: 280px;
    max-width: 420px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #dbe3ff;
    box-shadow: 0 12px 40px rgba(31, 41, 55, 0.2);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #dbeafe;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: certtrue-spin 0.9s linear infinite;
    flex-shrink: 0;
}

.loading-overlay-message {
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.credential-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 19, 40, 0.58);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.credential-popup-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.credential-popup-card {
    width: min(520px, 92vw);
    border-radius: 14px;
    border: 1px solid rgba(126, 211, 255, 0.55);
    background: linear-gradient(180deg, rgba(6, 35, 66, 0.98), rgba(9, 47, 88, 0.97));
    box-shadow: 0 20px 40px rgba(2, 12, 28, 0.55);
    padding: 22px 20px 18px;
    text-align: center;
    transform: translateY(6px) scale(0.98);
    transition: transform 0.22s ease;
}

.credential-popup-overlay.is-visible .credential-popup-card {
    transform: translateY(0) scale(1);
}

.credential-popup-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 1px solid rgba(132, 226, 255, 0.74);
    background: rgba(11, 74, 122, 0.55);
    color: #b9ecff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.credential-popup-message {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #e7f5ff;
}

.credential-popup-btn {
    margin-top: 16px;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid rgba(150, 228, 255, 0.72);
    background: linear-gradient(180deg, rgba(53, 198, 255, 0.35), rgba(13, 110, 173, 0.5));
    color: #ecfbff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.credential-popup-btn:hover {
    background: linear-gradient(180deg, rgba(68, 207, 255, 0.45), rgba(17, 122, 190, 0.62));
}

@keyframes certtrue-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Navigation Header */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand a {
    display: inline-flex;
    align-items: center;
}

.navbar-logo {
    display: block;
    height: 58px;
    width: auto;
    max-width: min(520px, 50vw);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 10px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    opacity: 1;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.nav-links a.is-active {
    color: #08213d;
    border-color: rgba(245, 189, 34, 0.72);
    background: linear-gradient(180deg, #ffd96a, #f5bd22);
    box-shadow: 0 8px 18px rgba(19, 36, 67, 0.22);
}

.lang-switch {
    position: relative;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.42);
    color: #ffffff;
    border-radius: 6px;
    padding: 7px 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.24);
}

.lang-btn-globe {
    font-size: 14px;
    line-height: 1;
}

.lang-btn-caret {
    font-size: 10px;
    line-height: 1;
}

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #ffffff;
    border: 1px solid #d4def2;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
    min-width: 140px;
    overflow: hidden;
    display: none;
    z-index: 120;
}

.lang-menu.open {
    display: block;
}

.lang-item {
    width: 100%;
    text-align: left;
    border: 0;
    background: #ffffff;
    color: #1f2937;
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
}

.lang-item:hover {
    background: #f3f6fb;
}

.lang-item.active {
    background: #e8efff;
    color: #3047b6;
    font-weight: 700;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero-content h2 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.95;
}

.hero-actions {
    margin-top: 24px;
}

.hero-cta-btn {
    background: #ffffff;
    color: #4f46e5;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
}

.hero-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.home-intro-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    text-align: left;
}

.home-intro-card {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    padding: 14px;
}

.home-intro-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
    font-weight: 700;
}

.home-intro-card p {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.95;
}

/* Verify Section */
.verify-section {
    padding: 60px 20px;
    background-color: white;
}

.verify-section-hidden {
    display: none;
}

.verify-layout {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.verify-layout .verify-box {
    flex: 1;
    margin: 0;
    max-width: none;
}

.history-panel {
    width: 200px;
    flex: 0 0 200px;
    background: #ffffff;
    border: 1px solid #dbe2ef;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
}

.history-panel h4 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #344256;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 8px;
}

.history-header h4 {
    margin: 0;
}

.history-action-btn {
    border: 1px solid #c9d7ee;
    background: #f7fbff;
    color: #334155;
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.history-action-btn:hover {
    border-color: #93b9f2;
    background: #eaf3ff;
}

.history-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.history-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.history-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.history-empty {
    color: #6b7280;
    font-size: 12px;
    margin: 0;
}

.history-item {
    width: 100%;
    border: 1px solid #d4def0;
    border-radius: 8px;
    background: #f8fbff;
    color: #1f2937;
    text-align: center;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.history-item:hover {
    border-color: #93b9f2;
    background: #eef5ff;
}

.history-item-add {
    justify-content: center;
}

.history-add-mark {
    width: 68px;
    height: 96px;
    border-radius: 6px;
    border: 1px dashed #96b4da;
    background: #f2f7ff;
    color: #315a8f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
    font-weight: 500;
}

.history-thumbnail {
    width: 68px;
    height: 96px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #d5e2f4;
    background: #ffffff;
    flex-shrink: 0;
}

.history-thumbnail-fallback {
    width: 68px;
    height: 96px;
    border-radius: 4px;
    border: 1px solid #d5e2f4;
    background: #eef3fa;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-time {
    color: #6b7280;
    font-size: 10px;
    line-height: 1.2;
}

.history-recall-notice {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #93c5fd;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
    line-height: 1.4;
}

@media (min-width: 1500px) {
    .verify-layout {
        display: block;
    }

    .verify-layout .verify-box {
        width: 100%;
    }

    .history-panel {
        position: absolute;
        right: calc(100% + 18px);
        top: 0;
        width: 190px;
        flex: 0 0 auto;
    }
}

.verify-box {
    max-width: 920px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.verify-box.result-mode {
    max-width: 1200px;
}

.verify-box.result-mode #uploadArea,
.verify-box.result-mode #fileInfo {
    display: none !important;
}

.verify-box h3 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #667eea;
}

.verify-box > p {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.verify-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 0 0 20px;
}

.verify-step-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #f8fafc;
    padding: 12px;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.verify-step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d1d5db;
    color: #1f2937;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.verify-step-content h4 {
    font-size: 14px;
    line-height: 1.2;
    color: #1f2937;
    margin: 0 0 5px;
}

.verify-step-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #52525b;
}

.verify-step-card.active {
    background: rgba(245, 189, 34, 0.12);
    border-color: #f5bd22;
    box-shadow: 0 0 0 2px rgba(245, 189, 34, 0.28);
}

.verify-step-card.active .verify-step-number {
    background: #f5bd22;
    color: #2f2100;
}

.verify-step-card.active .verify-step-number {
    background: #667eea;
    color: #fff;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #f8f9ff;
}

.upload-area:hover {
    background-color: #f0f2ff;
    border-color: #764ba2;
}

.upload-area.dragover {
    background-color: #e8ebff;
    border-color: #764ba2;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.upload-area h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.upload-area p {
    color: #999;
    margin: 15px 0;
}

.upload-disclaimer {
    margin: 14px 0 0;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(120, 220, 255, 0.35);
    background:
        radial-gradient(circle at 10% 10%, rgba(67, 191, 255, 0.16), transparent 50%),
        linear-gradient(180deg, rgba(7, 45, 84, 0.55), rgba(5, 34, 67, 0.62));
    box-shadow: 0 10px 22px rgba(3, 24, 52, 0.3);
    position: relative;
}

.upload-disclaimer::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #7de9ff 0%, #2cb5e8 100%);
}

.upload-disclaimer-label {
    margin: 0 0 6px;
    padding-left: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9fe8ff;
}

.upload-disclaimer-text {
    margin: 0;
    padding-left: 12px;
    font-size: 13px;
    line-height: 1.65;
    color: #d8ecff;
}

.browse-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* File Info Display */
.file-info {
    background: #f0f7ff;
    border: 1px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.file-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #333;
}

.file-info p strong {
    color: #667eea;
}

.verify-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    margin-top: 15px;
    transition: transform 0.2s;
}

.verify-btn:hover {
    transform: translateY(-2px);
}

.clear-btn {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.clear-btn:hover {
    background: #d0d0d0;
}

.back-upload-btn {
    background: #ffffff;
    color: #333;
    border: 1px solid #ccc;
    padding: 14px 22px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
}

.back-upload-btn:hover {
    background: #f2f2f2;
}

.result-actions {
    display: flex;
    justify-content: flex-end;
    margin: 14px 0 0;
}

/* Results Section */
.results {
    background: #f0f7ff;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 30px;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
}

.results.success {
    background: #f0fdf4;
    border-color: #22c55e;
}

.results.error {
    background: #fef2f2;
    border-color: #ef4444;
}

.results-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
}

.results-badges {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #d9e4f2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.result-badge-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.result-badge-img {
    height: 56px;
    width: auto;
    object-fit: contain;
    cursor: zoom-in;
    filter: drop-shadow(0 1px 3px rgba(15, 41, 71, 0.18));
}

.result-badge-preview {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    bottom: auto;
    width: min(190px, 36vw);
    background: #ffffff;
    border: 1px solid #c7d9ef;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 14px 30px rgba(10, 38, 66, 0.25);
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 20;
}

.result-badge-preview-img {
    display: block;
    width: 100%;
    height: auto;
}

.result-badge-item:hover .result-badge-preview,
.result-badge-item:focus-within .result-badge-preview {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.preview-section {
    display: flex;
    flex-direction: column;
}

.preview-section h4 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.pdf-canvas-container {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 600px;
    max-height: 700px;
    overflow-x: auto;
    overflow-y: auto;
}

.pdf-preview-placeholder {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    border: 1px dashed rgba(255, 150, 150, 0.4);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(41, 16, 26, 0.68), rgba(30, 16, 34, 0.72));
    text-align: center;
}

.pdf-preview-placeholder-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 96, 96, 0.2);
    border: 1px solid rgba(255, 126, 126, 0.55);
    color: #ffd3d3;
    font-weight: 800;
}

.pdf-preview-placeholder-text {
    color: #ffd7d7;
    font-size: 14px;
    line-height: 1.5;
    max-width: 280px;
}

#pdfPage {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-page-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 14px;
}

.pdf-page-wrapper:last-child {
    margin-bottom: 0;
}

.pdf-page-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-click-overlay {
    position: absolute;
    background: rgba(102, 126, 234, 0.06);
    border: 1px solid rgba(102, 126, 234, 0.35);
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.pdf-click-overlay:hover {
    background: rgba(102, 126, 234, 0.24);
    border-color: rgba(102, 126, 234, 0.5);
}

.pdf-click-overlay-indicator {
    position: absolute;
    left: -8px;
    top: -8px;
    width: 14px;
    height: 14px;
    padding: 2px;
    background: linear-gradient(90deg, #042a56 0%, #083766 50%, #073259 100%);
    border: 1px solid rgba(102, 126, 234, 0.45);
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(18, 29, 64, 0.12);
    z-index: 1;
    object-fit: contain;
    opacity: 0.38;
    transform: scale(1);
    transform-origin: bottom right;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    pointer-events: none;
    user-select: none;
}

.pdf-click-overlay-indicator-trusted {
    background: linear-gradient(90deg, #042a56 0%, #083766 50%, #073259 100%);
    border-color: rgba(102, 126, 234, 0.45);
}

.pdf-click-overlay-indicator-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(148, 163, 184, 0.78);
    color: #475569;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    text-transform: lowercase;
}

.pdf-click-overlay:hover .pdf-click-overlay-indicator,
.pdf-click-overlay:focus-visible .pdf-click-overlay-indicator {
    transform: scale(1.35);
    box-shadow: 0 2px 8px rgba(18, 29, 64, 0.22);
    opacity: 0.58;
}

.pdf-click-overlay:hover .pdf-click-overlay-indicator-trusted,
.pdf-click-overlay:focus-visible .pdf-click-overlay-indicator-trusted {
    background: linear-gradient(90deg, rgba(4, 42, 86, 0.75) 0%, rgba(8, 55, 102, 0.75) 50%, rgba(7, 50, 89, 0.75) 100%);
}

.pdf-click-overlay:hover .pdf-click-overlay-indicator-info,
.pdf-click-overlay:focus-visible .pdf-click-overlay-indicator-info {
    background: rgba(255, 255, 255, 0.98);
    color: #334155;
}

.gleif-link-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 10px 4px 7px;
    border-radius: 999px;
    border: 1px solid #7fb3e7;
    background: #e9f3ff;
    color: #0a4485;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    box-shadow: 0 1px 4px rgba(10, 68, 133, 0.14);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gleif-link-icon {
    width: 15px;
    height: 15px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0a4485;
    color: #ffffff;
    font-size: 10px;
    line-height: 1;
    flex-shrink: 0;
}

.gleif-link-text {
    white-space: nowrap;
}

.gleif-link-hint:hover {
    transform: translateY(-1px);
    background: #dcecff;
    border-color: #5c97d3;
    box-shadow: 0 3px 8px rgba(10, 68, 133, 0.2);
}

.value-with-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.value-main-text {
    display: inline;
}

.value-with-flag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.issuer-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    /* box-shadow: 0 0 0 1px rgba(180, 225, 247, 0.35); */
}

.pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.nav-btn {
    background: white;
    border: 1px solid #667eea;
    color: #667eea;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #667eea;
    color: white;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 13px;
    color: #666;
    min-width: 60px;
    text-align: center;
}

.info-section {
    display: flex;
    flex-direction: column;
}

.info-section h4 {
    font-size: 19px;
    color: #333;
    margin-bottom: 2px;
    font-weight: 600;
}

.info-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 0;
    padding: 10px 0 12px;
    border-bottom: none;
}

.info-heading-badge {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    border-radius: 6px;
    border: none;
    box-shadow: 0 8px 20px rgba(37, 24, 1, 0.38);
}

.info-heading-fallback {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 4px 0 12px;
    border-bottom: 1px solid rgba(121, 206, 255, 0.28);
}

.info-heading-main {
    display: inline-flex;
    align-items: start;
    gap: 12px;
}

.info-heading-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.info-heading-text h4 {
    line-height: 1.2;
}

.info-heading-text p {
    margin: 0;
    color: #58708a;
    font-size: 12px;
    line-height: 1.4;
}

.info-heading-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid #98e3b0;
    background: #effcf3;
    color: #166534;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.info-heading-attention .info-heading-icon {
    background: #dc2626;
}

.info-heading-attention .info-heading-chip {
    border-color: rgba(255, 160, 160, 0.38);
    background: rgba(255, 234, 236, 0.1);
    color: #ffd3d8;
}

.info-heading-attention .info-heading-text p {
    color: #ffb4bc;
}

.info-content {
    font-size: 14px;
    line-height: 1.8;
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #ddd;
    min-height: 600px;
    overflow-y: auto;
}

.info-content-body {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.failure-hero {
    margin-bottom: 16px;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 129, 129, 0.34);
    background: linear-gradient(180deg, rgba(42, 15, 28, 0.9) 0%, rgba(27, 14, 32, 0.84) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 214, 214, 0.04);
}

.failure-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 226, 230, 0.12);
    color: #ffb2ba;
    border: 1px solid rgba(255, 162, 171, 0.42);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.failure-title {
    margin: 0 0 8px;
    color: #ffe0a3;
    font-size: 20px;
    line-height: 1.3;
}

.failure-message {
    margin: 0;
    color: #e8eef6;
    line-height: 1.7;
}

.failure-guidance {
    margin: 10px 0 0;
    color: #b6c8da;
    line-height: 1.7;
}

.failure-reason {
    margin-top: 12px;
    padding: 10px 12px;
    border-left: 3px solid rgba(255, 115, 115, 0.9);
    background: rgba(255, 255, 255, 0.05);
    color: #ffd1d1;
    font-size: 13px;
}

.failure-next-steps {
    margin-bottom: 16px;
    border: 1px solid rgba(127, 191, 241, 0.2);
    border-radius: 10px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(8, 39, 71, 0.76), rgba(6, 31, 58, 0.8));
    box-shadow: inset 0 0 0 1px rgba(133, 211, 255, 0.05);
}

.failure-next-steps-title {
    font-weight: 700;
    color: #ecf9ff;
    margin-bottom: 8px;
}

.failure-next-step {
    color: #c7d9ea;
    line-height: 1.6;
    margin-bottom: 6px;
    padding-left: 14px;
    position: relative;
}

.failure-next-step:last-child {
    margin-bottom: 0;
}

.failure-next-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff7c7c;
}

.failure-summary-section {
    margin-top: 18px;
    border-top: 1px solid rgba(255, 170, 170, 0.24);
    padding-top: 15px;
}

.credential-summary-tabs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.credential-summary-panels {
    flex-direction: column;
.credential-summary-page-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    padding: 0 8px;
}

.credential-summary-page-info-secondary {
    display: block;
    font-size: 11px;
    line-height: 1.25;
    color: #51667d;
    font-weight: 600;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.credential-summary-controls .credential-summary-nav-btn {
    min-width: 132px;
}

.credential-summary-controls .credential-summary-nav-btn:disabled {
    opacity: 0.45;
}
    gap: 12px;
}

.credential-summary-panel {
    display: block;
}

.credential-summary-panel[hidden] {
    display: none !important;
}

.credential-summary-tabbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #d5e0ec;
}

.credential-summary-tab {
    appearance: none;
    border: 1px solid #c7d5e8;
    background: linear-gradient(180deg, #ffffff, #eef4fb);
    color: #30445f;
    border-radius: 999px;
    padding: 9px 14px 10px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 170px;
    text-align: left;
}

.credential-summary-tab:hover {
    border-color: #92b3dd;
    background: linear-gradient(180deg, #ffffff, #e5effa);
    transform: translateY(-1px);
}

.credential-summary-tab.is-active {
    border-color: #2563eb;
    background: linear-gradient(180deg, #1d4ed8, #2563eb);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.credential-summary-tab-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.credential-summary-tab.is-active .credential-summary-tab-kicker {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.credential-summary-tab-title {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.credential-summary-tab:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.credential-summary-empty {
    padding: 8px 0;
}

.failure-summary-title {
    font-weight: 700;
    color: #7f1d1d;
    margin-bottom: 10px;
}

.failure-debug-section {
    margin-top: 18px;
    border-top: 1px solid #ffcccc;
    padding-top: 15px;
}

.info-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid #d6d6d6;
    border-radius: 6px;
    background: #f7f7f7;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 18px;
    font-weight: 600;
    color: #2f2f2f;
    min-width: 0;
    text-align: left;
}

.info-label-text {
    display: inline;
}

.info-value {
    color: #333;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    word-break: break-word;
}

#resultContent {
    font-size: 15px;
    line-height: 1.8;
}

/* About Section */
.about-section {
    padding: 80px 20px;
    background: linear-gradient(to bottom, #f8f9fa, white);
}

.about-section h3 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.about-section > p {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    text-align: center;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-box h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.feature-box p {
    color: #666;
    font-size: 14px;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 20px;
    background: white;
}

.how-it-works h3 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 50px;
    text-align: center;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 28px;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 20px;
}

.step h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.step p {
    color: #666;
    font-size: 14px;
}

/* FAQ Section */
.faq-section {
    padding: 80px 20px;
    background: linear-gradient(to bottom, white, #f8f9fa);
}

.faq-section h3 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 40px;
    text-align: center;
}

.faq-items {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.faq-item h4 {
    padding: 20px;
    cursor: pointer;
    background: #f8f9fa;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    font-size: 15px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item h4:hover {
    background: #f0f2ff;
    color: #667eea;
}

.faq-item h4::after {
    content: "▼";
    font-size: 12px;
}

.faq-item p {
    padding: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .verify-box.result-mode {
        max-width: 100%;
        padding: 28px;
    }

    .results {
        padding: 22px;
    }

    .pdf-canvas-container,
    .info-content {
        min-height: 520px;
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 150px;
    }

    section[id] {
        scroll-margin-top: 150px;
    }

    .navbar {
        padding: 14px 0;
    }

    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        width: 100%;
        max-width: 640px;
    }

    .hero {
        padding: 58px 16px;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-cta-btn {
        width: 100%;
        max-width: 320px;
    }

    .home-intro-grid {
        grid-template-columns: 1fr;
    }

    .verify-section {
        padding: 40px 12px;
    }

    .verify-box {
        padding: 20px;
        width: 100%;
    }

    .verify-box h3 {
        font-size: 24px;
    }

    .footer .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .upload-disclaimer {
        margin-top: 12px;
        padding: 12px 12px;
    }

    .upload-disclaimer-label {
        font-size: 10px;
        letter-spacing: 0.1em;
    }

    .upload-disclaimer-text {
        font-size: 12px;
        line-height: 1.6;
    }

    .verify-steps {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .upload-icon {
        font-size: 36px;
    }

    .results-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .results {
        padding: 16px;
    }

    .results-badges {
        justify-content: center;
    }

    .result-badge-img {
        height: 44px;
    }

    .pdf-controls {
        flex-wrap: wrap;
        gap: 10px;
    }

    .pdf-canvas-container {
        min-height: 300px;
        max-height: 400px;
    }

    .info-content {
        min-height: auto;
        max-height: none;
        padding: 14px;
    }

    .info-heading {
        flex-direction: column;
        gap: 8px;
    }

    .result-actions {
        justify-content: stretch;
    }

    .result-actions .back-upload-btn,
    .file-info .verify-btn,
    .file-info .clear-btn {
        width: 100%;
        margin-right: 0;
    }

    .file-info .clear-btn {
        margin-top: 10px;
    }
}

@media (hover: none) {
    .result-badge-preview {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    .navbar-logo {
        height: 44px;
        max-width: min(300px, 72vw);
    }

    .nav-links {
        gap: 10px;
        font-size: 13px;
    }

    .navbar .container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .lang-switch {
        margin-left: auto;
    }

    .lang-btn {
        padding: 6px 10px;
    }

    .hero-content h2 {
        font-size: 24px;
    }

    .home-intro-card {
        padding: 12px;
    }

    .verify-box {
        padding: 16px;
    }

    .upload-area {
        padding: 24px 12px;
    }

    .upload-area h4 {
        font-size: 16px;
    }

    .browse-btn,
    .verify-btn,
    .clear-btn,
    .back-upload-btn {
        padding: 11px 14px;
        font-size: 14px;
    }

    .results {
        padding: 12px;
    }

    .about-section,
    .how-it-works,
    .faq-section {
        padding: 56px 14px;
    }
}

/* =============================
   Theme Override: GTiDF-Inspired
   ============================= */

:root {
    --brand-navy: #052d5d;
    --brand-navy-2: #0a4485;
    --brand-cyan: #68d6ff;
    --brand-ink: #0f2f52;
    --surface: #f3f6fb;
    --surface-card: #ffffff;
    --text-main: #18324d;
    --text-soft: #4f6278;
    --line: #d9e4f2;
}

body {
    font-family: 'Noto Sans TC', 'Segoe UI', sans-serif;
    background: var(--surface);
    color: var(--text-main);
}

h2,
h3 {
    font-family: 'Noto Serif TC', Georgia, serif;
    letter-spacing: 0.02em;
}

.navbar {
    background: linear-gradient(90deg, #042a56 0%, #083766 50%, #073259 100%);
    border-bottom: 1px solid rgba(121, 185, 255, 0.25);
    box-shadow: 0 10px 28px rgba(0, 24, 56, 0.3);
    padding: 12px 0;
}

.navbar-logo {
    height: 48px;
}

.nav-links {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(132, 190, 243, 0.18);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.nav-links a {
    font-size: 13px;
    color: rgba(214, 235, 255, 0.82);
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    letter-spacing: 0.02em;
    line-height: 1;
}

.nav-links a:hover {
    opacity: 1;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(162, 211, 255, 0.16);
    transform: none;
}

.nav-links a.is-active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
    border-color: rgba(104, 214, 255, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(8, 29, 54, 0.18);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 42px 20px 70px;
    background:
        radial-gradient(circle at 15% 20%, rgba(72, 182, 255, 0.22) 0 2px, transparent 3px) 0 0/210px 210px,
        radial-gradient(circle at 78% 35%, rgba(127, 216, 255, 0.3) 0 2px, transparent 3px) 0 0/280px 280px,
        linear-gradient(180deg, #041b35 0%, #072a4f 56%, #07284b 100%);
}

.hero::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -250px;
    width: min(1240px, 120vw);
    height: 560px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(93, 201, 255, 0.85) 0%, rgba(43, 132, 201, 0.45) 34%, rgba(6, 24, 46, 0) 64%);
    filter: blur(2px);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: auto 0 22% 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(133, 220, 255, 0.95), transparent);
    box-shadow: 0 0 30px rgba(117, 214, 255, 0.8);
    pointer-events: none;
}

.hero-stage {
    border: 1px solid rgba(117, 199, 255, 0.24);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(3, 17, 36, 0.7), rgba(3, 17, 36, 0.45));
    box-shadow: inset 0 0 32px rgba(93, 207, 255, 0.08);
    position: relative;
    z-index: 1;
    max-width: 1250px;
}

.hero-content {
    max-width: 930px;
    margin: 0 auto;
    padding: 94px 20px 108px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(129, 222, 255, 0.7);
    border-radius: 999px;
    font-size: 13px;
    color: #8eddff;
    padding: 7px 18px;
    margin-bottom: 22px;
    background: rgba(20, 84, 127, 0.3);
}

.hero-content h2 {
    font-size: clamp(2.2rem, 4.6vw, 3.75rem);
    line-height: 1.18;
    margin-bottom: 18px;
    color: #ffffff;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hero-content p {
    max-width: 900px;
    margin: 0 auto;
    font-size: clamp(1rem, 1.7vw, 1.18rem);
    color: #d6ebff;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 34px;
}

.hero-cta-btn,
.hero-outline-btn {
    border-radius: 0;
    min-width: 168px;
    padding: 12px 26px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid #9bdfff;
    transition: all 0.25s ease;
}

.hero-cta-btn {
    background: #83d9ff;
    color: #063361;
    box-shadow: none;
}

.hero-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(84, 191, 255, 0.38);
    background: #a2e5ff;
}

.hero-outline-btn {
    background: transparent;
    color: #d8f1ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-outline-btn:hover {
    background: rgba(120, 212, 255, 0.14);
    color: #ffffff;
}

.home-intro-grid {
    margin-top: 28px;
    gap: 16px;
}

.home-intro-card {
    border-radius: 0;
    background: rgba(11, 43, 78, 0.68);
    border: 1px solid rgba(132, 208, 255, 0.34);
}

.home-intro-card h3 {
    color: #a9e5ff;
    margin-bottom: 8px;
}

.home-intro-card p {
    color: #d5eaff;
}

.verify-section {
    background:
        radial-gradient(circle at 14% 6%, rgba(54, 182, 255, 0.12), transparent 38%),
        radial-gradient(circle at 85% 10%, rgba(82, 229, 255, 0.09), transparent 36%),
        linear-gradient(180deg, #041a33 0%, #07274b 52%, #0a335f 100%);
}

.about-section,
.how-it-works,
.faq-section {
    background: var(--surface);
}

.verify-box,
.feature-box,
.step,
.faq-item {
    border-radius: 0;
    border: 1px solid var(--line);
    box-shadow: 0 18px 36px rgba(5, 33, 66, 0.08);
}

.history-panel {
    background: linear-gradient(180deg, rgba(8, 34, 63, 0.92), rgba(7, 33, 60, 0.9));
    border-color: rgba(112, 199, 255, 0.34);
    box-shadow: inset 0 0 0 1px rgba(122, 228, 255, 0.14), 0 14px 28px rgba(2, 13, 27, 0.35);
}

.history-panel h4 {
    color: #cfeaff;
}

.history-action-btn {
    border-color: rgba(120, 196, 245, 0.4);
    background: rgba(7, 47, 82, 0.78);
    color: #d5edff;
}

.history-action-btn:hover {
    border-color: rgba(144, 218, 255, 0.72);
    background: rgba(10, 65, 109, 0.88);
}

.history-footer {
    border-top-color: rgba(118, 187, 233, 0.26);
}

.history-empty {
    color: #9fc8e4;
}

.history-item {
    border-color: rgba(109, 193, 247, 0.35);
    background: rgba(9, 46, 82, 0.72);
    color: #e6f4ff;
}

.history-item:hover {
    border-color: rgba(139, 219, 255, 0.68);
    background: rgba(12, 58, 101, 0.84);
}

.history-add-mark {
    border-color: rgba(124, 206, 255, 0.45);
    background: rgba(8, 51, 90, 0.72);
    color: #9bd4ff;
}

.history-thumbnail,
.history-thumbnail-fallback {
    border-color: rgba(127, 203, 250, 0.4);
    background: rgba(5, 39, 70, 0.84);
}

.history-thumbnail-fallback {
    color: #a8d9ff;
}

.history-status.success {
    color: #86efac;
}

.history-status.failed {
    color: #fca5a5;
}

.history-time {
    color: #9fc8e4;
}

.history-recall-notice {
    border-color: rgba(125, 223, 255, 0.5);
    background: rgba(13, 67, 110, 0.46);
    color: #d4f0ff;
}

.verify-box {
    position: relative;
    overflow: visible;
    border: 1px solid rgba(89, 210, 255, 0.45);
    background:
        linear-gradient(180deg, rgba(6, 31, 59, 0.94), rgba(7, 36, 68, 0.95)),
        radial-gradient(circle at 20% -10%, rgba(83, 219, 255, 0.15), transparent 44%);
    box-shadow:
        0 24px 44px rgba(2, 14, 30, 0.55),
        inset 0 0 0 1px rgba(122, 228, 255, 0.16),
        inset 0 0 24px rgba(79, 207, 255, 0.08);
    /* padding-bottom: 100px; */
}

.verify-box::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    top: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(125, 230, 255, 0.8), transparent);
    pointer-events: none;
}

.verify-box h3,
.about-section h3,
.how-it-works h3,
.faq-section h3 {
    color: var(--brand-ink);
}

.verify-box h3 {
    color: #effbff;
    text-shadow: 0 0 16px rgba(96, 216, 255, 0.24);
}

.verify-box > p,
.about-section > p,
.step p,
.feature-box p,
.faq-item p {
    color: var(--text-soft);
}

.verify-box > p {
    color: #bfe4ff;
}

.verify-box > h3,
.verify-box > p {
    max-width: calc(100% - 140px);
}

.verify-steps {
    gap: 12px;
}

.verify-step-card {
    border-color: rgba(108, 188, 242, 0.28);
    background: rgba(10, 43, 78, 0.62);
    box-shadow: inset 0 0 0 1px rgba(140, 220, 255, 0.1);
}

.verify-step-card.active {
    border-color: #f5bd22;
    background: rgba(245, 189, 34, 0.16);
    box-shadow:
        0 0 18px rgba(245, 189, 34, 0.28),
        inset 0 0 0 1px rgba(245, 189, 34, 0.42);
}

.verify-step-number {
    background: rgba(167, 224, 255, 0.24);
    color: #dff7ff;
}

.verify-step-card.active .verify-step-number {
    background: #f5bd22;
    color: #2f2100;
}

.verify-step-content h4 {
    color: #e3edf7;
}

.verify-step-content p {
    color: #d6e5f3;
}

.verify-step-card.active .verify-step-content h4 {
    color: #f9d983;
}

.verify-step-card.active .verify-step-content p {
    color: white;
}

.section-eyebrow {
    text-align: left;
    font-size: 14px;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: #1c5a96;
    font-weight: 700;
    margin-bottom: 8px;
}

.about-section h3,
.how-it-works h3,
.faq-section h3 {
    text-align: left;
    margin-bottom: 22px;
}

.about-section > p {
    text-align: left;
    margin: 0 0 40px;
    max-width: 100%;
}

.step-number {
    background: linear-gradient(145deg, var(--brand-navy-2), var(--brand-navy));
}

.results,
.results.success,
.results.error {
    background: linear-gradient(180deg, rgba(8, 40, 73, 0.88), rgba(8, 44, 80, 0.84));
    border-color: rgba(109, 199, 255, 0.48);
}

.results.success {
    border-color: rgba(109, 199, 255, 0.48);
}

.results.error {
    border-color: rgba(248, 113, 113, 0.72);
}

.upload-area {
    border-radius: 0;
    border: 2px dashed rgba(118, 216, 255, 0.6);
    background:
        linear-gradient(180deg, rgba(8, 43, 78, 0.72), rgba(6, 33, 61, 0.86)),
        radial-gradient(circle at 30% 16%, rgba(90, 227, 255, 0.12), transparent 34%);
}

.upload-area:hover,
.upload-area.dragover {
    background:
        linear-gradient(180deg, rgba(9, 52, 92, 0.78), rgba(8, 38, 71, 0.9)),
        radial-gradient(circle at 30% 16%, rgba(103, 239, 255, 0.2), transparent 38%);
    border-color: rgba(129, 244, 255, 0.9);
    box-shadow: inset 0 0 20px rgba(98, 236, 255, 0.2), 0 0 20px rgba(92, 224, 255, 0.18);
}

.upload-icon {
    font-size: 54px;
    color: #99eaff;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 8px rgba(111, 238, 255, 0.24));
}

.upload-area h4 {
    color: #e8f8ff;
}

.upload-area p {
    color: #a8cbe2;
}

.browse-btn,
.verify-btn {
    border-radius: 0;
    border: 1px solid rgba(123, 236, 255, 0.75);
    background: linear-gradient(120deg, #0d4f80, #0a6b99);
    color: #ecfcff;
    box-shadow: 0 8px 18px rgba(4, 22, 44, 0.45);
}

.browse-btn:hover,
.verify-btn:hover {
    background: linear-gradient(120deg, #0f5c92, #0d77ab);
}

.clear-btn,
.back-upload-btn,
.nav-btn {
    border-radius: 0;
}

.file-info {
    background: rgba(9, 44, 80, 0.7);
    border-color: rgba(114, 213, 255, 0.55);
}

.file-info p {
    color: #d7eeff;
}

.file-info p strong {
    color: #86deff;
}

.clear-btn,
.back-upload-btn {
    background: rgba(12, 57, 98, 0.85);
    border-color: rgba(126, 221, 255, 0.52);
    color: #daf2ff;
}

.clear-btn:hover,
.back-upload-btn:hover {
    background: rgba(18, 73, 122, 0.9);
}

.nav-btn {
    background: rgba(9, 47, 84, 0.92);
    border-color: rgba(112, 205, 255, 0.62);
    color: #d7f1ff;
}

.nav-btn:hover {
    background: rgba(16, 84, 135, 0.95);
    color: #ffffff;
}

.preview-section h4,
.info-section h4,
.page-info {
    color: #f5bd22;
}

.pdf-canvas-container {
    border-color: rgba(111, 201, 255, 0.38);
    background: rgba(7, 30, 56, 0.64);
}

.info-heading {
    border-bottom-color: rgba(121, 206, 255, 0.28);
}

.info-heading-text p {
    color: #9fc8e4;
}

.info-content {
    background: rgba(6, 31, 58, 0.76);
    border-color: rgba(118, 206, 255, 0.28);
    color: #def2ff;
}

.info-row {
    border-color: rgba(119, 197, 240, 0.25);
    background: linear-gradient(180deg, rgba(8, 43, 78, 0.78), rgba(9, 40, 71, 0.84));
    border-width: 1px;
    border-radius: 7px;
    padding: 10px 12px;
    box-shadow: inset 0 0 0 1px rgba(117, 205, 255, 0.09);
}

.info-label {
    color: #f5bd22;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.info-value {
    color: #ecf9ff;
    font-weight: 600;
}

.gleif-link-hint {
    background: rgba(85, 200, 255, 0.18);
    border-color: rgba(113, 221, 255, 0.5);
    color: #d1f4ff;
    box-shadow: none;
}

.gleif-link-icon {
    background: #d1f4ff;
    color: #063962;
}

.gleif-link-hint:hover {
    background: rgba(86, 211, 255, 0.3);
    border-color: rgba(125, 236, 255, 0.78);
}

.verify-badges-global {
    position: absolute;
    right: 40px;
    top: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 80;
}

.result-badge-img {
    height: 72px;
    filter: drop-shadow(0 4px 10px rgba(3, 14, 27, 0.55));
}

.result-badge-img-shield {
    height: 78px;
}

.result-badge-img-2 {
    height: 92px;
}

.result-badge-preview {
    z-index: 120;
}

.footer {
    margin-top: 0;
    background: linear-gradient(90deg, #07284d, #09335e);
    border-top: 1px solid rgba(120, 200, 255, 0.28);
}

.footer-links a {
    color: #b8ddff;
}

@media (max-width: 900px) {
    .verify-layout {
        flex-direction: column;
    }

    .history-panel {
        position: static;
        width: 100%;
        flex: 1 1 auto;
        top: auto;
    }

    .history-list {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
    }

    .history-item {
        flex: 0 0 auto;
        width: 88px;
    }

    .hero-content {
        padding: 72px 16px 86px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta-btn,
    .hero-outline-btn {
        width: 100%;
        max-width: 340px;
    }

    .section-eyebrow,
    .about-section h3,
    .how-it-works h3,
    .faq-section h3,
    .about-section > p {
        text-align: center;
    }

    .verify-badges-global {
        position: absolute;
        right: 14px;
        top: 10px;
        justify-content: flex-end;
        margin-top: 0;
        z-index: 95;
    }

    .verify-box > h3,
    .verify-box > p {
        max-width: 100%;
    }

    .verify-box {
        padding-top: 118px;
        padding-bottom: 34px;
    }

    .verify-box.result-mode {
        padding: 118px 18px 18px;
    }

    .verify-box.result-mode .results {
        margin-top: 12px;
        padding: 14px;
    }

    .verify-box.result-mode .results-container {
        gap: 14px;
    }

    .verify-box.result-mode .preview-section h4,
    .verify-box.result-mode .info-section h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .verify-box.result-mode .pdf-canvas-container {
        min-height: 260px;
        max-height: 58vh;
        padding: 8px;
    }

    .verify-box.result-mode .pdf-controls {
        gap: 8px;
    }

    .verify-box.result-mode .nav-btn {
        min-height: 38px;
        padding: 8px 12px;
    }

    .verify-box.result-mode .page-info {
        min-width: auto;
        font-size: 12px;
    }

    .verify-box.result-mode .info-content {
        padding: 12px;
    }

    .verify-box.result-mode .info-row {
        padding: 9px 10px;
        margin-bottom: 8px;
    }

    .verify-box.result-mode .info-label {
        font-size: 15px;
    }

    .verify-box.result-mode .info-value {
        font-size: 13px;
        line-height: 1.5;
    }

    .verify-box.result-mode .result-actions {
        margin-top: 10px;
    }

    .verify-box.result-mode .result-actions .back-upload-btn {
        width: 100%;
    }

    .credential-summary-tab {
        min-width: 0;
        flex: 1 1 220px;
    }

    .credential-summary-tab-title {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .verify-badges-global {
        right: 10px;
        top: 8px;
        gap: 8px;
    }

    .verify-box {
        padding-top: 98px;
    }

    .verify-box.result-mode {
        padding: 98px 14px 14px;
    }

    .verify-box.result-mode .results {
        padding: 10px;
        border-width: 1px;
    }

    .verify-box.result-mode .results-container {
        gap: 12px;
    }

    .verify-box.result-mode .preview-section h4,
    .verify-box.result-mode .info-section h4 {
        font-size: 15px;
    }

    .verify-box.result-mode .pdf-canvas-container {
        min-height: 220px;
        max-height: 50vh;
        padding: 6px;
    }

    .verify-box.result-mode .pdf-controls {
        display: grid;
        grid-template-columns: 1fr;
    }

    .verify-box.result-mode .nav-btn {
        width: 100%;
    }

    .verify-box.result-mode .result-badge-img {
        height: 54px;
    }

    .verify-box.result-mode .result-badge-img-shield {
        height: 50px;
    }

    .verify-box.result-mode .result-badge-img-2 {
        height: 66px;
    }

    .credential-summary-tab {
        flex-basis: 100%;
        width: 100%;
    }
}
