/* Survey content styling*/
.survey-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.survey-content h1,
.survey-content h2,
.survey-content h3,
.survey-content h4,
.survey-content h5,
.survey-content h6 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.survey-content h1 {
    font-size: 1.8rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.survey-content h2 {
    font-size: 1.5rem;
}

.survey-content h3 {
    font-size: 1.3rem;
}

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

.survey-content ul,
.survey-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.survey-content li {
    margin-bottom: 0.5rem;
}

.survey-content a {
    color: #0d6efd;
    text-decoration: underline;
}

.survey-content a:hover {
    color: #0a58ca;
}

.survey-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: #d63384;
}

.survey-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid #dee2e6;
}

.survey-content pre code {
    background-color: transparent;
    padding: 0;
    color: #333;
}

.survey-content blockquote {
    border-left: 4px solid #0d6efd;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

.survey-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.survey-content table th,
.survey-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.survey-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.survey-content table tr:nth-child(even) {
    background-color: #fafafa;
}

.survey-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 2px solid #e9ecef;
}

.survey-content strong {
    font-weight: 600;
}

.survey-content em {
    font-style: italic;
}

/* Survey card hover effects - enhanced from ref.css */
.survey-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.survey-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.survey-card .card-title a {
    transition: color 0.3s ease;
}

.survey-card .card-title a:hover {
    color: #0d6efd !important;
}

/* Comment styling */
.comment {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 0.75rem;
}

.comment:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.reply-btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.reply-btn:hover {
    text-decoration: underline;
    transform: translateY(-2px);
}

.like-comment-btn {
    text-decoration: none !important;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.like-comment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.like-comment-btn:hover i {
    color: #0d6efd !important;
}

.delete-comment-btn {
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.delete-comment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Reply form styling */
.reply-form textarea {
    resize: vertical;
    transition: border-color 0.3s ease;
}

.reply-form textarea:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25);
}

/* Badge styling with animation */
.badge {
    font-weight: 500;
    transition: all 0.3s ease;
}

.badge-updating {
    animation: badgeGlow 0.6s ease;
}

@keyframes badgeGlow {
    0%, 100% {
        box-shadow: none;
    }
    50% {
        box-shadow: 0 0 10px rgba(23, 162, 184, 0.6);
    }
}

/* Navigation styling */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand img {
    height: 32px;
    margin-right: 8px;
    vertical-align: middle;
}

.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

/* Footer styling */
footer {
    margin-top: auto;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
}

/* Accordion button styling */
.accordion-button {
    background-color: transparent;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #0d6efd;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,0.125);
}

.accordion-button:hover {
    background-color: #e9ecef;
}

/* Pagination styling */
.pagination .page-link {
    color: #0d6efd;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Loading spinner animation */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert styling with entrance animation */
.alert {
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card styling with depth */
.card {
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.125);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.125);
}

/* Button styling - enhanced */
.btn {
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-outline-primary:hover {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

/* Form styling */
.form-control,
.form-select {
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25);
    transform: translateY(-2px);
}

/* Input group styling */
.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transition: all 0.3s ease;
}

.input-group:focus-within .input-group-text {
    background-color: #e9ecef;
    border-color: #86b7fe;
}

/* Character counter */
#char-count {
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

/* Hero section for error pages */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 4rem 2rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

/* Avatar circle for user profiles */
.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.avatar-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.avatar-circle i {
    color: white;
}

/* Statistics cards */
.card.text-center {
    transition: all 0.3s ease;
}

.card.text-center:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card.text-center h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Breadcrumb styling */
.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

.breadcrumb-item a {
    color: #0d6efd;
    text-decoration: none;
    transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Search and filter card */
.card.mb-4 {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .survey-content h1 {
        font-size: 1.5rem;
    }
    
    .survey-content h2 {
        font-size: 1.3rem;
    }
    
    .survey-content h3 {
        font-size: 1.1rem;
    }
    
    .comment {
        padding: 0.5rem;
    }
    
    .hero-section {
        padding: 3rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .survey-card:hover {
        transform: translateY(-3px);
    }
    
    .btn:hover {
        transform: translateY(-1px);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Page transitions */
body {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #0d6efd;
    color: white;
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}