/* J-Hub ISXEQ2 File Browser - Enhanced Modern Dark Theme */

/* Simple, readable font stack */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #e4e4e7;
    background: linear-gradient(135deg, #0a0a0b 0%, #111113 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-attachment: fixed;
}

/* Enhanced navbar with subtle gradient */
.navbar-dark {
    background: linear-gradient(90deg, #18181b 0%, #1a1a1d 100%) !important;
    border-bottom: 1px solid #27272a;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    padding: 0.75rem 0;
}

/* Fix select dropdown for dark theme */
.form-select {
    background-color: #18181b;
    color: #e4e4e7;
    border: 1px solid #27272a;
}

.form-select:focus {
    background-color: #18181b;
    color: #e4e4e7;
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Craft Queue Specific Styling */
.craft-queues-section {
    border: 2px solid #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

/* Priority positioning for craft queues when filtered */
.priority-section {
    position: relative;
    z-index: 100;
}

/* Smooth transition when reordering */
.card {
    transition: all 0.3s ease;
}

/* Make the main content area a flex container for ordering */
.container-fluid .row:nth-child(2) {
    display: flex;
    flex-direction: column;
}

.craft-queue-card {
    border-left: 4px solid #ffc107;
    transition: all 0.2s ease;
}

.craft-queue-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
    border-left-color: #ffb000;
}

.craft-queue-card .card-body {
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 0.375rem;
}

.craft-queue-checkbox:checked {
    background-color: #ffc107;
    border-color: #ffc107;
}

.craft-expansion-section {
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 0.375rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 193, 7, 0.02) 100%);
}

/* Show Only Craft Queues filter styling */
#showOnlyCraftQueues:checked + label {
    background-color: rgba(255, 193, 7, 0.2);
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ffc107;
}

/* Improve file hidden state */
.file-hidden {
    display: none !important;
}

.category-hidden {
    display: none !important;
}

.form-select option {
    background-color: #18181b;
    color: #e4e4e7;
}

.form-select optgroup {
    background-color: #27272a;
    color: #f4f4f5;
    font-weight: 600;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: #f4f4f5 !important;
}

.navbar-brand:hover {
    color: #60a5fa !important;
}

/* Enhanced live indicator with pulse animation */
.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-left: 8px;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Simple card design */
.card {
    background: linear-gradient(145deg, #1a1a1d, #161618);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Clean file cards */
.file-card {
    background: linear-gradient(145deg, #1c1c1f, #18181b);
    border: 1px solid rgba(39, 39, 42, 0.5);
    border-radius: 10px;
    padding: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, transparent, #3b82f6, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(145deg, #1e1e21, #1a1a1d);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.file-card:hover::before {
    opacity: 1;
}

.file-card.selected {
    background: linear-gradient(145deg, #1e3a8a, #1e293b);
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

/* Enhanced section headers */
.expansion-section {
    margin-bottom: 2.5rem;
    position: relative;
}

.expansion-section h3 {
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    color: #f4f4f5;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.archetype-section {
    border-left: 3px solid transparent;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    border-image: linear-gradient(180deg, #3b82f6, #60a5fa) 1;
    padding-left: 1.25rem;
    margin-bottom: 1.75rem;
    transition: all 0.3s ease;
}

.archetype-section:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
}

/* Card headers */
.card-header {
    background-color: #18181b;
    border-bottom: 1px solid #27272a;
    color: #f4f4f5;
    font-weight: 600;
}

/* Form controls */
.form-check-input {
    background-color: #18181b;
    border: 1px solid #3f3f46;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-check-input:checked + .form-check-label {
    color: #60a5fa;
    font-weight: 500;
}

.form-check-label {
    color: #e4e4e7;
    cursor: pointer;
}

/* Simple button styles */
.btn-outline-success {
    color: #10b981;
    border: 1px solid #10b981;
    background-color: transparent;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-outline-success:hover {
    background-color: #10b981;
    color: white;
}

.btn-outline-primary {
    color: #3b82f6;
    border: 1px solid #3b82f6;
    background-color: transparent;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-outline-primary:hover {
    background-color: #3b82f6;
    color: white;
}

/* Search highlight */
.search-highlight {
    background-color: #374151;
    padding: 2px 4px;
    border-radius: 3px;
}

.file-hidden {
    display: none !important;
}

.category-hidden {
    display: none !important;
}

/* Stats badge */
.stats-badge {
    background-color: #3f3f46;
    color: #e4e4e7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .file-card {
        margin-bottom: 0.5rem;
    }
    
    .archetype-section {
        border-left: none;
        border-top: 3px solid #007bff;
        padding-left: 0;
        padding-top: 1rem;
    }
}

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

::-webkit-scrollbar-track {
    background: #18181b;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

/* Form controls */
.form-control, .form-select {
    background-color: #18181b;
    border: 1px solid #3f3f46;
    color: #e4e4e7;
}

.form-control:focus, .form-select:focus {
    background-color: #18181b;
    border-color: #3b82f6;
    color: #e4e4e7;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Live update indicator */
.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    margin-left: 8px;
}

/* Donations section */
.donations-section {
    background-color: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.donation-address {
    background-color: #0a0a0b;
    border: 1px solid #27272a;
    border-radius: 4px;
    padding: 0.75rem;
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #a1a1aa;
    word-break: break-all;
}

.donation-label {
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* J-Hub branding */
.jhub-badge {
    background-color: #3b82f6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* File type badges */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: #3b82f6;
    color: white;
}

.badge-success {
    background-color: #10b981;
    color: white;
}

.badge-info {
    background-color: #0ea5e9;
    color: white;
}

.badge-warning {
    background-color: #f59e0b;
    color: white;
}

/* Installation guide card */
.bg-info {
    background-color: #1e40af !important;
}

.border-info {
    border-color: #3b82f6 !important;
}

/* Code blocks */
code {
    background-color: #18181b;
    color: #60a5fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

/* Craft queue badge */
.craft-queue-badge {
    background-color: #dc2626;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Nav link hover effects */
.nav-link {
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #60a5fa;
}

/* File count */
.file-count {
    display: inline-block;
    background-color: #27272a;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
    color: #a1a1aa;
}