/* Advanced Hybrid Plagiarism Detection System - Custom Styles */

/* ===== Color Variables ===== */
:root {
    --bg-primary: #dddddd;
    --bg-secondary: #cccccc;
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #666666;
    --border-color: #cccccc;
}

/* ===== Layout ===== */
body {
    padding-top: 56px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #dddddd;
    color: #333333;
}

main {
    flex: 1;
    background-color: #dddddd;
}

/* ===== Navbar ===== */
.navbar {
    background-color: #cccccc !important;
}

.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
    color: #333333 !important;
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link:focus {
    color: #000000 !important;
}

.navbar-toggler-icon {
    filter: invert(0.3);
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    background-color: #dddddd !important;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333333;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin: 0.1rem 0.5rem;
}

.sidebar .nav-link:hover {
    background-color: #cccccc;
    color: #333333;
}

.sidebar .nav-link.active {
    background-color: #cccccc;
    color: #333333;
    font-weight: 600;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #555555;
}

.bg-light {
    background-color: #dddddd !important;
}

/* ===== Cards ===== */
.card {
    border: 1px solid #cccccc;
    background-color: #f5f5f5;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #dddddd;
    border-bottom: 1px solid #cccccc;
    font-weight: 600;
    color: #333333;
}

.card-body {
    background-color: #f5f5f5;
    color: #333333;
}

.card-footer {
    background-color: #dddddd;
    border-top: 1px solid #cccccc;
}

/* ===== Tables ===== */
.table {
    color: #333333;
}

.table th {
    font-weight: 600;
    border-top: none;
    background-color: #cccccc;
    color: #333333;
}

.table td {
    background-color: #f5f5f5;
}

.table-hover tbody tr:hover {
    background-color: #dddddd;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #eeeeee;
}

/* ===== Badges ===== */
.badge {
    font-weight: 500;
    padding: 0.4em 0.65em;
}

.bg-secondary {
    background-color: #cccccc !important;
    color: #333333 !important;
}

/* ===== Buttons ===== */
.btn-primary {
    background-color: #cccccc;
    border-color: #bbbbbb;
    color: #333333;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #bbbbbb;
    border-color: #aaaaaa;
    color: #333333;
}

.btn-secondary {
    background-color: #dddddd;
    border-color: #cccccc;
    color: #333333;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #cccccc;
    border-color: #bbbbbb;
    color: #333333;
}

.btn-outline-primary {
    color: #555555;
    border-color: #cccccc;
}

.btn-outline-primary:hover {
    background-color: #cccccc;
    border-color: #cccccc;
    color: #333333;
}

.btn-group-sm > .btn, .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* ===== Progress Bars ===== */
.progress {
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #dddddd;
}

.progress-bar {
    background-color: #cccccc;
}

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

/* ===== Highlight Classes for Plagiarism Detection - KEEP ORIGINAL COLORS ===== */
.highlight-exact {
    background-color: #ff6b6b;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
}

.highlight-paraphrased {
    background-color: #ffd93d;
    color: #333;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
}

.highlight-semantic {
    background-color: #6bcb77;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
}

.highlight-default {
    background-color: #adb5bd;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
}

/* AI Detection Highlight Classes - Each with distinct color */
.highlight-ai-raw {
    background-color: #9b59b6;     /* Purple - AI Generated */
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
}

.highlight-ai-detected {
    background-color: #e91e63;     /* Magenta/Pink - AI Detected (generic) */
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
}

.highlight-ai-paraphrased {
    background-color: #f39c12;     /* Orange - AI Paraphrased */
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
}

.highlight-ai-human-edited {
    background-color: #3498db;     /* Blue - Human-Edited AI */
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
}

