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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #EEF2E6;
    color: #000000;
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.detail-open {
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Site Title */
.site-title {
    margin: 0;
    padding: 0;
    background: #EEF2E6;
    position: sticky;
    top: 0;
    z-index: 101;
    transition: padding 0.3s ease;
    display: flex;
    justify-content: center;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-logo {
    height: 53px;
    width: auto;
    max-width: 200px;
    display: block;
    transition: height 0.3s ease;
    /* Prevent layout shift */
    aspect-ratio: auto;
}

.site-title.collapsed .site-logo {
    height: 41px;
}

/* Filters Container */
.filters-container {
    position: sticky;
    top: 53px;
    z-index: 100;
    background: #EEF2E6;
    border-bottom: 1px solid #ebebeb;
    padding: 16px 0;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.filters-container.hidden {
    max-height: 0;
    padding: 0;
    opacity: 0;
    border-bottom: none;
}

.filters-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 24px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox - hide scrollbar */
    -ms-overflow-style: none; /* IE and Edge - hide scrollbar */
}

.filters-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera - hide scrollbar */
    width: 0;
    height: 0;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 8px;
    border: 1px solid #dddddd;
    border-radius: 24px;
    background: #ffffff;
    color: #222222;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    gap: 8px;
}

.filter-logo-container {
    width: 24px;
    height: 24px;
    border-radius: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.filter-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.filter-tab-color {
    padding-left: 10px;
    padding-right: 12px;
}

.filter-color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.filter-tab.active .filter-color-swatch {
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.filter-label {
    display: inline-flex;
    align-items: center;
}

.filter-tab:hover {
    border-color: #222222;
}

.filter-tab.active {
    background: #222222;
    color: #ffffff;
    border-color: #222222;
}

/* Scroll mode toggle */
.scroll-mode-toggle-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.scroll-mode-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid #dddddd;
    border-radius: 24px;
    background: #ffffff;
    color: #222222;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.scroll-mode-toggle:hover {
    border-color: #222222;
    background: #f5f5f5;
}

.scroll-mode-toggle svg {
    display: block;
}


.canvas-container {
    flex: 1;
    overflow: auto;
    position: relative;
    background: #EEF2E6;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    height: 100vh;
    scroll-snap-type: none;
    overscroll-behavior: contain;
    will-change: scroll-position;
    scroll-padding: 0;
    scrollbar-width: none; /* Firefox - hide scrollbar */
    -ms-overflow-style: none; /* IE and Edge - hide scrollbar */
}

.canvas {
    position: relative;
    display: grid;
    /* grid-template-columns will be set dynamically in JS based on GRID_SIZE */
    grid-auto-rows: auto;
    column-gap: 71px;
    row-gap: 49px;
    padding: 50px;
    width: fit-content;
    min-height: 100vh;
    height: fit-content;
}

.image-item {
    position: relative;
    width: fit-content;
    cursor: pointer;
    transition: opacity 0.4s ease-out;
    opacity: 0;
    /* Ripple animation will handle opacity on desktop */
}

.image-item.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-item.fade-in {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.image-item.visible {
    opacity: 1;
}

.image-container {
    width: fit-content;
    height: fit-content;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.image-item img {
    width: 257px;
    height: 158px;
    object-fit: cover;
    display: block;
    border-radius: inherit;
    /* Prevent layout shift */
    aspect-ratio: 257 / 158;
}

/* No annual fee diagonal strip */
.no-fee-strip {
    position: absolute;
    top: 12px;
    right: -28px;
    background: #90EE90;
    color: #006400;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 27px;
    transform: rotate(45deg);
    transform-origin: center;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    line-height: 1.3;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    pointer-events: none; /* Prevent interaction issues */
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Desktop: allow overflow for strip */
@media (min-width: 769px) {
    .image-container.has-no-fee-strip {
        overflow: visible;
    }
    
    .image-container.has-no-fee-strip img {
        clip-path: inset(0 round 12px);
    }
}

/* Card information below image */
.card-info {
    padding: 0;
    margin-top: 0;
    height: fit-content;
}

.card-name {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.79);
    margin-top: 9px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 257px;
}

.card-network {
    font-size: 9px;
    color: rgba(0, 0, 0, 0.60);
    margin-top: 5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 257px;
}

/* Card Detail Page */
body.card-detail-page {
    background: #EEF2E6;
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
}

.card-detail-page-content {
    background: #EEF2E6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.card-detail-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #EEF2E6;
    z-index: 10001;
    display: flex;
    align-items: center;
    padding: 0 20px;
    padding-top: env(safe-area-inset-top, 0px);
}

.card-detail-back {
    background: transparent;
    border: none;
    color: #000000;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.card-detail-back:active {
    opacity: 0.6;
}

.card-detail-back svg {
    width: 24px;
    height: 24px;
    stroke: #000000;
}

/* Mobile Card Detail Overlay (kept for backward compatibility, but hidden) */
.card-detail-overlay {
    display: none !important;
    pointer-events: none !important;
}

@media (min-width: 769px) {
    .card-detail-overlay {
        display: none !important;
        pointer-events: none !important;
    }
}

.card-detail-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(40px + env(safe-area-inset-top, 0px));
    padding-bottom: 40px;
}

.card-detail-image-wrapper {
    margin: 13px auto 20px auto;
    width: calc(100% - 32px);
    max-width: 360px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.65);
}

.card-detail-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.card-detail-content {
    padding: 0 20px 32px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: #000000;
}

/* Floating close button removed - using header back button instead */
.card-detail-close {
    display: none !important;
}

.card-detail-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-detail-section h3 {
    font-size: 21px;
    font-weight: 600;
    margin: 0;
    color: #000000;
    font-family: 'Syne', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    padding-bottom: 15px;
}

.card-detail-section p,
.card-detail-section li,
.card-detail-section span {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.86);
}

.card-detail-section ul {
    margin: 0;
    padding-left: 20px;
}

.card-detail-key-value {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px 16px;
}

.card-detail-key {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.48);
    letter-spacing: 0.05em;
}

