/* /css/history.css */
/* Styles for the main generation history page. */

.history-container {
    max-width: 64rem; /* 1024px */
    margin: 0 auto;
}

/* Page header is a shared style from profile.css, but we ensure it works here */
.page-header {
    justify-content: center; /* Center the "History" title */
}

.history-disclaimer {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* 12px */
    padding: 0.75rem 1rem;
    margin-bottom: 2rem; /* 32px */
    border-radius: 0.5rem; /* 8px */
    background-color: var(--color-background-muted);
    border: 1px solid var(--color-border);
    font-size: 0.875rem; /* 14px */
    color: var(--text-muted);
}

.history-disclaimer i {
    color: var(--color-primary-accent);
}

.history-grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem; /* 24px */
}

.history-thumbnail-main {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: var(--color-background);
    border-radius: 0.5rem; /* 8px */
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--color-border);
    transition: all 0.2s ease-in-out;
}

.history-thumbnail-main:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.07);
    border-color: var(--color-primary-accent);
}

.history-thumbnail-main img,
.history-thumbnail-main video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-thumbnail-main .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem; /* 24px */
    background-color: rgba(0,0,0,0.4);
    border-radius: 50%;
    width: 3rem; /* 48px */
    height: 3rem; /* 48px */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

.history-thumbnail-main:hover .play-icon {
    opacity: 1;
}

/* Loader styles */
#history-loader .loader-spinner-small {
    margin: 2rem auto;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 640px) {
    .history-grid-main {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem; /* 16px */
    }
}


.history-thumbnail-main .play-icon,
.history-thumbnail-main .multi-image-icon {
    position: absolute;
    color: white;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.history-thumbnail-main .play-icon {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem; /* 24px */
    width: 3rem; /* 48px */
    height: 3rem; /* 48px */
    opacity: 0.8; /* Always visible with slight transparency */
}

.history-thumbnail-main .multi-image-icon {
    bottom: 0.5rem; /* 8px */
    right: 0.5rem; /* 8px */
    font-size: 0.75rem; /* 12px */
    width: 1.75rem; /* 28px */
    height: 1.75rem; /* 28px */
    border-radius: 0.375rem; /* 6px */
    backdrop-filter: blur(2px);
}