/* Kentucky Roleplay - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Jumbotron */
.jumbotron {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Buttons */
.btn {
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

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

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #adb5bd !important;
}

/* Alerts */
.alert {
    border-radius: 0.25rem;
    border: none;
}

/* Forum Styles */
.forum-category {
    margin-bottom: 2rem;
}

.forum-list {
    list-style: none;
    padding: 0;
}

.forum-item {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
    transition: background-color 0.2s;
}

.forum-item:hover {
    background-color: #f8f9fa;
}

.thread-list {
    list-style: none;
    padding: 0;
}

.thread-item {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
}

.thread-sticky {
    background-color: #fff3cd;
}

.thread-locked {
    opacity: 0.6;
}

/* Post Styles */
.post {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    background-color: #fff;
}

.post-header {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.post-body {
    padding: 1rem;
}

.post-footer {
    background-color: #f8f9fa;
    padding: 0.5rem 1rem;
    border-top: 1px solid #dee2e6;
    font-size: 0.875rem;
}

/* User Avatar */
.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

/* Badge Styles */
.badge-role {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* VIP & Contributor Badge Special Styling */
.badge-vip,
.badge-contributor {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.badge-vip::before,
.badge-contributor::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.badge-vip:hover,
.badge-contributor:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* VIP Tier Specific Styling */
.badge-vip-bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-vip-silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.badge-vip-gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    border: 1px solid rgba(255, 215, 0, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: goldGlow 2s ease-in-out infinite;
}

@keyframes goldGlow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 2px 15px rgba(255, 215, 0, 0.6);
    }
}

.badge-vip-platinum {
    background: linear-gradient(135deg, #e5e4e2 0%, #d3d3d3 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.badge-vip-diamond {
    background: linear-gradient(135deg, #b9f2ff 0%, #87ceeb 100%) !important;
    border: 1px solid rgba(185, 242, 255, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: diamondSparkle 3s ease-in-out infinite;
}

@keyframes diamondSparkle {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(135, 206, 235, 0.4), 
                    0 0 20px rgba(185, 242, 255, 0.3);
    }
    50% {
        box-shadow: 0 2px 15px rgba(135, 206, 235, 0.6), 
                    0 0 30px rgba(185, 242, 255, 0.5);
    }
}

/* Contributor Badge */
.badge-contributor {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border: 1px solid rgba(40, 167, 69, 0.5);
}

.badge-contributor i {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
}

/* Application Status */
.status-pending {
    color: #ffc107;
}

.status-approved {
    color: #28a745;
}

.status-denied {
    color: #dc3545;
}

.status-under-review {
    color: #17a2b8;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-overlay.active {
    display: flex;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .jumbotron h1 {
        font-size: 2rem;
    }

    .card {
        margin-bottom: 1rem;
    }
}

/* Rich Text Editor */
.editor-toolbar {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    padding: 0.5rem;
    border-radius: 0.25rem 0.25rem 0 0;
}

.editor-content {
    border: 1px solid #dee2e6;
    border-radius: 0 0 0.25rem 0.25rem;
    padding: 1rem;
    min-height: 200px;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Stats Counter */
.stat-counter {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 12px;
    width: 2px;
    height: calc(100% + 1.5rem);
    background-color: #dee2e6;
}

.timeline-item:last-child::after {
    display: none;
}

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

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

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

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

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Backgrounds */
body.dark-mode .bg-light {
    background-color: #242424 !important;
}

body.dark-mode .bg-white {
    background-color: #1a1a1a !important;
}

body.dark-mode .bg-secondary {
    background-color: #3d3d3d !important;
}

body.dark-mode .bg-body {
    background-color: #1a1a1a !important;
}

/* Cards */
body.dark-mode .card {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #404040;
}

body.dark-mode .card-header {
    background-color: #252525;
    border-bottom: 1px solid #404040;
}

body.dark-mode .card-body {
    background-color: #2d2d2d;
}

body.dark-mode .card-footer {
    background-color: #252525;
    border-top: 1px solid #404040;
}

/* List Groups */
body.dark-mode .list-group-item {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .list-group-item:hover {
    background-color: #333333;
}

body.dark-mode .list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

body.dark-mode .list-group-item-action:focus,
body.dark-mode .list-group-item-action:hover {
    background-color: #333333;
    color: #fff;
}

/* Tables */
body.dark-mode .table {
    color: #e0e0e0;
    border-color: #404040;
    --bs-table-bg: #2d2d2d;
    --bs-table-striped-bg: #252525;
    --bs-table-striped-color: #e0e0e0;
    --bs-table-active-bg: #333333;
    --bs-table-active-color: #e0e0e0;
    --bs-table-hover-bg: #333333;
    --bs-table-hover-color: #fff;
}

body.dark-mode .table thead th {
    border-color: #404040;
    background-color: #1a1a1a;
    color: #fff;
    font-weight: 600;
}

body.dark-mode .table tbody td,
body.dark-mode .table tbody th {
    border-color: #404040;
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: #252525;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: #252525;
    color: #e0e0e0;
}

body.dark-mode .table-hover tbody tr:hover {
    background-color: #333333;
}

body.dark-mode .table-hover tbody tr:hover > * {
    --bs-table-accent-bg: #333333;
    color: #fff;
}

body.dark-mode .table-bordered {
    border-color: #404040;
}

body.dark-mode .table-bordered > :not(caption) > * {
    border-color: #404040;
}

body.dark-mode .table-bordered > :not(caption) > * > * {
    border-color: #404040;
}

body.dark-mode .table > :not(caption) > * > * {
    background-color: #2d2d2d;
    border-bottom-color: #404040;
    color: #e0e0e0;
}

body.dark-mode .table > thead {
    background-color: #1a1a1a;
}

body.dark-mode .table-dark {
    --bs-table-bg: #1a1a1a;
    --bs-table-striped-bg: #252525;
    --bs-table-striped-color: #e0e0e0;
    --bs-table-active-bg: #333333;
    --bs-table-active-color: #fff;
    --bs-table-hover-bg: #333333;
    --bs-table-hover-color: #fff;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .table-light {
    --bs-table-bg: #2d2d2d;
    --bs-table-striped-bg: #252525;
    --bs-table-striped-color: #e0e0e0;
    --bs-table-active-bg: #333333;
    --bs-table-active-color: #e0e0e0;
    --bs-table-hover-bg: #333333;
    --bs-table-hover-color: #fff;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .table-responsive {
    border-color: #404040;
}

/* Table variants */
body.dark-mode .table-primary {
    --bs-table-bg: #1a3a5a;
    --bs-table-striped-bg: #1a3550;
    --bs-table-hover-bg: #1a4060;
    color: #99ccff;
    border-color: #2a4a6a;
}

body.dark-mode .table-secondary {
    --bs-table-bg: #2d2d2d;
    --bs-table-striped-bg: #252525;
    --bs-table-hover-bg: #333333;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .table-success {
    --bs-table-bg: #1a3a2a;
    --bs-table-striped-bg: #1a3525;
    --bs-table-hover-bg: #1a4030;
    color: #99e8b3;
    border-color: #2a5a3a;
}

body.dark-mode .table-danger {
    --bs-table-bg: #4a1a1a;
    --bs-table-striped-bg: #451a1a;
    --bs-table-hover-bg: #501a1a;
    color: #e89999;
    border-color: #6a2a2a;
}

body.dark-mode .table-warning {
    --bs-table-bg: #4a3a1a;
    --bs-table-striped-bg: #453a1a;
    --bs-table-hover-bg: #503a1a;
    color: #e8d399;
    border-color: #6a5a2a;
}

body.dark-mode .table-info {
    --bs-table-bg: #1a3a4a;
    --bs-table-striped-bg: #1a3545;
    --bs-table-hover-bg: #1a4050;
    color: #99d5e8;
    border-color: #2a5a6a;
}

/* Modals */
body.dark-mode .modal-content {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .modal-header {
    background-color: #252525;
    border-bottom-color: #404040;
}

body.dark-mode .modal-footer {
    background-color: #252525;
    border-top-color: #404040;
}

body.dark-mode .modal-body {
    background-color: #2d2d2d;
}

/* Forms */
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .form-check-input {
    background-color: #252525;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background-color: #252525;
    color: #e0e0e0;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

body.dark-mode .form-control::placeholder {
    color: #888;
}

body.dark-mode .form-control:disabled,
body.dark-mode .form-select:disabled {
    background-color: #1a1a1a;
    color: #666;
}

body.dark-mode .form-label {
    color: #e0e0e0;
}

body.dark-mode .input-group-text {
    background-color: #252525;
    color: #e0e0e0;
    border-color: #404040;
}

/* Dropdowns */
body.dark-mode .dropdown-menu {
    background-color: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .dropdown-item {
    color: #e0e0e0;
}

body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus {
    background-color: #404040;
    color: #fff;
}

body.dark-mode .dropdown-divider {
    border-top-color: #404040;
}

body.dark-mode .dropdown-header {
    color: #aaa;
}

/* Navigation */
body.dark-mode .nav-tabs {
    border-bottom-color: #404040;
}

body.dark-mode .nav-tabs .nav-link {
    color: #aaa;
}

body.dark-mode .nav-tabs .nav-link:hover {
    border-color: #404040 #404040 transparent;
    color: #e0e0e0;
}

body.dark-mode .nav-tabs .nav-link.active {
    background-color: #2d2d2d;
    border-color: #404040 #404040 #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .nav-pills .nav-link {
    color: #aaa;
}

body.dark-mode .nav-pills .nav-link:hover {
    background-color: #333333;
    color: #e0e0e0;
}

body.dark-mode .pagination .page-link {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-mode .pagination .page-link:hover {
    background-color: #404040;
    border-color: #404040;
    color: #fff;
}

body.dark-mode .pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

body.dark-mode .pagination .page-item.disabled .page-link {
    background-color: #1a1a1a;
    border-color: #404040;
    color: #666;
}

/* Breadcrumbs */
body.dark-mode .breadcrumb {
    background-color: #2d2d2d;
}

body.dark-mode .breadcrumb-item a {
    color: #0d6efd;
}

body.dark-mode .breadcrumb-item.active {
    color: #aaa;
}

body.dark-mode .breadcrumb-item + .breadcrumb-item::before {
    color: #aaa;
    opacity: 1;
}

body.dark-mode .breadcrumb-item::before {
    color: #aaa;
}

/* Alerts */
body.dark-mode .alert {
    border-color: #404040;
}

body.dark-mode .alert-info {
    background-color: #1a3a4a;
    color: #99d5e8;
    border-color: #2a5a6a;
}

body.dark-mode .alert-success {
    background-color: #1a3a2a;
    color: #99e8b3;
    border-color: #2a5a3a;
}

body.dark-mode .alert-warning {
    background-color: #d4a817 !important;
    color: #1a1a1a !important;
    border-color: #e5b82a !important;
}

body.dark-mode .alert-danger {
    background-color: #4a1a1a;
    color: #e89999;
    border-color: #6a2a2a;
}

body.dark-mode .alert-light {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .alert-dark {
    background-color: #1a1a1a;
    color: #e0e0e0;
    border-color: #404040;
}

/* Badges */
body.dark-mode .badge.bg-light {
    background-color: #404040 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .badge.bg-secondary {
    background-color: #4d4d4d !important;
}

/* Yellow/Warning backgrounds */
body.dark-mode .bg-warning {
    background-color: #d4a817 !important;
}

/* Only apply dark text to badges and alerts with warning color (not general bg-warning) */
body.dark-mode .badge.bg-warning {
    background-color: #d4a817 !important;
    color: #1a1a1a !important;
}

body.dark-mode .alert-warning {
    background-color: #d4a817 !important;
    color: #1a1a1a !important;
    border-color: #e5b82a !important;
}

body.dark-mode .alert-warning * {
    color: #1a1a1a !important;
}

/* Warning buttons */
body.dark-mode .btn-warning {
    background-color: #d4a817 !important;
    color: #1a1a1a !important;
    border-color: #d4a817 !important;
}

body.dark-mode .btn-warning:hover {
    background-color: #b8920d !important;
    color: #1a1a1a !important;
}

/* Progress Bars */
body.dark-mode .progress {
    background-color: #252525;
}

/* Accordions */
body.dark-mode .accordion-item {
    background-color: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .accordion-button {
    background-color: #252525;
    color: #e0e0e0;
}

body.dark-mode .accordion-button::after {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

body.dark-mode .accordion-button:not(.collapsed) {
    background-color: #1a1a1a;
    color: #0d6efd;
}

body.dark-mode .accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(0.5) sepia(1) saturate(5) hue-rotate(205deg);
    opacity: 1;
}

body.dark-mode .accordion-button:focus {
    border-color: #404040;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

body.dark-mode .accordion-body {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

/* Tooltips & Popovers */
body.dark-mode .tooltip-inner {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .popover {
    background-color: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .popover-header {
    background-color: #252525;
    border-bottom-color: #404040;
    color: #e0e0e0;
}

body.dark-mode .popover-body {
    color: #e0e0e0;
}

/* Text Colors */
body.dark-mode .text-muted {
    color: #aaa !important;
}

body.dark-mode .text-dark {
    color: #e0e0e0 !important;
}

body.dark-mode .text-body {
    color: #e0e0e0 !important;
}

body.dark-mode .text-black-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

body.dark-mode .text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Borders */
body.dark-mode .border {
    border-color: #404040 !important;
}

body.dark-mode .border-top {
    border-top-color: #404040 !important;
}

body.dark-mode .border-bottom {
    border-bottom-color: #404040 !important;
}

body.dark-mode .border-start {
    border-left-color: #404040 !important;
}

body.dark-mode .border-end {
    border-right-color: #404040 !important;
}

body.dark-mode hr {
    border-top-color: #404040;
    opacity: 1;
}

/* Footer */
body.dark-mode footer {
    background-color: #0d0d0d !important;
    border-top: 1px solid #1a1a1a;
}

body.dark-mode footer h5 {
    color: #e0e0e0;
}

body.dark-mode footer a {
    color: #aaa;
}

body.dark-mode footer a:hover {
    color: #fff;
}

body.dark-mode footer p {
    color: #aaa;
}

body.dark-mode footer hr {
    border-color: #1a1a1a;
}

/* Jumbotron / Hero Sections */
body.dark-mode .jumbotron {
    background: linear-gradient(135deg, #4a5a8a 0%, #5a4a7a 100%);
    color: #e0e0e0;
}

/* Buttons - maintain their colors but adjust for visibility */
body.dark-mode .btn-light {
    background-color: #404040;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-mode .btn-light:hover {
    background-color: #505050;
    border-color: #505050;
    color: #fff;
}

body.dark-mode .btn-outline-light {
    color: #e0e0e0;
    border-color: #e0e0e0;
}

body.dark-mode .btn-outline-light:hover {
    background-color: #e0e0e0;
    color: #1a1a1a;
}

body.dark-mode .btn-outline-dark {
    color: #e0e0e0;
    border-color: #e0e0e0;
}

/* Code blocks */
body.dark-mode code {
    background-color: #252525;
    color: #f8f8f2;
}

body.dark-mode pre {
    background-color: #252525;
    color: #f8f8f2;
    border-color: #404040;
}

/* Blockquotes */
body.dark-mode blockquote {
    border-left-color: #404040;
    color: #aaa;
}

/* Links */
body.dark-mode a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: #66b3ff;
}

body.dark-mode a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
    color: #99ccff;
}

/* Scrollbar */
body.dark-mode ::-webkit-scrollbar-track {
    background: #1a1a1a;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #555;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Offcanvas */
body.dark-mode .offcanvas {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .offcanvas-header {
    border-bottom-color: #404040;
}

body.dark-mode .offcanvas-title {
    color: #e0e0e0;
}

/* Toast */
body.dark-mode .toast {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-mode .toast-header {
    background-color: #252525;
    border-bottom-color: #404040;
    color: #e0e0e0;
}

/* Spinners */
body.dark-mode .spinner-border,
body.dark-mode .spinner-grow {
    color: #0d6efd;
}

/* Close buttons */
body.dark-mode .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Dropdown arrows and carets */
body.dark-mode .dropdown-toggle::after,
body.dark-mode .dropup .dropdown-toggle::after,
body.dark-mode .dropend .dropdown-toggle::after,
body.dark-mode .dropstart .dropdown-toggle::before {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

/* Select element arrows */
body.dark-mode select.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e0e0e0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Carousel controls */
body.dark-mode .carousel-control-prev-icon,
body.dark-mode .carousel-control-next-icon {
    filter: brightness(0) invert(1);
}

/* Pagination arrows */
body.dark-mode .page-link .fa-chevron-left,
body.dark-mode .page-link .fa-chevron-right,
body.dark-mode .page-link .fa-angle-left,
body.dark-mode .page-link .fa-angle-right,
body.dark-mode .page-link .fa-arrow-left,
body.dark-mode .page-link .fa-arrow-right {
    color: #e0e0e0;
    opacity: 0.9;
}

/* All chevron and arrow icons */
body.dark-mode .fa-chevron-down,
body.dark-mode .fa-chevron-up,
body.dark-mode .fa-chevron-left,
body.dark-mode .fa-chevron-right,
body.dark-mode .fa-angle-down,
body.dark-mode .fa-angle-up,
body.dark-mode .fa-angle-left,
body.dark-mode .fa-angle-right,
body.dark-mode .fa-caret-down,
body.dark-mode .fa-caret-up,
body.dark-mode .fa-caret-left,
body.dark-mode .fa-caret-right {
    opacity: 0.9;
}

body.dark-mode .text-muted .fa-chevron-down,
body.dark-mode .text-muted .fa-chevron-up,
body.dark-mode .text-muted .fa-chevron-left,
body.dark-mode .text-muted .fa-chevron-right {
    color: #ccc !important;
    opacity: 1;
}


/* Dark Mode Toggle Button */
#darkModeToggle {
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

#darkModeToggle:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    transform: scale(1.05);
}

#darkModeToggle:active {
    transform: scale(0.95);
}

#darkModeToggle:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
    border-radius: 0.375rem;
}

#darkModeIcon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

#darkModeToggle:hover #darkModeIcon {
    transform: rotate(20deg);
}

/* Dark mode active state animation */
body.dark-mode #darkModeIcon {
    animation: rotate-sun 0.5s ease;
}

@keyframes rotate-sun {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Time ago tooltip styling */
[title] {
    position: relative;
}

span[title][style*="cursor: help"] {
    cursor: help !important;
    border-bottom: 1px dotted currentColor;
    text-decoration: none;
}

/* Bootstrap native tooltip support */
.tooltip {
    font-size: 0.875rem;
}

/* Badge text color improvements for readability */
/* Note: Don't use !important here so inline styles can override for custom role colors */
.badge.text-white,
a.badge.text-white {
    color: #fff;
}

/* Light backgrounds need dark text */
.badge.bg-light,
.badge.bg-warning,
.badge.bg-info,
a.badge.bg-light,
a.badge.bg-warning,
a.badge.bg-info {
    color: #000 !important;
}

/* Dark mode badge adjustments */
/* Note: Don't use !important on general badges so inline styles can override for custom role colors */
body.dark-mode .badge.text-white,
body.dark-mode a.badge.text-white {
    color: #fff;
}

body.dark-mode .badge.bg-light,
body.dark-mode a.badge.bg-light {
    background-color: #6c757d !important;
    color: #fff !important;
}

body.dark-mode .badge.bg-warning,
body.dark-mode .badge.bg-info,
body.dark-mode a.badge.bg-warning,
body.dark-mode a.badge.bg-info {
    color: #000 !important;
}
