/* Project Gallery Styles */

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.project-card {
    background: rgba(0, 40, 0, 0.3);
    border: 1px solid #00ff00;
    border-radius: 4px;
    padding: 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    background: rgba(0, 60, 0, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 0, 0.1);
}

.project-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #00ff00;
}

.project-tech {
    font-size: 12px;
    color: #00cc00;
    margin-bottom: 10px;
}

.project-thumbnail {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    margin-bottom: 10px;
    border: 1px solid #005500;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}


.project-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 30, 0, 0.1), rgba(0, 30, 0, 0.4));
    z-index: 1;
    transition: all 0.3s ease;
}

.project-card:hover .project-thumbnail::before {
    background: linear-gradient(rgba(0, 50, 0, 0.1), rgba(0, 50, 0, 0.3));
}

.terminal-text {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 15px;
    flex-grow: 1;
}

.view-gallery-btn {
    background: #006600;
    color: #00ff00;
    border: 1px solid #00ff00;
    border-radius: 3px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    align-self: flex-end;
}

.view-gallery-btn:hover {
    background: #008800;
    transform: scale(1.05);
}

/* Gallery Window Styles */
.gallery-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.gallery-header {
    padding: 10px 15px;
    border-bottom: 1px solid #00aa00;
}

.gallery-title {
    font-size: 20px;
    font-weight: bold;
    color: #00ff00;
    margin: 10px 0;
}

.gallery-description {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.tech-label {
    color: #00cc00;
    font-weight: bold;
}

.gallery-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow: hidden;
}

.gallery-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.gallery-btn {
    background: #004400;
    color: #00ff00;
    border: 1px solid #00aa00;
    border-radius: 3px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-btn:hover {
    background: #006600;
}

.gallery-image-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 1px solid #006600;
    background: #001800;
    margin-bottom: 10px;
    position: relative;
}

#gallery-image {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.gallery-caption {
    text-align: center;
    font-style: italic;
    font-size: 13px;
    color: #00cc00;
    margin-bottom: 15px;
}

.gallery-thumbs {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    gap: 10px;
    border-top: 1px solid #006600;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    background-size: cover;
    background-position: center;
    border: 1px solid #004400;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.gallery-thumb:hover {
    transform: translateY(-3px);
    border-color: #00aa00;
}

.gallery-thumb.selected {
    border: 2px solid #00ff00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

/* Add a placeholder for missing images */
.gallery-thumb::before,
#gallery-image::before {
    content: '█▓▒░';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #006600;
    font-size: 24px;
    opacity: 0.3;
}

/* Gallery Lightbox */
#gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.lightbox-overlay {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(0, 40, 0, 0.8);
    color: #00ff00;
    border: 1px solid #00ff00;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(0, 60, 0, 0.9);
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
    }

    .gallery-thumbs {
        justify-content: flex-start;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
    }

    .lightbox-overlay {
        max-width: 95vw;
        max-height: 95vh;
    }
}
