/**
 * Life Nootropics - Product Authentication Portal CSS
 * Premium Research Aesthetic with Gold (#DFB037) Accents
 */

:root {
    --ln-gold: #dfb037;
    --ln-gold-hover: #c99c2b;
    --ln-gold-glow: rgba(223, 176, 55, 0.25);
    --ln-dark: #0b0f19;
    --ln-dark-card: #111827;
    --ln-dark-border: rgba(255, 255, 255, 0.08);
    --ln-green: #10b981;
    --ln-green-glow: rgba(16, 185, 129, 0.2);
    --ln-amber: #f59e0b;
    --ln-amber-glow: rgba(245, 158, 11, 0.2);
    --ln-red: #ef4444;
    --ln-red-glow: rgba(239, 68, 68, 0.2);
}

.ln-verification-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 15px 60px;
}

/* Header & Intro */
.ln-portal-header {
    text-align: center;
    margin-bottom: 40px;
}

.ln-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(223, 176, 55, 0.12);
    border: 1px solid rgba(223, 176, 55, 0.35);
    color: #dfb037;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 18px;
}

.ln-portal-title {
    font-size: 38px;
    font-weight: 800;
    color: #0b0f19;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
    line-height: 1.2;
}

.ln-portal-subtitle {
    font-size: 16px;
    color: #64748b;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Search Box Container */
.ln-search-card {
    background: #0f172a;
    border: 1px solid rgba(223, 176, 55, 0.3);
    border-radius: 16px;
    padding: 35px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.ln-search-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #dfb037, transparent);
}

.ln-search-card-inner {
    max-width: 780px;
    margin: 0 auto;
}

.ln-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.ln-input-field-wrap {
    flex: 1;
    position: relative;
}

.ln-input-field-wrap i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
}

.ln-verify-input {
    width: 100%;
    height: 56px !important;
    background: #1e293b !important;
    border: 1.5px solid #334155 !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-family: monospace, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    padding: 0 45px 0 50px !important;
    box-shadow: none !important;
    transition: all 0.25s ease !important;
}

.ln-verify-input:focus {
    border-color: #dfb037 !important;
    box-shadow: 0 0 0 3px rgba(223, 176, 55, 0.2) !important;
    background: #243048 !important;
}

.ln-verify-input::placeholder {
    color: #64748b;
    font-family: inherit;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.ln-clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    display: none;
    padding: 4px;
}

.ln-clear-btn:hover {
    color: #ffffff;
}

