/* Home Page New Sections */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Why Join */
.why-join-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.feature-card {
    background: var(--bg-card);
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.feature-icon {
    font-size: 3.5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}
.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Testimonials */
.testimonials-section {
    padding: 4rem 0;
}
.testimonials-container {
    position: relative;
    overflow: hidden;
}
.testimonials-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.testimonial-card {
    flex: 0 0 100%;
    max-width: 420px;
    margin: 0 1rem;
    padding: 2.5rem;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}
.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}
.testimonial-stars {
    color: #ffd700;
    margin-bottom: 1rem;
}
.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}
.testimonial-author-info h4 {
    margin: 0 0 0.25rem 0;
}
.testimonial-author-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}
.testimonial-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}
.testimonial-nav button {
    background: var(--accent-primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}
.testimonial-nav button:hover {
    transform: scale(1.1);
}

/* Trending */
.trending-section {
    padding: 4rem 0;
}
.trending-stories-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-secondary);
}
.trending-stories-container::-webkit-scrollbar {
    height: 8px;
}
.trending-stories-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
.trending-stories-container::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}
.trending-stories-track {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
}
.trending-story-card {
    flex: 0 0 320px;
    height: 420px;
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    scroll-snap-align: start;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.trending-story-card:hover {
    transform: translateY(-8px) scale(1.02);
}
.trending-story-image {
    height: 200px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.trending-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.trending-story-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.trending-story-image i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0.8;
    z-index: 2;
}
.trending-story-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.trending-story-title {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
}
.trending-story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.trending-story-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* Mobile */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .testimonial-card {
        margin: 0 0.5rem;
        padding: 2rem 1.5rem;
    }
}

/* Section Styles */
.stories-section {
    margin-bottom: 4rem;
}
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    margin: 4rem 0;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border:1px solid var(--border-color);
}
.cta-container { 
    max-width: 600px;
    margin: 0 auto;
}
.cta-container i {
    font-size: 4rem;
    color: var(--accent-primary);
    display: block;
    margin-bottom: 1.5rem;
}
.cta-container h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.cta-container p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Skin Support - Active for Showcase */
.story-card.has-skin {
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.story-card.has-skin .card-content {
    background: var(--card-overlay-color);
    color:var(--text-primary);
    backdrop-filter: blur(4px);
}

.story-card.has-skin .card-title,
.story-card.has-skin .card-description,
.story-card.has-skin .card-meta {
    color: var(--text-primary);
}


.story-card.has-skin .card-footer {
    background: rgba(0, 0, 0, 0.85);
    border-top: 1px solid rgba(255,255,255,0.15);
}
.card-content2{
    transition: background 0.3s ease, color 0.3s ease;
    padding: 1.5rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}
    
    
    /* Skin Badge */
.skin-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 15;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
    animation: fadeIn 0.3s ease;
}

.skin-badge i {
    color: #8A56AC;
    font-size: 14px;
}

