/* Screenshots Page Specific Styles */
body{
    user-select: none;
    -webkit-user-select: none;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.empty-state p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

.screenshots-grid {
    display: grid;
    gap: 18px;
    padding: 10px 0;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.screenshot-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    width: 300px;
    height: 400px;
}

.screenshot-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    background: #000;
    height: 260px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    cursor: pointer; /* Show hand cursor */
    z-index: 1; /* Below overlay but clickable */
}

.screenshot-card:hover .image-wrapper img {
    transform: scale(1.08);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 24px;
    pointer-events: none !important; /* FORCE it */
    z-index: 10;
}

.screenshot-card:hover .overlay {
    opacity: 1;
}

.overlay i {
    font-size: 48px;
    color: white;
}

.card-info {
    padding: 16px;
    background: #f8fbff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.card-info .date {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 600;
    align-items: center;
    gap: 8px;
    display: flex;
    width: 100%;
}

.card-info .context {
    font-size: 14px;
    color: #555;
    margin-top: 10px;
    font-style: italic;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.card-info i {
    color: #3498db;
}


/* Header Improvements */
.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-title i {
    font-size: 36px;
    color: #3498db;
}

.header-info {
    margin-top: 15px;
    font-size: 16px;
    color: #7f8c8d;
}

.total-count {
    background: #e8f4fd;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: #2980b9;
}

/* Lightbox for full-screen view */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    cursor: zoom-out;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    cursor: grab;
}

.lightbox-content.dragging {
    cursor: grabbing; /* Optional fallback */
}

.caption {
    margin-top: 20px;
    color: #eee;
    font-size: 18px;
    text-align: center;
    max-width: 80%;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-btn:hover {
    opacity: 0.6;
}

/* Image loading */

@keyframes loading {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

.image-wrapper img[loaded] {
    animation: none;
    background: none;
}

.overlay i {
    font-size: 50px;
}

.remote-control {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
}

.control-buttons {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 18px;
    border-radius: 12px;
}

.image-wrapper img:not([loaded]) {
    background: #f0f0f0;
    background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
    background-size: 20px 20px;
    animation: loading 1.5s linear infinite;
}

@keyframes loading {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

.delete-btn-card {
    width: 100%;
    border: 0;
    outline: 0;
    background: #e74c3c;
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    color: #fff;
    font-weight: 500;
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn-card ion-icon {
    font-size: 20px;
    padding-right: 6px;
}

.card-data {
    display: flex;
    flex-direction: column;
    align-content: flex-start;
    align-items: flex-start;
    gap: 10px;
}

.delete-btn-card:hover {
    background: #c0392b;
}

select#appFilter {
    outline: 0;
}

.card-data .app-name p{
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    color: #3498db;
    font-weight: bold;
}

.card-data .app-name {
    display: flex;
    align-items: center;
    align-content: flex-start;
    gap: 6px;
}

.app-name ion-icon {
    font-size: 22px;
    display: block;
    max-width: 50px;
    min-width: 23px;
    color: #3498db;
}

.card-info .date ion-icon {
    color: #3498db;
    font-size: 22px;
    min-width: 23px;
}

.card-info .date p {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .screenshots-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-info {
        padding: 15px;
    }
}
