/* Papers, Please! - Fixed UX Edition */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-black: #0a0a0a;
    --color-white: #ffffff;
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #e5e5e5;
    --color-gray-800: #1f1f1f;
    --color-gray-900: #0f0f0f;
}

body {
    font-family:
        "Inter",
        -apple-system,
        sans-serif;
    background: var(--color-gray-50);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Selectable text utility */
.selectable {
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
}

/* Header */
.header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-200);
    position: sticky;
    top: 0;
    z-index: 40;
}

.header-content {
    max-width: 100%;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--color-black);
    letter-spacing: -0.03em;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-gray-800);
}

.header-btn:hover {
    background: var(--color-gray-200);
}

/* Category Pills */
.category-container {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-200);
    position: sticky;
    top: 73px;
    z-index: 39;
}

.category-scroll {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--color-gray-100);
    border: 1px solid transparent;
    border-radius: 9999px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-gray-800);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-pill:hover {
    background: var(--color-gray-200);
}

.category-pill.active {
    background: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

.category-pill i {
    font-size: 0.875rem;
}

/* Main Horizontal Scroll - FIXED */
.main-scroll {
    margin-right: 2rem;
    padding: 2rem 0 3rem 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-gray-300) transparent;
}

.main-scroll::-webkit-scrollbar {
    height: 8px;
}

.main-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.main-scroll::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: 4px;
}

.main-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-800);
}

.card-scroll {
    display: flex;
    gap: 1.5rem;
    padding: 0 1.5rem;
}

/* Bento Cards */
.bento-card {
    flex-shrink: 0;
    width: 340px;
    border-radius: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

/* Top Section - Non-clickable */
.card-top-section {
    padding: 2rem 2rem 0;
    user-select: text;
}

/* Card Logo */
.card-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 2rem;
}

.logo-icon {
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.8);
}

.logo-text {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.9);
}

/* Illustration Area */
.illustration-area {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0 2rem;
    position: relative;
    height: 180px;
}

.illustration {
    font-size: 8rem;
    color: rgba(0, 0, 0, 0.15);
    transform: rotate(-5deg);
}

/* Title Section */
.title-section {
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-black);
    letter-spacing: -0.03em;
    margin-bottom: 0.375rem;
    line-height: 1.1;
}

.card-subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
}

/* Divider */
.divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 1.25rem 0;
}

/* Info Section with Copy Button */
.info-section {
    margin-bottom: 1.25rem;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: rgba(0, 0, 0, 0.7);
}

.copy-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

.copy-btn.copied {
    background: rgba(0, 128, 0, 0.2);
    color: green;
}

.info-value {
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: "JetBrains Mono", monospace;
    color: rgba(0, 0, 0, 0.9);
}

/* Bottom Section - Clickable */
.card-bottom-section {
    padding: 0 2rem 2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.card-bottom-section:hover {
    transform: translateY(-2px);
}

.card-bottom-section:active {
    transform: translateY(0);
}

/* Stats Section */
.stats-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-black);
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
}

.stat-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: rgba(0, 0, 0, 0.8);
    transition: all 0.2s;
}

.card-bottom-section:hover .stat-arrow {
    background: rgba(0, 0, 0, 0.15);
    transform: translateX(4px);
}

/* Modal - Themed */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-bento {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.modal-bento::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    color: rgba(0, 0, 0, 0.8);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.25);
}

.modal-header {
    padding: 2.5rem 2rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

.modal-icon-large {
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.875rem;
    font-weight: 900;
    color: var(--color-black);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.modal-number {
    font-size: 1rem;
    font-family: "JetBrains Mono", monospace;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 600;
}

.modal-scroll {
    overflow-y: auto;
    flex: 1;
    padding: 1.5rem 2rem;
}

/* Quick Actions Bar */
.quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 1rem;
}

.format-switcher-inline {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.format-btn-inline {
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.8);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.format-btn-inline:hover {
    background: rgba(255, 255, 255, 0.7);
}

.format-btn-inline.active {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-color: rgba(0, 0, 0, 0.9);
}

.download-btn-inline {
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 800;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.download-btn-inline:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Variants - Prominent */
.variants-prominent {
    margin-bottom: 2rem;
}

.section-heading-prominent {
    font-size: 0.875rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.8);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variants-grid-prominent {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.variant-card-prominent {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.8);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    position: relative;
}

.variant-card-prominent:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.3);
}

.variant-card-prominent.active {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-color: rgba(0, 0, 0, 0.9);
}

.check-icon {
    margin-left: auto;
    font-size: 1rem;
}

/* Details */
.details-bento {
    margin-bottom: 2rem;
}

.detail-bento {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

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

.detail-key {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 700;
}

.detail-value {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.05);
}

.action-btn-footer {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-btn-footer.primary {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.action-btn-footer.primary:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Fullscreen */
.fullscreen-view {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--color-black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.fullscreen-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 201;
    transition: all 0.2s;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.fullscreen-wrapper {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.document-img {
    max-width: 100%;
    max-height: calc(100vh - 8rem);
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.fullscreen-caption {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.caption-dot {
    color: rgba(255, 255, 255, 0.3);
}

/* Transitions */
.modal-enter-active,
.modal-leave-active,
.fullscreen-enter-active,
.fullscreen-leave-active {
    transition: opacity 0.25s ease;
}

.modal-enter-from,
.modal-leave-to,
.fullscreen-enter-from,
.fullscreen-leave-to {
    opacity: 0;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .bento-card {
        width: 300px;
    }

    .card-title {
        font-size: 1.75rem;
    }

    .illustration {
        font-size: 6rem;
    }

    .illustration-area {
        height: 140px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .detail-bento {
        grid-template-columns: 1fr;
        gap: 0.375rem;
    }

    .variants-grid-prominent {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        flex-direction: column;
    }

    .format-switcher-inline {
        width: 100%;
    }
}
