* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: #ffffff;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    color: #1c1c1e;
    overflow-x: hidden;
}

/* Header styling */
.header-container {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #f0eee9;
    padding: 16px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 90;
}
.header-content {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-logo {
    height: 42px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #ffffff;
}
::-webkit-scrollbar-thumb {
    background: #e1e1e6;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #cfcfd6;
}

/* Loading Screen */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #eeeeee;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}
#loader-wrapper img {
    max-width: 220px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 24px;
}
.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    border-top-color: #cda052;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loader-text {
    margin-top: 18px;
    color: #5c5b57;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Document Wrapper */
#pdf-viewer-container {
    width: 100%;
    min-height: 100vh;
    padding: 30px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: #2c2c2c;
}
#pdf-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}
.page-container {
    position: relative;
    background: #3e3d3d;
    box-shadow: none;
    border-radius: 0;
    margin-bottom: 24px;
    overflow: hidden;
    border: 3px solid #000000;
}
canvas {
    display: block;
    max-width: 100%;
    height: auto !important;
}

/* Payment Card styling at the bottom */
.payment-card-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto 60px auto;
    padding: 0 10px;
}
.payment-card {
    background: #faf9f6;
    border: 1px solid #f0eee9;
    border-radius: 16px;
    padding: 26px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.015);
    text-align: center;
}
.payment-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}
.wallet-icon {
    width: 22px;
    height: 22px;
    color: #cda052;
}
.payment-header h4 {
    font-size: 1.15rem;
    color: #1c1c1e;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.payment-sub {
    font-size: 0.85rem;
    color: #7c7a75;
    line-height: 1.55;
    margin-bottom: 22px;
}
.payment-grid {
    display: flex;
    gap: 16px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}
.payment-details {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    background: #ffffff;
    border: 1px solid #f0eee9;
    border-radius: 12px;
    padding: 20px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px dashed #f0eee9;
}
.detail-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}
.detail-label {
    font-size: 0.78rem;
    color: #7c7a75;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.detail-value {
    font-size: 0.95rem;
    color: #1c1c1e;
    font-weight: 600;
}
.highlight-row .detail-value {
    font-size: 1.15rem;
    color: #cda052;
    font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.account-copy-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.copy-btn {
    background: #faf9f6;
    border: 1px solid #f0eee9;
    color: #7c7a75;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.copy-btn:hover {
    border-color: #cda052;
    color: #ffffff;
    background: #cda052;
    transform: scale(1.05);
}
.copy-icon {
    width: 15px;
    height: 15px;
}
.copy-tooltip {
    position: absolute;
    right: 125%;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: #1c1c1e;
    color: #ffffff;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.copy-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #1c1c1e;
}
.copy-btn:hover .copy-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Floating glassmorphism toolbar (Dark glass matches beautifully on light theme) */
#floating-toolbar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 18, 22, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 40px;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
#floating-toolbar.toolbar-hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(25px);
    pointer-events: none;
}
#floating-toolbar.toolbar-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
#floating-toolbar button, #floating-toolbar a {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}
#floating-toolbar button:hover, #floating-toolbar a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: scale(1.08);
}
#floating-toolbar button:active, #floating-toolbar a:active {
    transform: scale(0.92);
}
#floating-toolbar svg {
    width: 18px;
    height: 18px;
}
#zoom-value {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    user-select: none;
}
.toolbar-separator {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.12);
}

/* Fallback message */
#fallback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    z-index: 900;
}
.fallback-card {
    background: #faf9f6;
    border: 1px solid #f0eee9;
    border-radius: 16px;
    padding: 35px 24px;
    text-align: center;
    max-width: 420px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.03);
}
.fallback-card h3 {
    color: #1c1c1e;
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 700;
}
.fallback-card p {
    color: #7c7a75;
    margin-bottom: 24px;
    font-size: 0.9rem;
    line-height: 1.6;
}
.fallback-btn {
    display: inline-block;
    background: #cda052;
    color: #ffffff;
    padding: 11px 26px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.fallback-btn:hover {
    background: #dfb262;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(205, 160, 82, 0.2);
}

@media (max-width: 600px) {
    #pdf-viewer-container {
        padding: 16px 8px;
    }
    .page-container {
        margin-bottom: 16px;
        border-radius: 0;
    }
    #floating-toolbar {
        bottom: 20px;
        padding: 6px 14px;
        gap: 8px;
    }
    #floating-toolbar button, #floating-toolbar a {
        width: 32px;
        height: 32px;
    }
    #zoom-value {
        font-size: 0.8rem;
        min-width: 44px;
    }
    .payment-card-container {
        margin-top: 10px;
        margin-bottom: 40px;
    }
}