.ln-btn-verify {
    background: linear-gradient(135deg, #dfb037 0%, #c99c2b 100%);
    color: #0b0f19;
    border: none;
    border-radius: 10px;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    height: 56px;
}

.ln-btn-verify:hover {
    background: linear-gradient(135deg, #e6b840 0%, #d4a733 100%);
    box-shadow: 0 6px 20px rgba(223, 176, 55, 0.35);
    transform: translateY(-1px);
    color: #000;
}

.ln-btn-scan-qr {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    height: 56px;
}

.ln-btn-scan-qr:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #dfb037;
    color: #dfb037;
}

.ln-input-hint {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #94a3b8;
}

.ln-sample-code-link {
    color: #dfb037;
    text-decoration: underline;
    cursor: pointer;
    transition: opacity 0.2s;
}

.ln-sample-code-link:hover {
    color: #ffd875;
}

/* Loading State */
.ln-loading-spinner {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.ln-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(223, 176, 55, 0.2);
    border-top-color: #dfb037;
    border-radius: 50%;
    animation: ln-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.ln-loading-spinner p {
    color: #475569;
    font-weight: 600;
    font-size: 15px;
}

/* Result Cards */
.ln-result-container {
    display: none;
    animation: ln-fadeIn 0.35s ease;
}

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

.ln-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* State Header Bar */
.ln-card-header {
    padding: 30px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.ln-state-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.ln-state-authentic-first .ln-card-header {
    background: linear-gradient(135deg, #052e16 0%, #064e3b 100%);
    color: #ffffff;
    border-bottom-color: rgba(16, 185, 129, 0.3);
}
.ln-state-authentic-first .ln-state-icon-wrap {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.ln-state-authentic-already .ln-card-header {
    background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
    color: #ffffff;
    border-bottom-color: rgba(245, 158, 11, 0.3);
}
.ln-state-authentic-already .ln-state-icon-wrap {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.ln-state-invalid .ln-card-header,
.ln-state-blocked .ln-card-header {
    background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%);
    color: #ffffff;
    border-bottom-color: rgba(239, 68, 68, 0.3);
}
.ln-state-invalid .ln-state-icon-wrap,
.ln-state-blocked .ln-state-icon-wrap {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.ln-state-expired .ln-card-header {
    background: linear-gradient(135deg, #27272a 0%, #3f3f46 100%);
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.ln-state-expired .ln-state-icon-wrap {
    background: rgba(255, 255, 255, 0.1);
    color: #d4d4d8;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ln-header-text h3 {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: #ffffff;
}

.ln-header-text p {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.ln-state-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ln-pill-green { background: #10b981; color: #ffffff; }
.ln-pill-amber { background: #f59e0b; color: #000000; }
.ln-pill-red   { background: #ef4444; color: #ffffff; }
.ln-pill-gray  { background: #71717a; color: #ffffff; }

/* Certificate Body Details */
.ln-card-body {
    padding: 35px 30px;
}

.ln-cert-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.ln-cert-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ln-cert-brand-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #0b0f19;
}

.ln-cert-tag {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Spec Grid */
.ln-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.ln-spec-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    transition: border-color 0.2s ease;
}

.ln-spec-item:hover {
    border-color: #cbd5e1;
}

.ln-spec-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    margin-bottom: 6px;
}

.ln-spec-val {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.ln-spec-val-code {
    font-family: monospace;
    font-size: 17px;
    letter-spacing: 0.5px;
    color: #0f172a;
}

.ln-spec-val-gold {
    color: #b88d22;
}

/* Verification Audit Row */
.ln-audit-row {
    background: #f8fafc;
    border-left: 4px solid #dfb037;
    border-radius: 0 10px 10px 0;
    padding: 18px 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.ln-audit-item {
    display: flex;
    flex-direction: column;
}

.ln-audit-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 4px;
}

.ln-audit-val {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

/* Warning Callouts */
.ln-warning-callout {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.ln-warning-callout i {
    color: #d97706;
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.ln-warning-callout p {
    margin: 0;
    font-size: 14px;
    color: #92400e;
    line-height: 1.5;
}

.ln-danger-callout {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.ln-danger-callout i {
    color: #dc2626;
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.ln-danger-callout p {
    margin: 0;
    font-size: 14px;
    color: #991b1b;
    line-height: 1.5;
}

/* Disclaimer */
.ln-research-disclaimer {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* Action Buttons Footer */
.ln-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.ln-btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.ln-btn-outline:hover {
    border-color: #0b0f19;
    color: #0b0f19;
}

.ln-btn-support {
    background: #0f172a;
    border: 1px solid #0f172a;
    color: #ffffff;
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.ln-btn-support:hover {
    background: #1e293b;
    color: #dfb037;
}

/* QR Camera Scanner Modal */
.ln-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.ln-qr-modal.active {
    display: flex;
}

.ln-qr-modal-content {
    background: #0f172a;
    border: 1px solid rgba(223, 176, 55, 0.4);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    animation: ln-fadeIn 0.2s ease;
}

.ln-qr-modal-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ln-qr-modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.ln-qr-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.ln-qr-close-btn:hover {
    color: #ffffff;
}

.ln-qr-viewfinder {
    padding: 20px;
    background: #020617;
    position: relative;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#ln-qr-reader {
    width: 100% !important;
    border: none !important;
}

#ln-qr-reader video {
    border-radius: 8px;
}

.ln-qr-modal-footer {
    padding: 16px 24px;
    background: #0b0f19;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #94a3b8;
}

.ln-file-qr-btn {
    color: #dfb037;
    text-decoration: underline;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ln-portal-title {
        font-size: 28px;
    }

    .ln-search-card {
        padding: 25px 18px;
    }

    .ln-input-group {
        flex-direction: column;
    }

    .ln-btn-verify, .ln-btn-scan-qr {
        width: 100%;
        justify-content: center;
    }

    .ln-specs-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ln-card-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 20px;
    }

    .ln-card-body {
        padding: 22px 20px;
    }

    .ln-audit-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Print view for certificate */
@media print {
    body * {
        visibility: hidden;
    }
    .ln-result-container, .ln-result-container * {
        visibility: visible;
    }
    .ln-result-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .ln-card-actions, .ln-search-card, .ln-portal-header, header, footer {
        display: none !important;
    }
}
