/* TimerPRO Forum Custom Styles */

/* General */
body {
    background-color: #f8f9fa;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

/* Forum Cards */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

.card:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(0,0,0,.23);
}

/* Topic List */
.list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    border-left-color: #007bff;
    background-color: #f8f9fa;
}

/* Posts */
.post-content {
    line-height: 1.6;
    color: #333;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content strong {
    color: #000;
    font-weight: 600;
}

.post-content em {
    color: #555;
}

.post-content a {
    color: #007bff;
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

/* User Info in Posts */
.user-info {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.25em 0.6em;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
}

.page-link:hover {
    background-color: #e9ecef;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Topic Icons */
.fa-thumbtack {
    margin-right: 0.25rem;
}

.fa-lock {
    margin-right: 0.25rem;
}

/* Statistics Cards */
.bg-primary,
.bg-success,
.bg-info,
.bg-warning {
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
}

/* Admin Panel */
.admin-sidebar {
    background-color: #343a40;
    min-height: calc(100vh - 56px);
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 0.75rem 1rem;
}

.admin-sidebar .nav-link:hover {
    color: #fff;
    background-color: #495057;
}

.admin-sidebar .nav-link.active {
    color: #fff;
    background-color: #007bff;
}

/* Search Results */
.search-highlight {
    background-color: #ffeb3b;
    padding: 0.1em 0.2em;
    border-radius: 0.2em;
}

/* Category Icons */
.fa-comments { color: #007bff; }
.fa-lightbulb { color: #ffc107; }
.fa-bullhorn { color: #28a745; }
.fa-bug { color: #dc3545; }

/* Footer */
footer {
    margin-top: auto;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive table {
        font-size: 0.875rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem;
    }
}

/* Alert Boxes */
.alert {
    border: none;
    border-left: 4px solid;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: #bee5eb;
}

.alert-success {
    background-color: #d4edda;
    border-left-color: #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: #ffeeba;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: #f5c6cb;
}

/* Breadcrumb */
.breadcrumb {
    background-color: white;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

/* Quick Reply Box */
.quick-reply {
    position: sticky;
    bottom: 0;
    background-color: white;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,.1);
}

/* Online Indicator */
.online-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    margin-left: 0.25rem;
}

/* Topic Row Hover */
.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,.05);
    cursor: pointer;
}

/* Custom Scrollbar for Code Blocks */
pre {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
}

pre::-webkit-scrollbar {
    height: 8px;
}

pre::-webkit-scrollbar-track {
    background: #f1f1f1;
}

pre::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Video Embeds */
.video-embed {
    max-width: 100%;
    margin: 1rem 0;
}

.video-embed .ratio {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.video-embed iframe {
    border-radius: 8px;
}

/* Attachment Styles */
.attachments .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e3e6f0;
}

.attachments .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.attachments .card img {
    transition: transform 0.2s ease;
}

.attachments .card:hover img {
    transform: scale(1.05);
}

/* ================================================
   DARK MODE STYLES
   ================================================ */

.theme-dark {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.theme-dark .navbar {
    background-color: #2d3748 !important;
}

.theme-dark .card {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    color: #e0e0e0;
}

.theme-dark .card-header {
    background-color: #4a5568;
    border-bottom: 1px solid #718096;
    color: #f7fafc;
}

.theme-dark .list-group-item {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e0e0e0;
}

.theme-dark .list-group-item:hover {
    background-color: #4a5568;
    border-left-color: #63b3ed;
}

.theme-dark .table {
    color: #e0e0e0;
}

.theme-dark .table th {
    border-color: #4a5568;
    background-color: #4a5568;
}

.theme-dark .table td {
    border-color: #4a5568;
}

.theme-dark .table-striped tbody tr:nth-child(odd) {
    background-color: #374151;
}

.theme-dark .form-control {
    background-color: #4a5568;
    border: 1px solid #718096;
    color: #e0e0e0;
}

.theme-dark .form-control:focus {
    background-color: #4a5568;
    border-color: #63b3ed;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.2rem rgba(99, 179, 237, 0.25);
}

.theme-dark .form-select {
    background-color: #4a5568;
    border: 1px solid #718096;
    color: #e0e0e0;
}

.theme-dark .btn-outline-primary {
    color: #63b3ed;
    border-color: #63b3ed;
}

.theme-dark .btn-outline-primary:hover {
    background-color: #63b3ed;
    border-color: #63b3ed;
    color: #1a1a1a;
}

.theme-dark .btn-outline-secondary {
    color: #a0aec0;
    border-color: #a0aec0;
}

.theme-dark .btn-outline-secondary:hover {
    background-color: #a0aec0;
    color: #1a1a1a;
}

.theme-dark .btn-outline-success {
    color: #68d391;
    border-color: #68d391;
}

.theme-dark .btn-outline-success:hover {
    background-color: #68d391;
    color: #1a1a1a;
}

.theme-dark .alert-info {
    background-color: #2b6cb8;
    border-color: #3182ce;
    color: #e0f4ff;
}

.theme-dark .alert-success {
    background-color: #2f855a;
    border-color: #38a169;
    color: #c6f6d5;
}

.theme-dark .alert-warning {
    background-color: #d69e2e;
    border-color: #ed8936;
    color: #fef5e7;
}

.theme-dark .alert-danger {
    background-color: #c53030;
    border-color: #e53e3e;
    color: #fed7d7;
}

.theme-dark .breadcrumb {
    background-color: #2d3748;
}

.theme-dark .breadcrumb-item a {
    color: #63b3ed;
}

.theme-dark .dropdown-menu {
    background-color: #2d3748;
    border: 1px solid #4a5568;
}

.theme-dark .dropdown-item {
    color: #e0e0e0;
}

.theme-dark .dropdown-item:hover {
    background-color: #4a5568;
    color: #f7fafc;
}

.theme-dark .dropdown-divider {
    border-color: #4a5568;
}

.theme-dark footer {
    background-color: #1a202c !important;
}

.theme-dark .post-content {
    color: #e0e0e0;
}

.theme-dark .post-content strong {
    color: #f7fafc;
}

.theme-dark .text-muted {
    color: #a0aec0 !important;
}

.theme-dark .border-end {
    border-color: #4a5568 !important;
}

.theme-dark .video-embed .ratio {
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.theme-dark .attachments .card {
    background-color: #2d3748;
    border-color: #4a5568;
}

.theme-dark .attachments .card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

/* Dark mode toggle button */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.theme-dark .dark-mode-toggle {
    background-color: #ffd700;
    color: #1a1a1a;
}

.theme-light .dark-mode-toggle {
    background-color: #2d3748;
    color: #f7fafc;
}