/* Blog Card Components - Soul Scrolls Design System */

/* ===== IMMORTAL SCROLL CARDS ===== */
.blog-post {
    /* Epic immortal scroll styling */
    background: linear-gradient(135deg, 
        rgba(26, 26, 51, 0.98), 
        rgba(42, 64, 102, 0.95), 
        rgba(13, 13, 26, 0.97)
    );
    border: 2px solid rgba(255, 94, 120, 0.4);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.7),
        0 6px 20px rgba(255, 94, 120, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(255, 94, 120, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    border-left: 6px solid transparent;
    border-image: linear-gradient(45deg, rgba(255, 94, 120, 0.8), rgba(255, 202, 40, 0.6)) 1;
}

/* Mystical glow effect */
.blog-post::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(255, 94, 120, 0.6), 
        rgba(255, 202, 40, 0.4), 
        rgba(79, 195, 247, 0.4),
        rgba(255, 94, 120, 0.6)
    );
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    animation: mysticalPulse 4s ease-in-out infinite;
    transition: opacity 0.4s ease;
}

/* Floating runes effect */
.blog-post::after {
    content: '⟡ ∞ ⟐';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 0.8rem;
    color: rgba(255, 202, 40, 0.3);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    text-shadow: 0 0 8px rgba(255, 202, 40, 0.5);
    letter-spacing: 0.5rem;
}

@keyframes mysticalPulse {
    0%, 100% { 
        background-size: 100% 100%;
        opacity: 0.3;
    }
    50% { 
        background-size: 120% 120%;
        opacity: 0.6;
    }
}

.blog-post:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.9),
        0 12px 40px rgba(255, 94, 120, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(255, 94, 120, 0.3);
    border-color: rgba(255, 94, 120, 0.8);
    background: linear-gradient(135deg, 
        rgba(26, 26, 51, 1), 
        rgba(42, 64, 102, 0.98), 
        rgba(13, 13, 26, 0.99)
    );
}

.blog-post:hover::before {
    opacity: 1;
}

.blog-post:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.blog-post:focus-within {
    outline: 3px solid rgba(255, 94, 120, 0.8);
    outline-offset: 2px;
}

/* ===== CARD HEADER ===== */
.scroll-author,
.modal-author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 94, 120, 0.15);
}

.author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 94, 120, 0.4);
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 94, 120, 0.2);
}

.author-avatar::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 94, 120, 0.6), rgba(255, 202, 40, 0.4));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.author-avatar:hover {
    border-color: rgba(255, 94, 120, 0.8);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 94, 120, 0.4);
}

.author-avatar:hover::before {
    opacity: 1;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.author-avatar:hover img {
    transform: scale(1.1);
}

.author-name {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Cinzel', serif;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 94, 120, 0.8), rgba(255, 202, 40, 0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.author-name:hover {
    background: linear-gradient(135deg, rgba(255, 94, 120, 1), rgba(255, 202, 40, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 8px rgba(255, 94, 120, 0.5);
    transform: translateX(2px);
}

/* ===== CARD CONTENT ===== */
.scroll-title,
.blog-post h3 {
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Cinzel', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, rgba(255, 94, 120, 0.9), rgba(255, 202, 40, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scroll-excerpt,
.blog-post .content {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== CARD FOOTER ===== */
.scroll-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid;
    border-image: linear-gradient(90deg, 
        transparent, 
        rgba(255, 94, 120, 0.4), 
        rgba(255, 202, 40, 0.3), 
        rgba(255, 94, 120, 0.4), 
        transparent
    ) 1;
    position: relative;
}

.scroll-footer::before {
    content: '⟐ ∞ ⟐';
    position: absolute;
    top: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: rgba(255, 202, 40, 0.5);
    background: linear-gradient(135deg, rgba(26, 26, 51, 0.9), rgba(42, 64, 102, 0.8));
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 94, 120, 0.3);
    backdrop-filter: blur(10px);
    letter-spacing: 0.3rem;
}

.scroll-date,
.date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-style: italic;
    font-family: 'Cinzel', serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
}

.scroll-date::before,
.date::before {
    content: '⧖';
    margin-right: 0.5rem;
    color: rgba(255, 202, 40, 0.6);
    font-style: normal;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* ===== INTERACTIVE ELEMENTS ===== */
.like-dislike-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(26, 26, 51, 0.8);
    border: 1px solid rgba(255, 94, 120, 0.3);
    border-radius: 20px;
    padding: 0.5rem 0.75rem;
    backdrop-filter: blur(5px);
}

.like-btn, .dislike-btn, .challenge-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
}

.like-btn:hover {
    color: rgba(255, 94, 120, 0.9);
    background: rgba(255, 94, 120, 0.15);
    transform: scale(1.05);
}

.dislike-btn:hover, .challenge-btn:hover {
    color: rgba(255, 159, 64, 0.9);
    background: rgba(255, 159, 64, 0.15);
    transform: scale(1.05);
}

.like-btn.active {
    color: rgba(255, 94, 120, 1);
    background: rgba(255, 94, 120, 0.25);
    box-shadow: 0 0 10px rgba(255, 94, 120, 0.3);
}

.dislike-btn.active, .challenge-btn.active {
    color: rgba(255, 159, 64, 1);
    background: rgba(255, 159, 64, 0.25);
    box-shadow: 0 0 10px rgba(255, 159, 64, 0.3);
}

/* Challenge Dropdown System */
.challenge-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    z-index: 1000;
    animation: dropdownSlide 0.3s ease-out;
}

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

