/* file: /css/storybot-grid-genre-style.css */
/*------------------------------------------*/

/* Theme Variables */
:root {
    /* Dark Theme (Default) */
    --storybot-grid-bg-primary: #1a1a1a;
    --storybot-grid-bg-secondary: #2a2a2a;
    --storybot-grid-bg-tertiary: #3a3a3a;
    --storybot-grid-bg-card: #3a3a3a;
    --storybot-grid-bg-hover: #4b4b4b;
    
    --storybot-grid-text-primary: #c0c0c0;
    --storybot-grid-text-secondary: #e0e0e0;
    --storybot-grid-text-muted: #9a8da0;
    
    --storybot-grid-border-primary: #555;
    --storybot-grid-border-hover: #645925;
    
    --storybot-grid-shadow-light: rgba(0, 0, 0, 0.2);
    --storybot-grid-shadow-glow: rgba(208, 121, 211, 0.8);
}

/* Light Theme */
.storybot-theme-light {
    --storybot-grid-bg-primary: #ffffff;
    --storybot-grid-bg-secondary: #f8f9fa;
    --storybot-grid-bg-tertiary: #e9ecef;
    --storybot-grid-bg-card: #ffffff;
    --storybot-grid-bg-hover: #f0f0f0;
    
    --storybot-grid-text-primary: #333333;
    --storybot-grid-text-secondary: #212529;
    --storybot-grid-text-muted: #6c757d;
    
    --storybot-grid-border-primary: #dee2e6;
    --storybot-grid-border-hover: #22c55e;
    
    --storybot-grid-shadow-light: rgba(0, 0, 0, 0.1);
    --storybot-grid-shadow-glow: rgba(34, 197, 94, 0.4);
}

/* Styling for the genre grid */
.genre-grid {
    display: grid;
    gap: 20px;
    padding: 10px;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    justify-content: center; /* Centers the content of the grid */
    width: fit-content; /* Ensures the grid takes only the required space */
    margin: 0 auto; /* Centers the grid container itself */
}

/* Styling for the genre grid */
.genre-grid {
    display: grid;
    gap: 20px;
    padding: 10px;
    justify-content: center;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* Responsive grid */
}

/* Genre Card styling for dark theme with full clickable area */
.genre-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    background-color: var(--storybot-grid-bg-card);
    border: 1px solid var(--storybot-grid-border-primary);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--storybot-grid-shadow-light);
    transition: transform 0.2s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none; /* Remove underline for links */
    color: inherit; /* Inherit text color */
}

.genre-card:hover {
    transform: translateY(-5px);
    background-color: var(--storybot-grid-bg-hover);
    border-color: var(--storybot-grid-border-hover);
    box-shadow: 0 0 15px var(--storybot-grid-shadow-glow);
}

/* Genre Image styling */
.genre-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    transition: opacity 0.2s ease;
}

.genre-image:hover {
    opacity: 0.9;
}

/* Title styling */
.genre-title {
    font-size: 1.1em;
    margin: 10px 0 5px;
    color: var(--storybot-grid-text-primary);
    font-weight: bold;
    transition: color 0.3s ease;
}

/* Description styling */
.genre-description {
    font-size: 0.9em;
    color: var(--storybot-grid-text-primary);
    margin-top: 5px;
    transition: color 0.3s ease;
}


/* Mobile CSS ------------------------------------------------------------------------------------------------ */

/* Media Query for Mobile */


/* Responsive adjustments */
@media (max-width: 480px) {
    .genre-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .genre-card {
        padding: 8px;
    }

    .genre-title {
        font-size: 1em;
    }

    .genre-description {
        font-size: 0.8em;
    }
}