.card-detail-value {
    font-size: 14px;
    color: #000000;
}

.card-detail-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-detail-badge {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: #000000;
}

.card-detail-list-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.12);
    width: 100%;
}

.card-detail-skeleton {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-detail-skeleton-block {
    height: 18px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.16) 50%, rgba(0,0,0,0.08) 100%);
    background-size: 200% 100%;
    animation: detail-skeleton-pulse 1.2s ease-in-out infinite;
}

.card-detail-skeleton-block.short {
    width: 60%;
}

.card-detail-skeleton-block.medium {
    width: 80%;
}

.card-detail-skeleton-block.full {
    width: 100%;
}

@keyframes detail-skeleton-pulse {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: -200% 0%;
    }
}

.card-hidden {
    visibility: hidden;
}

.card-detail-error {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px 0;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.86);
}

.card-detail-retry {
    align-self: flex-start;
    padding: 10px 18px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 999px;
    font-size: 13px;
}

/* Breadcrumb navigation */
.breadcrumb {
    padding: 1rem 2rem;
    background: #EEF2E6;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    color: rgba(0, 0, 0, 0.6);
    font-size: 14px;
}

.breadcrumb li:not(:last-child)::after {
    content: '>';
    margin-left: 0.5rem;
    color: rgba(0, 0, 0, 0.4);
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.breadcrumb a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
    color: #000000;
    font-weight: 500;
}

/* Similar cards section */
.similar-cards-list {
    margin-top: 1rem;
}

.similar-cards-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.similar-cards-list li {
    padding: 0;
    margin: 0;
}

.similar-cards-list a {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s ease;
    display: inline-block;
}

