/* Custom CSS for Raspberry Pi Server Dashboard */

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff !important;
}

.navbar-brand {
    font-weight: bold;
}

.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.bg-secondary {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

.bg-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
}

.btn {
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

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

.form-control {
    border-radius: 8px;
    transition: border-color 0.2s ease-in-out;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.alert {
    border-radius: 8px;
    border: none;
}

.badge {
    border-radius: 12px;
}

.table-dark {
    background-color: transparent;
}

.table-dark td, .table-dark th {
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.progress {
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
}

.progress-bar {
    border-radius: 10px;
}

/* Animation for loading states */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

/* Custom scrollbar */
.activity-log::-webkit-scrollbar {
    width: 6px;
}

.activity-log::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.activity-log::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.activity-log::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Modal styling */
.modal-content {
    border-radius: 12px;
    border: none;
}

/* Tab styling */
.nav-pills .nav-link {
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-group-sm > .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Dark theme improvements */
.form-control::placeholder {
    color: #adb5bd;
}

.dropdown-menu-dark {
    background-color: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* High contrast text for dark backgrounds */
.text-muted, .text-secondary, .text-dark {
    color: #f8f9fa !important;
}

.card.bg-dark .card-body, .card.bg-primary .card-body, .card.bg-secondary .card-body {
    color: #fff !important;
}

body, .bg-dark, .bg-primary, .bg-secondary {
    color: #fff !important;
}

/* Brighten info text in cards and descriptions */
.small.text-muted, .small.text-secondary, .card-body .text-muted, .card-body .text-secondary {
    color: #e0e6ed !important;
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Landing page specific styles */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
}

.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.tech-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

.tech-icon:hover {
    transform: scale(1.1);
}

/* Social links */
.social-link {
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
}

/* Public facing adjustments */
.public-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.skill-badge {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    display: inline-block;
    transition: background 0.3s ease;
}

.skill-badge:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Gradient buttons for admin dashboard */
.btn-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-gradient-purple:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-gradient-success:hover {
    background: linear-gradient(135deg, #228e3c 0%, #1db584 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-gradient-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-gradient-info:hover {
    background: linear-gradient(135deg, #148ea1 0%, #5d2f94 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-block {
    width: 100%;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    display: block;
    text-align: center;
    border-radius: 0.5rem;
}

/* CRITICAL: Override text-muted last to ensure highest priority across all browsers/themes */
.text-muted {
    color: #adb5bd !important;
    opacity: 1 !important;
}

.bg-dark .text-muted,
.bg-secondary .text-muted {
    color: #c8d0d8 !important;
    opacity: 1 !important;
}

/* Gallery styles */
.gallery-item {
    overflow: hidden;
    border-radius: 8px;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.1);
}

/* Ensure modal backdrop and positioning */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

.modal-xl {
    max-width: 90vw;
}

.modal-xl .modal-body img {
    max-height: 85vh;
    width: 100%;
    object-fit: contain;
}