.challenge-options {
    background: linear-gradient(135deg, rgba(26, 26, 51, 0.98), rgba(13, 13, 26, 0.95));
    border: 2px solid rgba(255, 94, 120, 0.5);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    min-width: 200px;
}

.challenge-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    text-align: left;
}

.challenge-option:hover {
    background: rgba(255, 94, 120, 0.2);
    transform: translateX(4px);
}

.challenge-option i {
    width: 20px;
    color: var(--accent);
}

.like-count, .dislike-count, .challenge-count {
    font-size: var(--text-xs);
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* ===== ACTION BUTTONS ===== */
.whisper-link, .edit-post-btn {
    background: linear-gradient(135deg, rgba(255, 94, 120, 0.8), rgba(255, 202, 40, 0.7));
    color: rgba(26, 26, 51, 0.95);
    border: 2px solid rgba(255, 94, 120, 0.4);
    border-radius: 20px;
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    min-height: 38px;
    font-family: 'Cinzel', serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.whisper-link::before, .edit-post-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;
}

.whisper-link:hover, .edit-post-btn:hover {
    background: linear-gradient(135deg, rgba(255, 94, 120, 1), rgba(255, 202, 40, 0.9));
    transform: translateY(-3px) scale(1.08);
    box-shadow: 
        0 8px 25px rgba(255, 94, 120, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 94, 120, 0.8);
}

.whisper-link:hover::before, .edit-post-btn:hover::before {
    left: 100%;
}

.whisper-link:focus, .edit-post-btn:focus {
    outline: 3px solid rgba(255, 94, 120, 0.6);
    outline-offset: 3px;
}

.whisper-link:active, .edit-post-btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 94, 120, 0.4);
}

/* ===== RESPONSIVE DESIGN - Mobile First ===== */
@media (max-width: 640px) {
    .blog-post {
        padding: var(--space-4);
    }
    
    .scroll-footer {
        flex-direction: column;
        gap: var(--space-3);
        align-items: stretch;
    }
    
    .post-actions {
        justify-content: center;
    }
    
    .author-avatar {
        width: 32px;
        height: 32px;
    }
    
    .scroll-title,
    .blog-post h3 {
        font-size: var(--text-lg);
    }
}

/* ===== GRID LAYOUT ===== */
.scroll-grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .scroll-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .scroll-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .blog-post {
        transition: none;
    }
    
    .blog-post:hover {
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .blog-post {
        border-width: 2px;
    }
    
    .author-name, .scroll-title {
        color: var(--text);
    }
}

/* ===== LOADING STATES ===== */
.scroll-grid:empty::after {
    content: "Loading scrolls...";
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-8);
    color: var(--text-muted);
    font-style: italic;
}

/* ===== ERROR STATES ===== */
.empty-message, .error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-8);
    background: var(--background-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
}

/* ===== DELETE BUTTON STYLING ===== */
.delete-btn {
    background: linear-gradient(135deg, 
        rgba(220, 38, 127, 0.8) 0%, 
        rgba(190, 24, 93, 0.9) 100%);
    border: 2px solid rgba(220, 38, 127, 0.4);
    border-radius: 8px;
    color: var(--text);
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    box-shadow: 
        0 4px 12px rgba(220, 38, 127, 0.2),
        inset 0 1px 0 rgba(240, 230, 255, 0.1);
    text-shadow: 0 0 8px rgba(220, 38, 127, 0.3);
    white-space: nowrap;
    min-width: 36px;
    min-height: 32px;
}

.delete-btn:hover {
    background: linear-gradient(135deg, 
        rgba(220, 38, 127, 1) 0%, 
        rgba(190, 24, 93, 1) 100%);
    border-color: rgba(220, 38, 127, 0.8);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(220, 38, 127, 0.4),
        inset 0 1px 0 rgba(240, 230, 255, 0.2);
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(255, 255, 255, 0.3);
}

.delete-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(220, 38, 127, 0.3);
}

.delete-btn:focus {
    outline: none;
    border-color: rgba(220, 38, 127, 0.8);
    box-shadow: 
        0 0 0 4px rgba(220, 38, 127, 0.3),
        0 6px 20px rgba(220, 38, 127, 0.4);
}

/* Scroll controls layout for card buttons */
.scroll-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===== PRINT STYLES ===== */
@media print {
    .blog-post {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        background: white;
        color: black;
    }
    
    .post-actions,
    .like-dislike-buttons,
    .delete-btn {
        display: none;
    }
} 