.skin-badge span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.skin-price {
    background: linear-gradient(135deg, #8A56AC, #9b6bc0);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Border Styles (formerly Frame Styles) using pseudo-elements */
.story-card[class*="frame-"] {
    position: relative; /* Ensure pseudo-element positioning */
}

.story-card[class*="frame-"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 20;
    border-radius: 20px;
    box-sizing: border-box;
}

/* 2x Wide Themed Borders - Premium Borders */
.frame-silver { background: linear-gradient(135deg, #1a1a1a, #2a2a2a); }
.frame-silver::after {
    border: 4px solid silver;
    border-left-width: 4px;
    border-right-width: 4px;
    box-shadow: inset 0 0 20px rgba(192,192,192,0.6), 0 0 10px rgba(192,192,192,0.3);
}

.frame-neon { background: linear-gradient(135deg, #050505, #0a0a15); }
.frame-neon::after {
    border: 4px solid #0ff;
    border-left-width: 4px;
    border-right-width: 4px;
    box-shadow: 0 0 20px #0ff, inset 0 0 20px #0ff;
}

.frame-floral { background: linear-gradient(135deg, #1a0510, #1a1a1a); }
.frame-floral::after {
    border: 4px solid #ff69b4;
    border-left-width: 4px;
    border-right-width: 4px;
    border-style: double;
    box-shadow: inset 0 0 15px rgba(255,105,180,0.3);
}

.frame-fire { background: linear-gradient(135deg, #2a0500, #1a1a1a); }
.frame-fire::after {
    border: 4px solid #ff4500;
    border-left-width: 4px;
    border-right-width: 4px;
    box-shadow: 0 0 25px #ff0000, inset 0 0 25px #ff0000;
    animation: pulse-fire 1.5s infinite alternate;
}

.frame-ice { background: linear-gradient(135deg, #001015, #1a1a1a); }
.frame-ice::after {
    border: 4px solid #a5f3fc;
    border-left-width: 4px;
    border-right-width: 4px;
    box-shadow: 0 0 20px #a5f3fc, inset 0 0 20px #a5f3fc;
}

.frame-glitch { background: #0a0a0a; }
.frame-glitch::after {
    border: 4px solid #f0f;
    border-left-width: 4px;
    border-right-width: 4px;
    border-left-color: #0ff;
    border-right-color: #ff0;
    box-shadow: 0 0 10px rgba(255,0,255,0.5);
}

.frame-wooden { background: linear-gradient(135deg, #2a1a10, #1a1a1a); }
.frame-wooden::after {
    border: 4px solid #8b4513;
    border-left-width: 4px;
    border-right-width: 4px;
    border-style: ridge;
    box-shadow: inset 0 0 10px rgba(139,69,19,0.5);
}

.frame-rainbow { background: #1a1a1a; }
.frame-rainbow::after {
    border: 4px solid red;
    border-left-width: 4px;
    border-right-width: 4px;
    border-top-color: red;
    border-bottom-color: violet;
    animation: rainbow-border 3s linear infinite;
}

.frame-shadow { background: #000; }
.frame-shadow::after {
    border: 4px solid #333;
    border-left-width: 4px;
    border-right-width: 4px;
    box-shadow: inset 0 0 40px black, 0 5px 15px rgba(0,0,0,0.5);
}

.frame-starlight { background: linear-gradient(135deg, #1a1a00, #1a1a1a); }
.frame-starlight::after {
    border: 4px dashed gold;
    border-left-width: 4px;
    border-right-width: 4px;
    box-shadow: 0 0 15px gold, inset 0 0 10px rgba(255,215,0,0.3);
}

.frame-gold { background: linear-gradient(135deg, #2a2000, #1a1a1a); }
.frame-gold::after {
    border: 4px solid gold;
    border-left-width: 4px;
    border-right-width: 4px;
    box-shadow: 0 0 20px rgba(255,215,0,0.6), inset 0 0 15px rgba(255,215,0,0.4);
}

/* Image-based frame borders - 2x wide support */
.story-frame {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    pointer-events: none;
    z-index: 20;
    object-fit: fill;
    border-radius: 24px;
}

.story-frame[alt] {
    font-size: 0;
}

@keyframes pulse-fire {
    from { box-shadow: 0 0 15px #ff0000, inset 0 0 15px #ff0000; border-color: #ff4500; }
    to { box-shadow: 0 0 25px #ff0000, inset 0 0 25px #ff0000; border-color: #ff0000; }
}

@keyframes rainbow-border {
    0% { border-color: red; }
    16% { border-color: orange; }
    33% { border-color: yellow; }
    50% { border-color: green; }
    66% { border-color: blue; }
    83% { border-color: indigo; }
    100% { border-color: violet; }
}
/* --- NEW CARD DESIGN STYLES --- */
/* --- 2. CARD CONTAINER --- */
.story-card {
    background-color: #1E1E1E; /* Slightly lighter card bg */
    width: 100%;
    /* max-width: 380px;  Removed to fit grid */
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5); /* Deep shadow for depth */
    border: 2px solid #333;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.6);
}

/* Remove original border when frame is present */
.story-card.has-frame {
    border: none;
}

/* --- 3. IMAGE SECTION --- */
.card-image {
    height: 220px;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* The overlay gradient to make text readable if needed, though mostly for style */
.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, rgba(30,30,30,0.95) 0%, rgba(30,30,30,0.7) 50%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* Ensure content above gradient is visible */
.card-image .badge,
.play-fab {
    position: relative;
    z-index: 2;
}

/* Genre Badge */
.badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, rgba(138, 86, 172, 0.9), rgba(155, 107, 192, 0.8));
    backdrop-filter: blur(4px);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* --- 4. FLOATING PLAY BUTTON (FAB) --- */
.play-fab {
    position: absolute;
    bottom: -24px; /* Half hanging off the image */
    right: 16px;
    width: 48px;
    height: 48px;
    background-color: #8A56AC;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: transform 0.2s ease, background-color 0.2s;
}

.play-fab:hover {
    transform: scale(1.1);
    background-color: #9b6bc0;
}

.play-fab i {
    color: white;
}

/* --- 5. CONTENT BODY --- */
.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.85), rgba(45, 45, 45, 0.8));
    border-radius: 0 0 20px 20px;
}

/* Metadata Row (Time / Date) */
.card-meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #ccc;
    font-weight: 500;
    margin-bottom: 8px;
    background: linear-gradient(135deg, rgba(138, 86, 172, 0.6), rgba(155, 107, 192, 0.5));
    padding: 4px 10px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    width: fit-content;
}

.card-meta i {
    margin-right: 4px;
}

/* Title */
.card-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
    line-height: 1.2;
}

/* Description (The "Logline" Logic) */
.card-description {
    font-size: 15px;
    color: #b0b0b0; /* Softer readable gray */
    margin-bottom: 16px;
    line-height: 1.5;
    
    /* Clamps text to exactly 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Author Row */
.card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: auto; /* Push to bottom of content area */
    background: linear-gradient(135deg, rgba(138, 86, 172, 0.6), rgba(155, 107, 192, 0.5));
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    transition: background 0.3s;
    width: fit-content;
}

.card-author:hover {
    background: linear-gradient(135deg, rgba(138, 86, 172, 0.8), rgba(155, 107, 192, 0.7));
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #444;
}

.author-name {
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
}

.author-prefix {
    color: #777;
    font-weight: normal;
}

/* --- 6. FOOTER (Stats & Actions) --- */
.card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.85), rgba(45, 45, 45, 0.8));
    backdrop-filter: blur(10px);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.stats-group {
    display: flex;
    gap: 16px;
    color: #999;
    font-size: 14px;
    font-weight: 600;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-item.rating { color: #FFC107; /* Gold for stars */ }

.action-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.icon-btn {
    background: transparent;
    border: none;
    color: #aaa;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.icon-btn:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.icon-btn.active {
    color: #ef4444; /* Red for active like/heart */
}

.icon-btn.active .fa-bookmark {
    color: #8A56AC; /* Purple for active bookmark/playlist */
}
