/* Custom styles for PS5 Management Server */

:root {
    --ps5-blue: #003087;
    --ps5-dark-blue: #001f5c;
    --ps5-light-blue: #006fd6;
    --sidebar-width: 250px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    width: var(--sidebar-width);
}

@media (max-width: 767.98px) {
    .sidebar {
        top: 56px;
    }
}

.sidebar .nav-link {
    color: #333;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    color: var(--ps5-blue);
    background-color: rgba(0, 48, 135, 0.1);
}

.sidebar .nav-link.active {
    color: var(--ps5-blue);
    background-color: rgba(0, 48, 135, 0.1);
    border-left: 3px solid var(--ps5-blue);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

main {
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

@media (max-width: 767.98px) {
    main {
        margin-left: 0;
        padding: 1rem;
    }
}

/* Game cards */
.game-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    background: white;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.game-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #e9ecef;
}

.game-card-image-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.game-card-body {
    padding: 1rem;
}

.game-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

.game-card-badges {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.badge-source {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

.badge-format {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

/* Progress bars */
.task-progress {
    height: 6px;
    border-radius: 3px;
}

.progress-container {
    position: relative;
    height: 6px;
}

.progress-text {
    position: absolute;
    top: -18px;
    right: 0;
    font-size: 0.7rem;
    color: #6c757d;
}

/* Status indicators */
.status-running { color: #0d6efd; }
.status-completed { color: #198754; }
.status-failed { color: #dc3545; }
.status-pending { color: #ffc107; }
.status-cancelled { color: #6c757d; }

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.running { background: #0d6efd; }
.status-dot.completed { background: #198754; }
.status-dot.failed { background: #dc3545; }
.status-dot.pending { background: #ffc107; }
.status-dot.disconnected { background: #6c757d; }
.status-dot.connected { background: #198754; }

/* Table enhancements */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.table td {
    font-size: 0.9rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 48, 135, 0.05);
}

/* Cards */
.card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 6px;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Modal */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

/* Form controls */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ps5-light-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 111, 214, 0.25);
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Badge colors for sources */
.badge.bg-orbit { background-color: #ff6b35 !important; }
.badge.bg-blackbox { background-color: #1a1a2e !important; }
.badge.bg-overdrive { background-color: #e94560 !important; }
.badge.bg-local { background-color: #198754 !important; }
.badge.bg-ps5 { background-color: #0d6efd !important; }

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1100;
}

/* Exploit status */
.exploit-status-running {
    color: #198754;
}

.exploit-status-stopped {
    color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-card-title {
        font-size: 0.85rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
}