:root {
    --bg-deep: #0b0f19;
    --card-bg: rgba(30, 41, 59, 0.15); /* Reduced opacity for transparency */
    --border-pixel: #334155;
    --text-color: #f8fafc;
    --accent-pixel: #38bdf8;
    --accent-hover: #0284c7;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Courier New", Courier, monospace; 
    background-color: var(--bg-deep);
    color: var(--text-color);
    width: 100vw;
    height: 100vh;
    overflow: hidden; 
    position: relative;
}

/* Canvas Background */
#sky-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* --- Layout Architecture --- */
.dashboard-wrapper {
    position: relative;
    z-index: 5;
    display: flex;
    width: 100%;
    height: 100%;
    padding: 2rem;
    gap: 2.5rem;
}

.sidebar-dock {
    width: 220px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
}

.services-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.service-card {
    background-color: var(--card-bg);
    border: 2px solid var(--border-pixel);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-color);
    backdrop-filter: blur(2px); /* Lowered blur so stars are visible */
    -webkit-backdrop-filter: blur(2px);
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateX(6px);
    border-color: var(--accent-pixel);
    background-color: rgba(30, 41, 59, 0.3); /* Slightly more visible on hover */
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}

.service-card img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.service-card span {
    font-weight: bold;
    font-size: 0.9rem;
}

.comic-showcase {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; 
    gap: 1.5rem;
}

.comic-frame {
    flex: 1;
    width: 100%;
    max-width: 800px; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #05070c;
    border: 3px solid var(--border-pixel);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.comic-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Control Board Panel */
.controls-panel {
    background-color: var(--card-bg);
    border: 2px solid var(--border-pixel);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    flex-shrink: 0;
}

.pixel-btn {
    background-color: var(--accent-pixel);
    color: #0f172a;
    border: 2px solid #ffffff;
    padding: 0.5rem 1rem;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background-color 0.1s, transform 0.1s;
}

.pixel-btn:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
}

.pixel-btn:active {
    transform: scale(0.95);
}

.jump-box {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-pixel);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent input box */
}

.jump-box input {
    width: 60px;
    background: transparent;
    border: none;
    color: #ffffff;
    text-align: center;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    padding: 0.25rem;
}

.jump-box input::-webkit-outer-spin-button,
.jump-box input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.text-btn {
    border: none;
    border-radius: 0;
    padding: 0.45rem 0.9rem;
}

.credit-tag {
    position: fixed;
    bottom: 8px;
    right: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    color: rgba(148, 163, 184, 0.5);
    z-index: 10;
    pointer-events: none;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 850px) {
    body {
        overflow-y: auto; 
        height: auto;
        min-height: 100vh;
    }
    .dashboard-wrapper {
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
    }
    .sidebar-dock {
        width: 100%;
        height: auto;
    }
    .services-grid {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .service-card {
        width: calc(33% - 1rem);
        min-width: 90px;
        padding: 1rem 0.5rem;
    }
    .service-card:hover {
        transform: translateY(-4px);
    }
    .comic-showcase {
        height: 70vh; 
    }
    .credit-tag {
        position: static;
        text-align: center;
        padding: 1rem 0;
    }
}