/* Highlight hover effects */
.highlight-exact:hover,
.highlight-paraphrased:hover,
.highlight-semantic:hover,
.highlight-ai-raw:hover,
.highlight-ai-detected:hover,
.highlight-ai-paraphrased:hover,
.highlight-ai-human-edited:hover {
    opacity: 0.8;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

/* ===== Text Preview ===== */
.text-preview {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.8;
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    max-height: 500px;
    overflow-y: auto;
    color: #333333;
}

.text-compare {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.9rem;
    line-height: 1.7;
    max-height: 600px;
    overflow-y: auto;
    color: #333333;
}

/* ===== Score Indicators - KEEP ORIGINAL COLORS ===== */
.score-high { color: #dc3545; font-weight: bold; }
.score-medium { color: #ffc107; font-weight: bold; }
.score-low { color: #28a745; font-weight: bold; }

/* ===== Feature Icons ===== */
.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #cccccc !important;
}

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

/* ===== Responsive Adjustments ===== */
@media (max-width: 767.98px) {
    .sidebar {
        position: relative;
        padding-top: 0;
    }

    main {
        padding-left: 0 !important;
    }

    .navbar-brand span {
        display: none;
    }
}

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

::-webkit-scrollbar-track {
    background: #dddddd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 4px;
}

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

/* ===== Form Enhancements ===== */
.form-control,
.form-select {
    background-color: #f5f5f5;
    border-color: #cccccc;
    color: #333333;
}

.form-control:focus,
.form-select:focus {
    border-color: #bbbbbb;
    box-shadow: 0 0 0 0.2rem rgba(204, 204, 204, 0.25);
    background-color: #ffffff;
}

.input-group-text {
    background-color: #dddddd;
    border-color: #cccccc;
    color: #333333;
}

/* ===== Empty State ===== */
.empty-state {
    padding: 3rem;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    color: #cccccc;
}

/* ===== Pagination ===== */
.pagination {
    margin-bottom: 0;
}

.page-link {
    border: 1px solid #cccccc;
    color: #333333;
    background-color: #f5f5f5;
}

.page-link:hover {
    background-color: #dddddd;
    border-color: #cccccc;
    color: #333333;
}

.page-item.active .page-link {
    background-color: #cccccc;
    border-color: #cccccc;
    color: #333333;
}

/* ===== Dropdown Enhancements ===== */
.dropdown-menu {
    border: 1px solid #cccccc;
    background-color: #f5f5f5;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    color: #333333;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #dddddd;
    color: #333333;
}

.dropdown-item:active {
    background-color: #cccccc;
    color: #333333;
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid #cccccc;
    background-color: #dddddd !important;
    color: #333333;
}

/* ===== Compact Page Header Bar ===== */
/* Targets the standard Bootstrap admin page-header pattern used across all pages */
.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pb-2.mb-3.border-bottom {
    background-color: #f5f5f5;
    border: 1px solid #cccccc !important;
    border-radius: 6px;
    padding: 6px 12px !important;
    padding-bottom: 6px !important;
    margin-bottom: 12px !important;
}

.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pb-2.mb-3.border-bottom h1,
.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pb-2.mb-3.border-bottom .h1,
.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pb-2.mb-3.border-bottom h2,
.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pb-2.mb-3.border-bottom .h2 {
    font-size: 1rem !important;
    font-weight: 600;
    margin-bottom: 0 !important;
    color: #333333;
}

.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pb-2.mb-3.border-bottom .btn-toolbar {
    margin-bottom: 0 !important;
    gap: 4px;
}

/* ===== Animation ===== */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* ===== Status indicators - KEEP ORIGINAL COLORS ===== */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot.online { background-color: #28a745; }
.status-dot.offline { background-color: #dc3545; }
.status-dot.pending { background-color: #ffc107; }

/* ===== Text Colors ===== */
.text-muted {
    color: #666666 !important;
}

.text-primary {
    color: #555555 !important;
}

/* ===== Modal ===== */
.modal-content {
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
}

.modal-header {
    background-color: #dddddd;
    border-bottom: 1px solid #cccccc;
    color: #333333;
}

.modal-footer {
    background-color: #dddddd;
    border-top: 1px solid #cccccc;
}

/* ===== Hero Section (Home page) ===== */
.bg-primary {
    background-color: #cccccc !important;
    color: #333333 !important;
}

.bg-primary .text-white,
.bg-primary h1,
.bg-primary h2,
.bg-primary p,
.bg-primary span {
    color: #333333 !important;
}

.btn-light {
    background-color: #f5f5f5;
    border-color: #dddddd;
    color: #333333;
}

.btn-light:hover {
    background-color: #eeeeee;
    border-color: #cccccc;
    color: #333333;
}

.btn-outline-light {
    border-color: #333333;
    color: #333333;
}

.btn-outline-light:hover {
    background-color: #333333;
    border-color: #333333;
    color: #f5f5f5;
}

/* ===== List group ===== */
.list-group-item {
    background-color: #f5f5f5;
    border-color: #cccccc;
    color: #333333;
}

.list-group-item:hover {
    background-color: #dddddd;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    background-color: #dddddd;
}

.breadcrumb-item a {
    color: #555555;
}

.breadcrumb-item.active {
    color: #333333;
}
