/* Progress Page (Logbook) */
#progress-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0b0d17;
    /* Deep space background */
    z-index: 20000;
    /* Ensure on top of Navbar */
    display: none;
    /* Hidden by default */
    flex-direction: column;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    overflow-y: auto;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(20, 24, 40, 0.8) 0%, #0b0d17 100%),
        url('../img/ogg/spacepizza_ogg_640.jpg');
    /* Reuse existing asset for texture if available, or just gradients */
    background-size: cover;
    background-blend-mode: overlay;
}

#progress-page.active {
    display: flex;
}

.progress-header {
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid #3366ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.progress-header h2 {
    margin: 0;
    color: #3366ff;
    text-shadow: 0 0 10px rgba(51, 102, 255, 0.5);
    font-size: 2rem;
}

.close-btn {
    background: transparent;
    border: 2px solid #ff4444;
    color: #ff4444;
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.close-btn:hover {
    background: #ff4444;
    color: white;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

/* Dashboard Grid */
.progress-content {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding-bottom: 80px;
}

/* Planet Card */
.planet-card {
    background: rgba(16, 20, 36, 0.9);
    border: 1px solid #444;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.planet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: #6688ff;
}

.planet-card.completed {
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.planet-header {
    padding: 15px 20px;
    background: linear-gradient(90deg, rgba(51, 102, 255, 0.2) 0%, transparent 100%);
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.planet-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

.planet-progress {
    font-size: 0.9rem;
    color: #aaa;
}

.planet-progress.done {
    color: #00ff88;
}

/* Client Grid within Planet */
.client-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 20px;
    flex-grow: 1;
}

.client-slot {
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: help;
    transition: all 0.2s;
    overflow: hidden;
}

.client-slot.locked {
    color: #444;
    font-size: 1.5rem;
}

.client-slot.unlocked {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
}

.client-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-slot .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #fff;
    padding: 5px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 20;
    border-radius: 4px;
    margin-bottom: 5px;
}

.client-slot:hover .tooltip {
    opacity: 1;
}

/* Scrollbar */
#progress-page::-webkit-scrollbar {
    width: 8px;
}

#progress-page::-webkit-scrollbar-track {
    background: #0b0d17;
}

#progress-page::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

#progress-page::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .progress-content {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .client-grid {
        gap: 5px;
    }
}