/* Custom styles for Travel Forum */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-brand i {
    margin-right: 8px;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

/* Thread Styles */
.thread-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
    text-decoration: none;
}

.thread-title:hover {
    color: var(--primary-color);
}

.thread-meta {
    font-size: 0.85rem;
}

/* Comment Styles */
.comment-preview {
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.comment-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, white);
}

/* Sidebar Styles */
.sidebar {
    min-height: calc(100vh - 56px);
    background-color: #343a40;
}

.sidebar .nav-link {
    color: #fff;
    padding: 0.75rem 1rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Chat Styles */
#chatMessages {
    scroll-behavior: smooth;
}

/* Card Hover Effect */
.card-hover {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Form Styles */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
    
    .thread-title {
        font-size: 1rem;
    }
    
    .btn-sm-mobile {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body.dark-mode {
        background-color: #1a1a2e;
        color: #eee;
    }
    
    body.dark-mode .card {
        background-color: #16213e;
        border-color: #0f3460;
    }
    
    body.dark-mode .list-group-item {
        background-color: #16213e;
        color: #eee;
        border-color: #0f3460;
    }
    
    body.dark-mode .comment-preview::after {
        background: linear-gradient(transparent, #16213e);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Tooltip */
.tooltip-inner {
    max-width: 200px;
    padding: 0.5rem 0.75rem;
    background-color: #2c3e50;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}