/* Featured and Updated Scenario Cards - Matching lorebook-library.css exactly */

/* Featured Section */
.featured-section {
    padding: 3rem 0 2rem 0;
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.5), rgba(20, 20, 30, 0.5));
}

.featured-header {
    text-align: center;
    margin-bottom: 2rem;
}

.featured-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-carousel {
    position: relative;
    overflow: hidden;
}

.featured-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    min-height: fit-content;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    pointer-events: none;
    border-radius: 16px;
}

.featured-card:hover::before {
    opacity: 1;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
    z-index: 10;
}

.featured-badge i {
    font-size: 0.8rem;
}

.featured-cover {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    height: 100px;
}

.featured-cover .cover-design {
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-size: 2rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.featured-cover .cover-design::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.1) 50%, transparent 50%, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 20px 20px;
    animation: moveStripes 20s linear infinite;
}

.featured-cover .custom-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 0;
}

.featured-info {
    position: relative;
    z-index: 1;
}

.featured-info h3 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3rem;
    line-height: 1.5rem;
}

.featured-author {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.featured-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 0.8rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.8em;
}

.featured-stats {
    display: flex;
    gap: 0.4rem;
    margin: 0.5rem 0;
    font-size: 0.7rem;
    flex-wrap: wrap;
}

.featured-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--text-secondary);
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.featured-stats i {
    font-size: 0.6rem;
}

.featured-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0.4rem 0 0 0;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.featured-actions {
    margin-top: auto;
}

.featured-view-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 5;
    pointer-events: auto;
}

.featured-view-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.featured-view-btn:hover::before {
    left: 100%;
}

.featured-view-btn:hover {
    transform: scale(1.05);
}

/* Updated Section */
.updated-section {
    padding: 3rem 0 2rem 0;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.5), rgba(30, 30, 40, 0.5));
}

.updated-header {
    text-align: center;
    margin-bottom: 2rem;
}

.updated-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.updated-carousel {
    position: relative;
    overflow: hidden;
}

.updated-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.updated-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    min-height: fit-content;
}

.updated-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
}

.updated-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    pointer-events: none;
    border-radius: 16px;
}

.updated-card:hover::before {
    opacity: 1;
}

.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.status-badge.new {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.status-badge.updated {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
}

.status-badge i {
    font-size: 0.8rem;
}

.updated-cover {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    height: 100px;
}

.updated-cover .cover-design {
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-size: 2rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.updated-cover .cover-design::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.1) 50%, transparent 50%, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 20px 20px;
    animation: moveStripes 20s linear infinite;
}

.updated-cover .custom-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 0;
}

.updated-info {
    position: relative;
    z-index: 1;
}

.updated-info h3 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3rem;
    line-height: 1.5rem;
}

.updated-author {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.updated-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 0.8rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.8em;
}

.updated-stats {
    display: flex;
    gap: 0.4rem;
    margin: 0.5rem 0;
    font-size: 0.7rem;
    flex-wrap: wrap;
}

.updated-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--text-secondary);
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.updated-stats i {
    font-size: 0.6rem;
}

.updated-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0.4rem 0 0 0;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.updated-actions {
    margin-top: auto;
}

.updated-view-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 5;
    pointer-events: auto;
}

.updated-view-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.updated-view-btn:hover::before {
    left: 100%;
}

.updated-view-btn:hover {
    transform: scale(1.05);
}

/* Animation for stripes */
@keyframes moveStripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 40px;
    }
}

/* Pagination for both sections */
.featured-pagination,
.updated-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.featured-pagination .pagination,
.updated-pagination .pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-pagination .page-btn,
.updated-pagination .page-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: var(--text);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-pagination .page-btn:hover:not(:disabled),
.updated-pagination .page-btn:hover:not(:disabled) {
    background: rgba(138, 43, 226, 0.2);
    border-color: var(--primary);
}

.featured-pagination .page-btn:disabled,
.updated-pagination .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.featured-pagination .page-numbers,
.updated-pagination .page-numbers {
    display: flex;
    gap: 0.5rem;
}

.featured-pagination .page-number,
.updated-pagination .page-number {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-pagination .page-number:hover,
.updated-pagination .page-number:hover {
    background: rgba(138, 43, 226, 0.1);
    border-color: rgba(138, 43, 226, 0.3);
}

.featured-pagination .page-number.active,
.updated-pagination .page-number.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Responsive - Match exactly with lorebooks */
@media (max-width: 992px) {
    .featured-container,
    .updated-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .featured-section,
    .updated-section {
        padding: 1.5rem 0;
    }

    .featured-header h2,
    .updated-header h2 {
        font-size: 1.5rem;
    }

    /* Enable horizontal scrolling for featured section */
    .featured-carousel {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .featured-carousel::-webkit-scrollbar {
        display: none;
    }

    .featured-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 1rem !important;
        padding: 1rem 0 !important;
        width: max-content !important;
        grid-template-columns: none !important;
        max-width: none !important;
    }
    
    .featured-container .featured-card {
        flex: 0 0 70vw !important;
        max-width: 280px !important;
        scroll-snap-align: start !important;
        width: auto !important;
    }

    /* Enable horizontal scrolling for updated section */
    .updated-carousel {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .updated-carousel::-webkit-scrollbar {
        display: none;
    }

    .updated-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 1rem !important;
        padding: 1rem 0 !important;
        width: max-content !important;
        grid-template-columns: none !important;
        max-width: none !important;
    }
    
    .updated-container .updated-card {
        flex: 0 0 70vw !important;
        max-width: 280px !important;
        scroll-snap-align: start !important;
        width: auto !important;
    }
    
    .featured-card,
    .updated-card {
        padding: 1rem;
    }
    
    .featured-cover,
    .updated-cover {
        height: 80px;
    }

    .featured-info h3,
    .updated-info h3 {
        font-size: 1.2rem;
    }

    .featured-description,
    .updated-description {
        font-size: 0.85rem;
    }
}