/* static/css/forum.css - Forum Specific Styles - Production Ready */

/* ========================================
   LIKE BUTTON STYLES
   ======================================== */
.like-btn {
    transition: all 0.3s ease;
    position: relative;
    border-radius: 6px;
    padding: 0.5rem 0.875rem;
    font-size: 0.95rem;
}

.like-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.like-btn.liked {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

.like-btn.processing {
    pointer-events: none;
    opacity: 0.7;
}

.like-btn.own-post {
    opacity: 0.6;
    cursor: not-allowed;
}

.like-btn .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

.like-btn.btn-success {
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* ========================================
   PREMIUM CONTENT STYLES
   ======================================== */
.premium-content-container {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 2rem;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.premium-content-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffc107, #ff6b35, #f39c12, #e67e22);
    background-size: 400% 400%;
    border-radius: 15px;
    z-index: -1;
    animation: gradient-flow 3s ease-in-out infinite;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.premium-box {
    text-align: center;
    position: relative;
    z-index: 2;
}

.premium-icon {
    font-size: 3rem;
    color: #ffc107;
    margin-bottom: 1rem;
    animation: crown-glow 2s ease-in-out infinite alternate;
}

@keyframes crown-glow {
    from { 
        text-shadow: 0 0 20px #ffc107, 0 0 30px #ffc107; 
        transform: scale(1);
    }
    to { 
        text-shadow: 0 0 30px #ffc107, 0 0 40px #ffc107, 0 0 50px #f39c12; 
        transform: scale(1.05);
    }
}

.premium-box h4 {
    color: #ffc107;
    font-weight: bold;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.premium-box p {
    color: #e2e8f0;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.premium-unlock-btn {
    background: linear-gradient(135deg, #ffc107, #f39c12);
    color: #1a1a1a;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

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

.premium-unlock-btn:hover::before {
    left: 100%;
}

.premium-unlock-btn:hover {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
    color: #1a1a1a;
}

.premium-unlock-btn:active {
    transform: translateY(0);
}

.pulse-btn {
    animation: pulse-premium 2s infinite;
}

@keyframes pulse-premium {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    }
}

.premium-benefits {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.premium-benefits h6 {
    color: #ffc107;
    margin-bottom: 1rem;
    font-weight: bold;
    font-size: 1.1rem;
}

.premium-benefits ul {
    list-style: none;
    padding: 0;
}

.premium-benefits ul li {
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.premium-benefits ul li::before {
    content: '✓';
    color: #ffc107;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* ========================================
   QUOTE STYLES
   ======================================== */
.quote-preview {
    background: #2d3748;
    border-left: 4px solid #4fd1c7;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0 8px 8px 0;
}

.quote-preview .quote-author {
    color: #4fd1c7;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.quote-preview .quote-text {
    color: #e2e8f0;
    font-style: italic;
    margin-bottom: 0.5rem;
}

/* ========================================
   SEARCH RESULT STYLES
   ======================================== */
.search-result {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.search-result:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.search-result a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1.05rem;
}

.search-result a:hover {
    color: #c53030;
}

.search-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.search-snippet {
    color: var(--text-light);
    margin-top: 0.5rem;
    line-height: 1.6;
    font-size: 1rem;
}

.highlight {
    background: rgba(229, 62, 62, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* ========================================
   THREAD LIST STYLES
   ======================================== */
.thread-item {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.thread-item:hover {
    background: rgba(229, 62, 62, 0.05);
    transform: translateX(2px);
}

.thread-item:last-child {
    border-bottom: none;
}

.thread-status-icons {
    display: inline-flex;
    gap: 0.25rem;
    margin-right: 0.5rem;
}

.thread-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.thread-meta .separator {
    margin: 0 0.5rem;
    opacity: 0.7;
}

/* ========================================
   POST STYLES
   ======================================== */
.post-content {
    line-height: 1.7;
    color: #e2e8f0;
    word-wrap: break-word;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content p:last-child {
    margin-bottom: 0;
}

.post-content blockquote {
    border-left: 4px solid #4fd1c7;
    padding-left: 1rem;
    margin: 1rem 0;
    background: #2d3748;
    padding: 0.75rem;
    border-radius: 0 8px 8px 0;
}

.post-actions {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.post-number {
    background: var(--secondary);
    color: var(--text-light);
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.post-author-info {
    text-align: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.post-author-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

/* ========================================
   PAGINATION STYLES
   ======================================== */
.pagination {
    margin: 0;
}

.pagination .page-link {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 0.625rem 0.875rem;
    transition: var(--transition);
    font-size: 0.95rem;
}

.pagination .page-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.pagination .page-item.disabled .page-link {
    background: var(--secondary);
    border-color: var(--border);
    color: var(--text-muted);
}

/* ========================================
   IMAGE STYLES
   ======================================== */
.post-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.post-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.image-caption {
    font-style: italic;
    color: #888;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 4px;
}

/* Image Modal */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: pointer;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    cursor: default;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ========================================
   RESPONSIVE FORUM STYLES
   ======================================== */
@media (max-width: 768px) {
    .thread-item {
        padding: 1rem;
    }
    
    .post-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-result {
        padding: 1rem;
    }
    
    .post-author-avatar {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
    
    .premium-content-container {
        padding: 1.5rem 1rem;
        margin: 0.5rem 0;
    }
    
    .premium-box h4 {
        font-size: 1.3rem;
    }
    
    .premium-unlock-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .thread-item {
        padding: 0.75rem;
    }
    
    .search-result {
        padding: 0.75rem;
    }
    
    .post-author-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .premium-content-container {
        padding: 1rem;
    }
    
    .premium-box h4 {
        font-size: 1.2rem;
    }
    
    .premium-unlock-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .thread-item:hover,
    .search-result:hover,
    .like-btn:hover,
    .premium-unlock-btn:hover {
        transform: none;
    }
    
    .post-actions .btn,
    .pulse-btn {
        animation: none;
    }
    
    .crown-glow,
    .gradient-flow {
        animation: none;
    }
}

.thread-item:focus,
.search-result:focus,
.premium-unlock-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .thread-item,
    .search-result,
    .premium-content-container {
        border-width: 2px;
    }
    
    .highlight {
        background: #ffff00;
        color: #000;
    }
}