/* Premium Home Page Story Cards */

/* Enhanced Featured Story Cards */
.story-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    height: 100%;
    backdrop-filter: blur(20px);
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

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

.story-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.25);
}

.story-card-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4f8 100%);
}

.story-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.story-card:hover .story-card-image img {
    transform: scale(1.1) rotate(1deg);
}

.story-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 3;
    animation: pulse 2s infinite;
}

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

.status-completed {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.9), rgba(39, 174, 96, 0.9));
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.status-ongoing {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.9), rgba(41, 128, 185, 0.9));
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85), rgba(118, 75, 162, 0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
}

.story-card:hover .play-overlay {
    opacity: 1;
}

.play-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: #667eea;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
}

.story-card:hover .play-btn {
    transform: scale(1);
    background: white;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.play-btn:hover {
    transform: scale(1.1);
    color: #5a67d8;
}

.favorite-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: #95a5a6;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
}

.story-card:hover .favorite-btn {
    transform: scale(1);
    background: white;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.favorite-btn:hover {
    transform: scale(1.1);
    color: #e74c3c;
}

.favorite-btn .fa-heart.favorited {
    color: #e74c3c;
    animation: heartPulse 0.6s ease-in-out;
}

.favorite-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.story-card-body {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.story-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.story-card:hover .story-title {
    color: #667eea;
}

.story-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.story-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #7f8c8d;
    transition: color 0.3s ease;
}

.story-meta-item i {
    width: 16px;
    color: #667eea;
    opacity: 0.8;
}

.story-card:hover .story-meta-item {
    color: #5a6c7d;
}

.story-description {
    font-size: 0.9rem;
    color: #95a5a6;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
    margin-top: auto;
}

.story-episodes,
.story-views {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #95a5a6;
    transition: color 0.3s ease;
}

.story-episodes i,
.story-views i {
    color: #667eea;
    opacity: 0.8;
}

.story-card:hover .story-episodes,
.story-card:hover .story-views {
    color: #7f8c8d;
}

/* Enhanced Compact Story Cards */
.story-card-compact {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.story-card-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s ease;
}

.story-card-compact:hover::before {
    left: 100%;
}

.story-card-compact:hover {
    transform: translateY(-4px) translateX(4px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
    text-decoration: none;
    color: inherit;
    border-color: #667eea;
}

.compact-image {
    width: 70px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.story-card-compact:hover .compact-image {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.compact-info {
    flex: 1;
    min-width: 0;
}

.compact-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.4rem;
    line-height: 1.3;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card-compact:hover .compact-title {
    color: #667eea;
}

.compact-meta {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.compact-stats {
    font-size: 0.75rem;
    color: #95a5a6;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.compact-stats i {
    color: #667eea;
    opacity: 0.8;
}

/* Category Cards Enhancement */
.story-card.category-card {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    background: linear-gradient(135deg, white 0%, #f8fafc 100%);
}

.story-card.category-card:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-8px) scale(1.05);
}

.story-card.category-card:hover h6 {
    color: white !important;
}

.story-card.category-card .fas {
    transition: all 0.3s ease;
}

.story-card.category-card:hover .fas {
    color: white !important;
    transform: scale(1.2);
}

/* Section Enhancements */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #667eea, transparent);
    border-radius: 2px;
}

.section-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .story-card {
        margin-bottom: 1.5rem;
    }
    
    .story-card:hover {
        transform: translateY(-6px) scale(1.01);
    }
    
    .play-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .story-card-compact {
        margin-bottom: 1rem;
    }
    
    .compact-image {
        width: 60px;
        height: 75px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    .story-card-compact {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .compact-image {
        width: 80px;
        height: 100px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Loading Animation */
.story-card-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}