.similar-cards-list a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Card overview and sections */
.card-overview,
.key-benefits,
.fees-section {
    background: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.card-overview p,
.key-benefits p,
.fees-section p {
    margin: 0.5rem 0;
    color: rgba(0, 0, 0, 0.86);
}

.card-overview strong,
.key-benefits strong,
.fees-section strong {
    color: #000000;
    font-weight: 600;
}

.card-detail-retry:active {
    transform: scale(0.97);
    background: #f0f0f0;
}
/* Mobile specific image styling */
@media (max-width: 768px) {
    .image-item {
        width: 85vw;
        max-width: 85vw;
        perspective: 1000px;
        transform-style: preserve-3d;
        opacity: 1; /* Mobile cards visible immediately */
    }
    
    .image-container {
        border-radius: 13px;
        width: 100%;
        transform-style: preserve-3d;
        transition: transform 0.1s ease-out;
    }
    
    .image-item img {
        width: 100%;
        height: auto;
        /* Prevent layout shift on mobile */
        aspect-ratio: 340 / 209;
        object-fit: cover;
    }
    
    /* Mobile styling for no-fee-strip - ensure it appears as a diagonal banner */
    .image-container.has-no-fee-strip .no-fee-strip {
        position: absolute !important;
        top: 27px !important;
        right: -24px !important;
        background: #ee9090 !important;
        background-color: #c9ff00 !important;
        color: #006400 !important;
        font-size: 8px !important;
        font-weight: 700 !important;
        letter-spacing: 0.08em !important;
        padding: 5px 20px !important;
        transform: rotate(45deg) translateZ(1px) !important;
        transform-origin: center center !important;
        transform-style: flat !important;
        z-index: 1000 !important;
        white-space: nowrap !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
        line-height: 1.3 !important;
        text-transform: uppercase !important;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
        pointer-events: none !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-width: 100px !important;
        text-align: center !important;
        will-change: transform !important;
    }
    
    /* Allow strip overflow on mobile - use clip-path for image instead */
    .image-container.has-no-fee-strip {
        overflow: visible !important;
    }
    
    .image-container.has-no-fee-strip img {
        clip-path: inset(0 round 13px);
        -webkit-clip-path: inset(0 round 13px);
        position: relative;
        z-index: 1;
    }
    
    /* Ensure strip is above the image */
    .image-container.has-no-fee-strip .no-fee-strip {
        z-index: 1000 !important;
    }
    
    .card-info {
        display: none;
    }
}

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

/* Hide scrollbars while maintaining scroll functionality */
.canvas-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera - hide scrollbar */
    width: 0;
    height: 0;
}

/* Search bar */
.search-bar-container {
    display: none; /* Hidden on desktop */
}


