/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.gallery-item {
    background: #f0f0f0;
    border: 1px solid #808080;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}

.gallery-item:hover {
    background: #e0e0e0;
}

.gallery-item-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.gallery-item-label {
    font-size: 11px;
    color: #333;
    font-weight: bold;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.skill-category {
    background: #f5f5f5;
    padding: 15px;
    border: 1px solid #ccc;
    border-left: 4px solid #0054e3;
}

.skill-category h3 {
    font-size: 12px;
    color: #0054e3;
    margin-bottom: 8px;
}

.skill-category p {
    font-size: 11px;
    line-height: 1.5;
}


.viewer-btn {
    background: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);
    border: 1px solid;
    border-color: #fff #808080 #808080 #fff;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 11px;
    min-width: 36px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.viewer-btn:hover {
    background: linear-gradient(to bottom, #f0f0f0 0%, #d0d0d0 100%);
}

.viewer-btn:active {
    background: linear-gradient(to bottom, #d0d0d0 0%, #e0e0e0 100%);
    border-color: #808080 #fff #fff #808080;
}

#image-viewer .window-content {
    background: #f0f0f0;
    position: fixed !important;

    
}


#viewer-image {
    cursor: grab;
}

#viewer-image:active {
    cursor: grabbing;
    background: linear-gradient(to bottom, #d0d0d0 0%, #e0e0e0 100%);
    border-color: #808080 #fff #fff #808080;
}



/* Mobile landscape */
@media (max-width: 768px) and (orientation: landscape) {
    #image-viewer {
        width: 95vw !important;
        height: 92vh !important;
    }
    
    .viewer-separator {
        display: none !important;
    }
}

/* Mobile portrait */
@media (max-width: 768px) and (orientation: portrait) {
    #image-viewer {
        width: 96vw !important;
        height: 90vh !important;
    }
    
    .viewer-btn {
        min-width: 32px !important;
        height: 28px !important;
        padding: 4px !important;
        font-size: 14px !important;
    }
    
    .viewer-title {
        font-size: 10px !important;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
/* Small phones */
@media (max-width: 480px) {
    #image-viewer {
        width: 100vw !important;
        height: 100vh !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
    }
    
    .viewer-btn span {
        font-size: 14px !important;
    }
    
    .viewer-toolbar {
        padding: 3px 5px !important;
        gap: 3px !important;
    }
    
    .viewer-status {
        font-size: 9px !important;
        padding: 3px 5px !important;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    #image-viewer {
        width: 92vw !important;
        height: 88vh !important;
    }
}
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 5px;
    }
}

.gallery-item {
    background: #ffffff;
    border: 1px solid #c0c0c0;
    padding: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.gallery-item:hover {
    background: #e8f4f8;
    border-color: #0054e3;
    box-shadow: 0 0 4px rgba(0, 84, 227, 0.3);
}

.gallery-item:active {
    background: #cce8ff;
}

.gallery-thumbnail {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
    margin-bottom: 6px;
    overflow: hidden;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-icon {
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Mobile icon size */
@media (max-width: 480px) {
    .gallery-item-icon {
        font-size: 32px;
    }
}

.gallery-item-label {
    font-size: 10px;
    color: #000;
    font-weight: normal;
    margin-bottom: 2px;
    word-break: break-word;
    width: 100%;
    line-height: 1.2;
}

.gallery-item-size {
    font-size: 8px;
    color: #666;
}

/* Mobile text adjustments */
@media (max-width: 480px) {
    .gallery-item-label {
        font-size: 9px;
    }
    
    .gallery-item-size {
        font-size: 7px;
    }
}
