/* Story Cards and Shelf Cards */
.story-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out both;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.story-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

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

.story-card:active {
    transform: translateY(-4px) scale(0.98);
}

.story-card h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    position: relative;
}

.story-card .story-info {
    font-size: 16px;
    color: var(--text-muted);
    position: relative;
}

.story-card .story-emoji {
    font-size: 56px;
    margin-bottom: 18px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s;
}

.story-card:hover .story-emoji {
    transform: scale(1.15) rotate(-5deg);
}

/* New Story Badge */
.new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
    z-index: 10;
    will-change: transform;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.shelf-badge {
    position: static;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
    font-size: 10px;
    padding: 3px 8px;
    min-width: 20px;
    text-align: center;
}

.story-card.has-new-badge {
    position: relative;
}

/* Shelf Card */
.shelf-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px dashed var(--primary);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out both;
}

.shelf-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
}

.shelf-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent);
    box-shadow: var(--glow-accent);
}

.shelf-card:active {
    transform: translateY(-4px) scale(0.98);
}

.shelf-card .shelf-icon {
    font-size: 56px;
    margin-bottom: 18px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s;
    position: relative;
}

.shelf-card:hover .shelf-icon {
    transform: scale(1.15) rotate(-5deg);
}

.shelf-card .shelf-name {
    font-size: 24px;
    font-weight: 800;
    position: relative;
    color: var(--text);
    margin-bottom: 8px;
}

.shelf-card .shelf-count {
    font-size: 14px;
    color: var(--text-muted);
    position: relative;
}

.empty-shelf {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-size: 18px;
}
