/* Custom Styles for Forum Q&A */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
    line-height: 1.6;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-1px);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-radius: 12px;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.card-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    border-radius: 12px 12px 0 0 !important;
}

/* Buttons */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Badges */
.badge {
    font-weight: 500;
    border-radius: 6px;
}

/* Avatar styles */
.rounded-circle {
    object-fit: cover;
}

/* Question/Answer content */
.question-content, .answer-content {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Comment styles */
.comment {
    font-size: 0.9rem;
}

.comment-content {
    background-color: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
}

/* Voting buttons */
.btn-outline-success:hover, .btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-outline-danger:hover, .btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

/* Best answer styling */
.answer.border-success {
    background-color: rgba(16, 185, 129, 0.05);
    border-color: var(--success-color) !important;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #e5e7eb;
    border-radius: 6px;
    margin: 0 2px;
}

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

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

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid #e5e7eb;
}

/* Alert improvements */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #d1fae5;
    color: #047857;
}

.alert-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

.alert-warning {
    background-color: #fef3c7;
    color: #d97706;
}

.alert-info {
    background-color: #dbeafe;
    color: #1d4ed8;
}

/* Search form in navbar */
.navbar .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.navbar .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.navbar .form-control:focus {
    background-color: white;
    color: var(--dark-color);
    border-color: white;
}

/* Dropdown improvements */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
}

.dropdown-item {
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--light-color);
    transform: translateX(4px);
}

/* Tab styling */
.nav-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    border-color: transparent;
    color: var(--secondary-color);
}

.nav-tabs .nav-link.active {
    background-color: white;
    border-color: #e5e7eb #e5e7eb white;
    color: var(--primary-color);
    font-weight: 600;
}

/* List group improvements */
.list-group-item {
    border-radius: 8px;
    margin-bottom: 4px;
    border-color: #e5e7eb;
}

.list-group-item.bg-light {
    background-color: #f1f5f9 !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .display-1 {
        font-size: 3rem;
    }
    
    .display-4 {
        font-size: 1.5rem;
    }
}

/* Animation for new content */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Focus states for accessibility */
.btn:focus, .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}