/* ========================================
   BLACK GLOSSY THEME STYLES
   ======================================== */

/* Global background and text colors */
body {
    background: #000000 !important;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        linear-gradient(45deg, #000000 0%, #1a1a1a 100%) !important;
    color: white !important;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar styling */
.navbar {
    linear-gradient(45deg, #000000 0%, #1a1a1a 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    font-weight: bold;
    color: white !important;
}

.navbar-nav .nav-link {
    color: white !important;
    margin: 0 10px;
}

.navbar-nav .nav-link:hover {
    color: #ffd700 !important;
}

/* ========================================
   BUTTON STYLES
   ======================================== */
.btn {
    text-align: center !important;
}

/* Base button styling - black background with white text for all buttons */
.btn-primary,
.btn-success,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-secondary,
.btn-info,
.btn-warning,
.btn-danger,
.btn-dark,
.btn-light {
    /* background: #000000 !important; */
    background: linear-gradient(20deg, #000000 0%, #353535 100%) !important;
    color: white !important;
    border: 2px solid white !important;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    position: relative;
}

/* Button hover effects */
.btn-primary:hover,
.btn-success:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-danger:hover,
.btn-secondary:hover,
.btn-info:hover,
.btn-warning:hover,
.btn-danger:hover,
.btn-dark:hover,
.btn-light:hover {
    /* background: rgba(50, 50, 50, 0.9) !important; */
    background: linear-gradient(20deg,rgba(82, 82, 82, 1) 0%, rgba(56, 33, 33, 1) 100%) !important;
    color: white !important;
    border-color: #ffd700 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    text-decoration: none !important;
}

/* Assistant Button with Traveling Border Animation */
.btn-assistant {
    position: relative;
    /* background: #000000 !important; */
    background: linear-gradient(20deg,rgb(0, 0, 0) 0%, #353535 100%) !important;
    color: white !important;
    /* border: 2px solid white !important; */
    border-radius: 8px;
    padding: 8px 16px; /* Same padding as other buttons */
    font-size: inherit; /* Use default font size */
    font-weight: 500; /* Same as other buttons */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px; /* Same gap as other buttons */
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Traveling border elements for assistant buttons */
.btn-assistant::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 127, 1), rgba(255, 69, 0, 1), transparent);
    animation: travel-top 4s linear ;
}

.btn-assistant::after {
    content: '';
    position: absolute;
    top: -100%;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(0, 255, 127, 1), rgba(255, 69, 0, 1), transparent);
    animation: travel-right 2s linear 0.5s;
}

.btn-assistant .border-bottom {
    position: absolute;
    bottom: 0;
    right: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(270deg, transparent, rgba(0, 255, 127, 1), rgba(255, 69, 0, 1), transparent);
    animation: travel-bottom 4s linear 1s;
}

.btn-assistant .border-left {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(0deg, transparent, rgba(0, 255, 127, 1), rgba(255, 69, 0, 1), transparent);
    animation: travel-left 2s linear 1.5s;
}

/* Traveling border animations */
@keyframes travel-top {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes travel-right {
    0% { top: -100%; }
    100% { top: 100%; }
}

@keyframes travel-bottom {
    0% { right: -100%; }
    100% { right: 100%; }
}

@keyframes travel-left {
    0% { bottom: -100%; }
    100% { bottom: 100%; }
}

/* Assistant button hover effect */
.btn-assistant:hover {
    background: rgba(50, 50, 50, 0.9) !important;
    color: white !important;
    border-color: #ffd700 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Disabled button styling */
.btn-primary:disabled,
.btn-success:disabled,
.btn-outline-primary:disabled,
.btn-outline-secondary:disabled,
.btn-outline-danger:disabled,
.btn-secondary:disabled,
.btn-info:disabled,
.btn-warning:disabled,
.btn-danger:disabled,
.btn-dark:disabled,
.btn-light:disabled {
    background: rgba(50, 50, 50, 0.5) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   CARD AND CONTENT STYLING
   ======================================== */

/* Paper cards - keep original white theme */
.paper-card {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    color: #2c3e50 !important;
    margin-bottom: 30px;
    padding: 25px;
    padding-right: 70px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.paper-card .paper-title .paper-authors .paper-category .paper-abstract {
    padding-right: 10px !important;
    padding-left: 10px !important;
}

.paper-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Other cards */
.card {
    background: rgba(30, 30, 30, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.card-header {
    background: rgba(50, 50, 50, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

/* Exclude plan cards from general card styling */
.plan-card {
    background: rgba(30, 30, 30, 0.95) !important;
    color: white !important;
    border: 2px solid var(--plan-color, #e9ecef) !important;
}

/* Ensure profile page cards stay within column constraints */
.col-lg-8 .card {
    max-width: 100% !important;
    width: 100% !important;
}

.card-body {
    background: rgba(30, 30, 30, 0.9) !important;
}

/* Text colors */
.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

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

.text-secondary {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Form controls - keep light for better usability */
.form-control, .form-select {
    background: white !important;
    border: 1px solid #ddd !important;
    color: #2c3e50 !important;
}

.form-control:focus, .form-select:focus {
    background: white !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    color: #2c3e50 !important;
}

.form-control::placeholder {
    color: #999 !important;
}

/* Filter sections */
.filter-section {
    background: rgba(30, 30, 30, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    margin-top: 20px;
}

.filter-section h5 {
    color: white !important;
    margin-bottom: 15px;
}

/* Feed controls */
.feed-controls {
    background: rgba(30, 30, 30, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

/* Note sections - keep light theme */
.note-section {
    background: rgba(240, 240, 240, 0.8) !important;
    border: 1px solid rgba(200, 200, 200, 0.3) !important;
    border-radius: 15px;
    border-color: #000000 !important;
    padding: 15px;
    margin-top: 20px;
}

.note-section h6 {
    color: #2c3e50 !important;
}

.note-section .form-control {
    background: white !important;
    border: 1px solid #ddd !important;
    color: #2c3e50 !important;
}

.note-section .form-control::placeholder {
    color: #999 !important;
}

/* Alerts */
.alert {
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-success {
    background: rgba(40, 167, 69, 0.2) !important;
    border-color: rgba(40, 167, 69, 0.3) !important;
    color: #75d688 !important;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.2) !important;
    border-color: rgba(255, 193, 7, 0.3) !important;
    color: #ffeaa7 !important;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.2) !important;
    border-color: rgba(220, 53, 69, 0.3) !important;
    color: #ff7675 !important;
}

.alert-info {
    background: rgba(13, 202, 240, 0.2) !important;
    border-color: rgba(13, 202, 240, 0.3) !important;
    color: #74b9ff !important;
}

/* Pagination */
.pagination .page-link {
    background: rgba(30, 30, 30, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    margin: 0 5px;
    border-radius: 10px;
}

.pagination .page-link:hover {
    background: rgba(50, 50, 50, 0.9) !important;
    border-color: white !important;
    color: white !important;
}

.pagination .page-item.active .page-link {
    background: white !important;
    border-color: white !important;
    color: black !important;
}

/* Dropdown menus */
.dropdown-menu {
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(10px);
}

.dropdown-item {
    color: #333 !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(0, 123, 255, 0.1) !important;
    color: #333 !important;
}

.dropdown-item.logout-btn:hover {
    background: rgba(0, 123, 255, 0.1) !important;
    color: #333 !important;
    text-decoration: none !important;
    border-radius: 0 0 8px 8px !important;
}

/* Fix account plan section to use dark theme but not purple gradient */
/* .account-plan-section {
    background: rgba(30, 30, 30, 0.95) !important;
    color: white !important;
} */

/* Tables */
.table {
    color: white !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.table th {
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.table td {
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

/* Modal styling - keep light theme for better readability */
.modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(200, 200, 200, 0.3) !important;
    color: #2c3e50 !important;
}

.modal-header {
    border-bottom: 1px solid rgba(200, 200, 200, 0.3) !important;
    background: rgba(248, 249, 250, 0.9) !important;
}

.modal-footer {
    border-top: 1px solid rgba(200, 200, 200, 0.3) !important;
    background: rgba(248, 249, 250, 0.9) !important;
}

.modal-body {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #2c3e50 !important;
}


.modal-title {
    color: #2c3e50 !important;
}

/* Fix fullscreen overlay content */
.fullscreen-overlay,
.notes-fullscreen-overlay,
#notes-fullscreen-overlay-saved {
    background: rgba(0, 0, 0, 0.8) !important;
    color: #2c3e50 !important;
}

.fullscreen-overlay .chat-fullscreen-container,
.notes-fullscreen-overlay .chat-fullscreen-container,
#notes-fullscreen-overlay-saved .chat-fullscreen-container {
    background: white !important;
    color: #2c3e50 !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

.fullscreen-overlay h3,
.fullscreen-overlay h5,
.notes-fullscreen-overlay h3,
.notes-fullscreen-overlay h5,
#notes-fullscreen-overlay-saved h3,
#notes-fullscreen-overlay-saved h5 {
    color: #2c3e50 !important;
}

.fullscreen-notes-textarea,
#note-editor-fullscreen-saved {
    background: white !important;
    color: #2c3e50 !important;
    border: 1px solid #ddd !important;
}

.fullscreen-notes-textarea::placeholder,
#note-editor-fullscreen-saved::placeholder {
    color: #999 !important;
}

/* Fix note tabs in fullscreen */
#notes-fullscreen-overlay-saved .note-tab {
    background: rgba(248, 249, 250, 0.9) !important;
    color: #2c3e50 !important;
    border: 1px solid #ddd !important;
}

#notes-fullscreen-overlay-saved .note-tab.active {
    background: white !important;
    color: #2c3e50 !important;
    border-bottom-color: white !important;
}

/* Fix toolbar in fullscreen */
#notes-fullscreen-overlay-saved .note-toolbar {
    background: rgba(248, 249, 250, 0.9) !important;
    border: 1px solid #ddd !important;
}

#notes-fullscreen-overlay-saved .note-toolbar button {
    background: white !important;
    color: #2c3e50 !important;
    border: 1px solid #ddd !important;
}

#notes-fullscreen-overlay-saved .note-toolbar button:hover {
    background: rgba(0, 123, 255, 0.1) !important;
    color: #007bff !important;
}

/* Make sure save button is visible */
#notes-fullscreen-overlay-saved .chat-fullscreen-input {
    background: white !important;
    padding: 15px !important;
    border-top: 1px solid #ddd !important;
}

#notes-fullscreen-overlay-saved .chat-fullscreen-input .btn {
    background: #000000 !important;
    color: white !important;
    border: 1px solid white !important;
}

/* Fix modal body scrolling */
#notes-fullscreen-overlay-saved .chat-fullscreen-body {
    overflow-y: auto !important;
    max-height: calc(90vh - 120px) !important;
    padding: 20px !important;
}

/* Fix assistant message text visibility */
.assistant-message .message-content,
.assistant-message .message-content * {
    color: #333 !important;
}

.assistant-message .message-content h1,
.assistant-message .message-content h2,
.assistant-message .message-content h3,
.assistant-message .message-content h4,
.assistant-message .message-content h5,
.assistant-message .message-content h6 {
    color: #2c3e50 !important;
}

.assistant-message .message-content table,
.assistant-message .message-content th,
.assistant-message .message-content td {
    color: #333 !important;
}

.assistant-message .message-content code {
    color: #d63384 !important;
    background: rgba(214, 51, 132, 0.1) !important;
}

.assistant-message .message-content pre {
    color: #333 !important;
    background: #f8f9fa !important;
}

.assistant-message .message-content p,
.assistant-message .message-content span,
.assistant-message .message-content div,
.assistant-message .message-content li,
.assistant-message .message-content strong,
.assistant-message .message-content em {
    color: #333 !important;
}

/* Override global text colors in specific contexts */
.paper-card a,
.paper-card .paper-links a {
    text-decoration: none !important;
    font-size: 0.8rem !important;
}

.paper-card .text-primary {
    color: #007bff !important;
}

.paper-card .text-muted {
    color: #6c757d !important;
}

/* Fix close button in modals */
.btn-close {
    background: transparent !important;
    border: none !important;
    color: #6c757d !important;
    font-size: 1.2rem !important;
}

.btn-close:hover {
    color: #495057 !important;
}

/* Badge styling */
.badge {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Links */
a {
    color: #ffffff !important;
    text-decoration: none;
}

a:hover {
    color: #ffd700 !important;
    text-decoration: underline;
}

/* Prevent white backgrounds from overriding */
.bg-white {
    background: rgba(30, 30, 30, 0.9) !important;
}

.bg-light {
    background: rgba(50, 50, 50, 0.8) !important;
}

.bg-primary {
    background: rgba(70, 70, 70, 0.9) !important;
}

.bg-secondary {
    background: rgba(60, 60, 60, 0.8) !important;
}

.bg-success {
    background: rgba(40, 167, 69, 0.3) !important;
}

.bg-warning {
    background: rgba(255, 193, 7, 0.3) !important;
}

.bg-danger {
    background: rgba(220, 53, 69, 0.3) !important;
}

.bg-info {
    background: rgba(13, 202, 240, 0.3) !important;
}

/* Profile Page Layout Fixes */
.col-lg-8 .card {
    max-width: 100% !important;
    width: 100% !important;
}