/* Mobile layout */
@media (max-width: 768px) {
    .site-title {
        padding: 0;
        top: 0;
    }
    
    .site-title.collapsed {
        padding: 0;
    }

    .site-logo {
        height: 53px;
    }

    .site-title.collapsed .site-logo {
        height: 41px;
    }
    
    .filters-container {
        padding: 12px 0;
        top: 50px;
    }
    
    .filters-scroll {
        padding: 0 16px;
        gap: 12px;
    }
    
    .filter-tab {
        padding: 6px 8px;
        font-size: 13px;
    }
    
    .canvas-container {
        background: #EEF2E6;
        height: 125vh;
        overflow-y: auto;
        overflow-x: hidden;
        position: relative;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .canvas-container.horizontal-scroll-mode {
        overflow-y: hidden;
        overflow-x: auto;
        height: calc(100vh - 53px - 60px);
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    
    .canvas {
        display: block;
        padding: 20px 16px;
        width: 100%;
        height: auto;
    }
    
    .canvas.horizontal-scroll {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 0 16px;
        width: auto;
        height: auto;
        gap: 20px;
    }
    
    .image-item {
        margin: -50px auto 0 auto;
    }
    
    .image-item:first-child {
        margin-top: 0;
    }
    
    /* Portrait cards for horizontal scroll */
    .canvas.horizontal-scroll .image-item {
        margin: 0;
        flex-shrink: 0;
        width: 200px;
        height: 325px;
    }
    
    .canvas.horizontal-scroll .image-item.portrait-card {
        perspective: 1000px;
        transform-style: preserve-3d;
    }
    
    .canvas.horizontal-scroll .image-item.portrait-card .image-container {
        width: 200px;
        height: 325px;
        transform-style: preserve-3d;
        transition: transform 0.1s ease-out;
        border-radius: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    
    .canvas.horizontal-scroll .image-item.portrait-card img {
        width: 325px;
        height: 200px;
        object-fit: cover;
        transform: rotate(90deg);
        transform-origin: center center;
    }
    
    /* Search bar - mobile only */
    .search-bar-container {
        display: flex;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        justify-content: center;
        align-items: center;
        padding: 20px 20px 23px 20px;
        z-index: 1000;
        pointer-events: none;
        background: transparent !important;
        backdrop-filter: none;
        transition: all 0.3s ease;
    }
    
    .search-bar-container.fullscreen {
        position: fixed;
        top: 15px;
        bottom: 15px;
        left: 15px;
        right: 15px;
        padding: 0;
        background: rgba(0, 0, 0, 0.95) !important;
        backdrop-filter: blur(10px);
        pointer-events: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
    }
    
    .search-close-button {
        display: none;
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        background: transparent;
        border: 2px solid #ffffff;
        border-radius: 50%;
        color: #ffffff;
        font-size: 28px;
        font-weight: 300;
        line-height: 1;
        cursor: pointer;
        z-index: 1001;
        pointer-events: auto;
        transition: all 0.2s ease;
        padding: 0;
        align-items: center;
        justify-content: center;
    }
    
    .search-bar-container.fullscreen .search-close-button {
        display: flex;
    }
    
    .search-close-button:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(1.1);
    }
    
    .search-bar {
        width: 93%;
        padding: 16px 24px;
        background: #000000;
        border: 3px solid #ffffff;
        border-radius: 100px;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        font-size: 16px;
        color: rgba(255, 255, 255, 0.8);
        outline: none;
        pointer-events: auto;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        -webkit-appearance: none;
        appearance: none;
        transition: all 0.3s ease;
    }
    
    .search-bar-container.fullscreen .search-bar {
        width: 100%;
        max-width: none;
        border-radius: 12px;
        margin-top: 60px;
        padding: 20px 24px;
        font-size: 18px;
    }
    
    .search-bar::placeholder {
        color: rgba(255, 255, 255, 0.8);
        opacity: 1;
    }
    
    .search-bar:focus {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    }
}

.color-gradient-container {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 28px;
    width: min(760px, calc(100% - 48px));
    height: 60px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(0, 0, 0, 0.12);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 2500;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.color-gradient-container.visible {
    display: flex;
}

.color-gradient-bar {
    width: 100%;
    height: 22px;
    border-radius: 999px;
    position: relative;
    overflow: visible;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.color-gradient-container.has-selection .color-gradient-bar {
    transform: scale(1.02);
}

.color-gradient-indicator {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: left 0.15s ease, opacity 0.15s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.color-gradient-container.has-selection .color-gradient-indicator {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
}

@media (max-width: 768px) {
    .color-gradient-container {
        bottom: 24px;
        width: calc(100% - 32px);
        height: 56px;
        border-radius: 18px;
        padding: 0 18px;
    }
    
    .color-gradient-bar {
        height: 20px;
    }
}

/* Recommendations Modal */
.recommendations-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.recommendations-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.recommendations-modal {
    background: #ffffff;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.recommendations-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #ebebeb;
}

.recommendations-header h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: #f5f5f5;
    color: #000000;
}

.recommendations-content {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.recommendations-content p {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333333;
    margin: 0 0 16px 0;
}

.recommendations-content strong {
    font-weight: 600;
    color: #000000;
}

.recommendations-content ol,
.recommendations-content ul {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.recommendations-content li {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333333;
    margin-bottom: 12px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    margin-top: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    color: #666666;
}

.error-message {
    padding: 20px;
    background: #fff3f3;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    color: #cc0000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .recommendations-modal {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }
    
    .recommendations-header {
        padding: 20px 20px;
    }
    
    .recommendations-header h2 {
        font-size: 20px;
    }
    
    .recommendations-content {
        padding: 20px;
    }
}

