/* ----------------------------
   MONITOR OVERLAY
---------------------------- */

#monitorOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#monitorOverlay.visible {
    opacity: 1;
}

#monitorScreen {
    width: 90vw;
    height: 90vh;
    background: #111;
    border-radius: 16px;
    padding: 48px 40px 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#monitorCloseBtn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
    z-index: 10;
}

.projectCover {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 14px;
}

#monitorCloseBtn:hover {
    opacity: 1;
}

/* ----------------------------
   PROJECT GRID
---------------------------- */

#projectGrid {
    display: grid;
    gap: 20px;
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.projectCard {
    background: #1e1e1e;
    border-radius: 12px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;  /* push text to bottom */
    overflow: hidden;
    position: relative;
}

.projectCover {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.projectCard:hover .projectCover {
    transform: scale(1.05);  /* subtle zoom on hover */
}

/* dark gradient at bottom so text is readable */
.projectCardInner {
    position: relative;
    z-index: 1;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
}

.projectCard.visible {
    opacity: 1;
    transform: translateY(0);
}

.projectCard:hover {
    background: #2a2a2a;
}

.projectTitle {
    color: white;
    font-size: 18px;
    margin: 0 0 6px;
}

.projectDesc {
    color: #ccc;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}
/* ----------------------------
   PROJECT DETAIL VIEW
---------------------------- */

#projectDetailOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#projectDetailOverlay.visible {
    opacity: 1;
}

#projectDetail {
    width: 85vw;
    height: 85vh;
    background: #111;
    border-radius: 16px;
    padding: 40px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "back  back"
        "carousel info"
        "carousel info";
    gap: 24px;
    overflow: hidden;
}

#detailBackBtn {
    grid-area: back;
    background: none;
    border: none;
    color: #aaa;
    font-size: 15px;
    cursor: pointer;
    text-align: left;
    padding: 0;
    width: fit-content;
}

#detailBackBtn:hover {
    color: white;
}

/* ----------------------------
   CAROUSEL
---------------------------- */

#detailCarousel {
    grid-area: carousel;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

#carouselImg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.carouselBtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 6px;
    z-index: 2;
    transition: background 0.2s ease;
}

.carouselBtn:hover {
    background: rgba(0, 0, 0, 0.8);
}

#carouselPrev {
    left: 10px;
}

#carouselNext {
    right: 10px;
}

#carouselDots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carouselDot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.2s ease;
}

.carouselDot.active {
    background: white;
}

/* ----------------------------
   DETAIL INFO
---------------------------- */

#detailInfo {
    grid-area: info;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding-left: 12px;
}

#detailTitle {
    color: white;
    font-size: 28px;
    margin: 0;
}

#detailDesc {
    color: #bbb;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

#detailLink {
    display: inline-block;
    color: white;
    background: #2a2a2a;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    width: fit-content;
    transition: background 0.2s ease;
}

#detailLink:hover {
    background: #3a3a3a;
}