/* =============================================
   Q&A Portal - Custom Styles
   ============================================= */

/* Glassmorphism Card */
.glass-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Tag Pills */
.tag-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag-pill:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

/* Question Card Hover */
.question-card {
    position: relative;
    overflow: hidden;
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, #6366f1, #8b5cf6);
    border-radius: 0 4px 4px 0;
    transition: height 0.3s ease;
}

.question-card:hover::before {
    height: 100%;
}

/* Vote Button Animation */
.vote-btn {
    transition: all 0.2s ease;
}

.vote-btn:active {
    transform: scale(0.9);
}

.vote-btn.voted-up {
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.1);
}

.vote-btn.voted-down {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.1);
}

/* Line Clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Prose styling for question/answer bodies */
.prose pre {
    margin: 1rem 0;
}

.prose code {
    font-family: 'Fira Code', 'Consolas', monospace;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* Page transition */
main {
    animation: fadeIn 0.3s ease;
}

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

/* Pulse animation for stats */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
    50% {
        box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.15);
    }
}

.glass-card:hover .stat-value {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Sort tab active indicator */
.sort-tab {
    position: relative;
}

/* Responsive table */
@media (max-width: 768px) {
    table {
        font-size: 0.8rem;
    }
    
    table th,
    table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Selection color */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}
