/* enhanced-styles.css - Refactored for new sidebar toggle and layout fixes */

/* === VARIABLE DEFINITIONS (Ensure these are defined in theme.css or here) === */
:root {
    --font-display: 'Pirata One', cursive;
    --color-background-input: rgba(30, 41, 59, 0.9);
    --color-text-primary: #f3f4f6;
    --color-text-secondary: #9ca3af;
    --color-text-placeholder: #6b7280;
    --color-border: #374151;
    --color-border-light: #4b5563;
    --color-primary: #f87171; /* Example primary color (reddish) */
    --color-accent: #f87171; /* Accent color, can be same as primary or different */
    --color-accent-light: #fb923c;
    --color-background-panel: #1e293b;
    --color-background-alt: #0f172a;
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-md: 0.375rem;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-4: 1rem;
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --text-sm: 0.875rem;
    /* Variables from index.html for layout consistency */
    --header-height: 80px;
    --nav-height: 60px;
    --footer-height: 60px;
}

/* === HEADER ENHANCEMENTS === */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    gap: 1rem;
    width: 100%;
    max-width: none;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto; 
}
#discords-button-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Specific styling for info button in header */
#discords-button-container .key-info-button,
#discords-button-container #key-info-button {
    background-color: #43084e !important;
    color: white !important;
    border: 1px solid #34063a !important;
}

#discords-button-container .key-info-button:hover,
#discords-button-container #key-info-button:hover {
    background-color: #9800df !important;
    color: white !important;
    border-color: #a002e9 !important;
    transform: translateY(-1px);
}

#access-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* === FLICKERING TITLE EFFECT === */
.title-glow {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 4vw, 2rem);
    color: #ff2600; 
    text-shadow: 
        0 0 2px #ff8800,
        0 0 4px #ff0000,
        0 0 6px #4a5568;
    animation: flicker 3s infinite alternate;
}

@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 
            0 0 2px #4a5568,
            0 0 4px #4a5568,
            0 0 6px #4a5568,
            0 0 8px #ff2600, 
            0 0 10px #ff8800;
        opacity: 1;
    }
    20%, 24%, 55% {
        text-shadow: 
            0 0 1px #2d3748,
            0 0 2px #2d3748,
            0 0 3px #2d3748,
            0 0 5px #ff2600; 
        opacity: 0.7;
    }
}

/* Hide the logo */
.logo {
    display: none;
}

/* === SEARCH FUNCTIONALITY === */
.search-container {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border-radius: 0.375rem;
    background-color: var(--color-background-input);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2);
}

.search-input::placeholder {
    color: var(--color-text-placeholder);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    pointer-events: none;
    font-size: 0.875rem;
    z-index: 1;
}

.clear-search {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    z-index: 2;
    background: var(--color-background-input);
    padding: 0.25rem;
    border-radius: 50%;
}

.clear-search:hover {
    color: var(--color-text-primary);
}

/* === BUTTON STYLES === */
.access-button, .discord-button {
    background-color: rgba(107, 114, 128, 0.2);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    height: 36px; 
}

.access-button:hover, .discord-button:hover {
    background-color: rgba(107, 114, 128, 0.4);
    color: var(--color-text-primary);
    border-color: var(--color-accent);
}

.key-info-button {
    background-color: #43084e !important;
    color: white !important;
    border: 1px solid #34063a !important;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    height: 36px; 
}

.key-info-button:hover,
#key-info-button:hover,
button.key-info-button:hover {
    background-color: #9800df !important;
    color: white !important;
    border-color: #a002e9 !important;
    transform: translateY(-1px);
}

#submission-button {
    background-color: #43084e;
    color: white;
    border-color: #34063a;
    font-weight: 600;
}

#submission-button:hover {
    background-color: #9800df;
    border-color: #a002e9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.discord-button {
    background-color: #43084e;
    color: white;
    border-color: #34063a;
}

.discord-button:hover {
    background-color: #9800df;
    border-color: #a002e9;
    transform: translateY(-1px);
}

.settings-button {
    background-color: rgba(107, 114, 128, 0.2);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 36px; 
}

.settings-button:hover {
    background-color: rgba(107, 114, 128, 0.4);
    color: var(--color-text-primary);
    border-color: var(--color-accent);
}

/* === FIXED HEADER AND FOOTER LAYOUT === */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-background, #0a101e);
    color: var(--color-text-primary, #f3f4f6);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex; 
    flex-direction: column; 
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height); 
    z-index: 1000;
    background-color: var(--color-background-panel); 
    box-shadow: var(--shadow-lg); 
    border-bottom: 1px solid var(--color-border); 
}

.app-set-navigation {
    position: fixed;
    top: var(--header-height); 
    left: 0;
    right: 0;
    height: var(--nav-height); 
    z-index: 999;
    background-color: rgba(17, 24, 39, 0.95); 
    padding: var(--space-2) var(--space-4); 
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
    overflow-x: auto; 
    overflow-y: hidden; 
    scrollbar-width: thin; 
}

.app-main-content {
    position: fixed; 
    top: calc(var(--header-height) + var(--nav-height)); 
    left: 0;
    right: 0;
    bottom: var(--footer-height); 
    display: flex;
    overflow: hidden;
}

.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height); 
    z-index: 1000;
    background-color: var(--color-background-panel); 
    border-top: 1px solid var(--color-border); 
    padding: 1rem 1.5rem; 
}

.app-gallery-area {
    flex-grow: 1; 
    padding: var(--space-4); 
    overflow-y: auto;
    height: 100%; 
}

/* === SIDEBAR AND NEW TOGGLE STYLES === */
.app-sidebar {
    position: relative; 
    width: 280px; 
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--color-background-panel);
    padding: var(--space-4);
    overflow-y: auto;
    height: 100%; 
    border-right: 1px solid var(--color-border);
    transition: width 0.3s ease, padding-left 0.3s ease, padding-right 0.3s ease;
}

.app-sidebar.collapsed {
    width: 10px;
    padding-left: 0;
    padding-right: 0;
    border-right: none;
    overflow: visible !important; 
}

.sidebar-content {
    transition: opacity 0.2s ease 0.1s, visibility 0s ease 0.3s; 
    opacity: 1;
    visibility: visible;
}

.app-sidebar.collapsed .sidebar-content {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s ease 0.2s; 
}

.sidebar-toggle {
    position: absolute;
    top: 50%; 
    right: -10px; 
    transform: translateY(-50%); 
    width: 20px; 
    height: 70px; 
    background-color: rgba(75, 85, 99, 0.6); 
    border-radius: 0 var(--radius-md) var(--radius-md) 0; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100; 
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border-light);
    border-left: none; 
    transition: background-color 0.2s ease, right 0.3s ease; 
}

.app-sidebar.collapsed .sidebar-toggle {
   right: -10px; 
}

.sidebar-toggle:hover {
    background-color: rgba(107, 114, 128, 0.8); 
}

.sidebar-toggle i {
    font-size: 1.1rem; 
    color: #ff2600; 
    text-shadow: 
        0 0 3px #ff8800,
        0 0 5px #ff0000,
        0 0 7px #ff0000,
        0 0 10px #ff2600;
    animation: subtle-glow 2s infinite alternate;
    transition: transform 0.3s ease;
}

.app-sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg); 
}

@keyframes subtle-glow {
    from {
        text-shadow: 
            0 0 2px #ff8800,
            0 0 3px #ff0000,
            0 0 5px #ff0000,
            0 0 7px #ff2600;
    }
    to {
        text-shadow: 
            0 0 3px #ff8800,
            0 0 5px #ff0000,
            0 0 8px #ff0000,
            0 0 12px #ff2600,
            0 0 15px #ff8800;
    }
}

/* === GALLERY CONTROLS (Original styles - now hidden) === */
.gallery-controls {
   display: none !important; /* Hide the original gallery controls bar */
}


/* === STYLES FOR MOVED CONTROLS WITHIN SIDEBAR === */
.app-sidebar .filter-group .slider-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* var(--space-3) if defined, or 0.75rem */
    width: 100%;
    margin-top: 0.25rem; /* Small space below label */
}

.app-sidebar .size-control-slider {
    flex-grow: 1; /* Slider takes available space */
    width: auto; /* Override fixed width */
    height: 8px;
    background: rgba(75, 85, 99, 0.3);
    border-radius: 4px;
    outline: none;
    opacity: 0.8;
    transition: opacity 0.2s;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    margin: 0; /* Remove original margins */
}

.app-sidebar .size-control-slider:hover {
    opacity: 1;
}

.app-sidebar .size-control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.app-sidebar .size-control-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.app-sidebar .size-control-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease;
}

.app-sidebar .size-control-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.app-sidebar .size-value-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; /* Keep original size or adjust if needed */
    height: 28px;
    background-color: var(--color-background-input); /* Match other inputs in sidebar */
    border: 1px solid var(--color-border);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-primary);
    flex-shrink: 0; /* Prevent shrinking */
}

.app-sidebar .stats-wrapper {
    margin-top: var(--space-2); /* Space above stats if in same group */
}
.app-sidebar #search-stats {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    padding: var(--space-1) 0;
    text-align: left; /* Align with other filter content */
}


/* === TAB FIXES === */
#tab-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: var(--space-1);
    max-width: 100%;
    padding-bottom: var(--space-1);
}

.tab {
    background-color: transparent;
    color: var(--color-text-secondary);
    border: 1px solid transparent;
    border-bottom: 3px solid transparent;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast) ease;
    white-space: nowrap;
    position: relative;
}

.tab:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--color-text-primary);
    border-bottom-color: rgba(255,255,255,0.1);
}

.tab.active {
    background-color: rgba(90, 8, 102, 0.15);
    color: var(--color-primary);
    border-color: var(--color-border-light);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

/* === CARD GLOW EFFECTS === */
.thumbnail {
    position: relative;
    background-color: rgba(30, 41, 59, 0.8);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 2.5 / 3.5;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast) ease-out, 
                box-shadow var(--transition-fast) ease-out;
    will-change: transform, box-shadow;
}

.thumbnail:hover, 
.thumbnail:focus-visible {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 
        var(--shadow-xl),
        0 0 20px rgba(248, 113, 113, 0.4),
        0 0 40px rgba(248, 113, 113, 0.2);
    outline: none;
}

.thumbnail:focus-visible {
    border: 2px solid var(--color-accent);
}

.thumbnail.holo-active {
    box-shadow: 
        var(--shadow-xl),
        0 0 25px rgba(248, 113, 113, 0.5),
        0 0 50px rgba(248, 113, 113, 0.3);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity var(--transition-normal) ease-in-out;
}

.thumbnail img.loaded {
    opacity: 1;
}

/* === FOOTER === */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 2rem;
}

.footer-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.footer-link:hover {
    color: var(--color-text-primary);
}

.copyright {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.copyright a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.copyright a:hover {
    color: var(--color-accent-light);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
    .app-main-content {
        flex-direction: column;
    }
    
    .app-sidebar { 
        width: 100%;
        max-height: 40vh; 
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        overflow: visible !important; 
    }
    
    .app-sidebar.collapsed { 
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-bottom: none;
        overflow: hidden !important; 
    }
    
    .sidebar-toggle {
        top: auto; 
        bottom: -22px; 
        left: 50%;
        right: auto;
        transform: translateX(-50%) rotate(0deg); 
        width: 44px; 
        height: 20px; 
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        border: 1px solid var(--color-border);
        border-top: none;
    }

    .app-sidebar.collapsed .sidebar-toggle {
        bottom: -22px; 
    }

    .sidebar-toggle i {
        transform: rotate(-90deg); 
    }
    .app-sidebar.collapsed .sidebar-toggle i {
        transform: rotate(90deg); 
    }

    /* Adjustments for slider in responsive sidebar */
    .app-sidebar .filter-group .slider-wrapper {
        max-width: 300px; /* Prevent it from becoming too wide */
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    :root { /* Update header height for mobile if it wraps */
        --header-height-mobile: 120px; /* Example, adjust based on actual wrapped height */
    }
    .app-header { /* Apply mobile header height */
         /* height: var(--header-height-mobile); */ /* This might be better handled by content flow */
    }
    .app-set-navigation {
        /* top: var(--header-height-mobile); */
    }
    .app-main-content {
        /* top: calc(var(--header-height-mobile) + var(--nav-height)); */
    }

    .header-content {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.5rem 1rem;
    }
    
    .brand-area {
        flex: 1 1 100%;
        order: 1;
        justify-content: center;
    }
    
    .search-container {
        flex: 1 1 100%;
        order: 3;
        width: 100%;
    }
    
    .header-actions {
        order: 2;
        gap: 0.5rem;
        flex: 1 1 100%;
        justify-content: center;
    }
    
    .discord-button span,
    .access-button span {
        display: none;
    }
    
    .discord-button,
    .access-button,
    .key-info-button,
    .settings-button {
        padding: 0.5rem;
        width: 36px;
    }
        
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        align-items: center;
    }
    
    .footer-section {
        align-items: center;
        width: 100%;
        justify-content: center;
    }
    
    .footer-links {
        justify-content: center;
        gap: 1rem;
    }
}

/* Lightbox and other styles from previous enhanced-styles, assuming they are still needed */
.fancy-card-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

#fancy-holo-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

#fancy-card-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2);
}

#item-gallery.gallery-size-xs { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.5rem; }
#item-gallery.gallery-size-s { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem; }
#item-gallery.gallery-size-m { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
#item-gallery.gallery-size-l { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.25rem; }
#item-gallery.gallery-size-xl { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.5rem; }

/* Ensure filter labels are consistent */
.filter-label {
    display: block;
    margin-bottom: 0.25rem; /* var(--space-1) */
    font-size: var(--text-sm);
    font-weight: 500; /* Medium weight */
    color: var(--color-text-secondary);
}

/* General styling for filter groups if not already present in theme.css */
.filter-group {
    margin-bottom: var(--space-4); /* 1rem */
}

.filter-select { /* Assuming a base style for select elements */
    width: 100%;
    padding: 0.5rem 0.75rem; /* var(--space-2) var(--space-3) */
    background-color: var(--color-background-input);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb, 248, 113, 113), 0.2); /* Define --color-primary-rgb if needed */
}

.filter-separator {
    height: 5px;
    background-color: var(--color-border);
    margin: var(--space-6) 0; /* This is 1rem top/bottom, 0 left/right */
    opacity: 0.6;
}

/* Like Button Styles */
.gallery-like-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 0.375rem;
    width: auto;
    height: auto;
    padding: 0.375rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    color: white;
    font-size: 0.875rem;
    backdrop-filter: blur(4px);
}

.gallery-like-button:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
}

.gallery-like-button.liked {
    background: rgba(0, 0, 0, 0.6);
}

.gallery-like-button .fa-heart {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.gallery-like-button .fa-heart.liked {
    color: #ff6b6b;
}

.gallery-like-button:hover .fa-heart {
    color: #ff6b6b;
}

.gallery-like-button .like-count {
    margin-left: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.gallery-like-button.liked .like-count {
    color: white;
}

/* Lightbox Like Button */
.fancy-action-button.like-button {
    position: relative;
    background-color: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
}

.fancy-action-button.like-button:hover {
    background-color: rgba(0, 0, 0, 0.7) !important;
    transform: scale(1.05) !important;
}

.fancy-action-button.like-button.liked {
    background-color: rgba(0, 0, 0, 0.6) !important;
}

.fancy-action-button.like-button .fa-heart {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.fancy-action-button.like-button .fa-heart.liked {
    color: #ff6b6b;
}

.fancy-action-button.like-button:hover .fa-heart {
    color: #ff6b6b;
}

.fancy-action-button .like-count {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    min-width: 1.25rem;
}

.fancy-action-button .like-count:empty {
    display: none;
}

/* Thumbnail positioning for like button */
.thumbnail {
    position: relative;
}

/* ===== TYPE AND ENERGY ICONS ===== */
/* Styles for type icons used in weakness, resistance, retreat costs, and attack costs */

.energy-icon, .type-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.energy-icon:hover, .type-icon:hover {
    transform: scale(1.1);
}

/* Attack cost container */
.attack-cost {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 4px;
}

.attack-cost .energy-icon {
    width: 18px;
    height: 18px;
}

/* Weakness and resistance styling */
.weakness-container, .resistance-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.weakness-container .type-icon,
.resistance-container .type-icon {
    width: 22px;
    height: 22px;
}

/* Retreat cost styling */
.retreat-cost-container {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.retreat-cost-container .energy-icon {
    width: 18px;
    height: 18px;
}

/* Lightbox specific sizing */
.fancy-lightbox .energy-icon,
.fancy-lightbox .type-icon {
    width: 20px;
    height: 20px;
}

.fancy-lightbox .attack-cost .energy-icon {
    width: 16px;
    height: 16px;
}

/* Card type badges in lightbox */
.card-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin: 2px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    background-color: var(--color-primary, #dc2626);
    gap: 4px; /* Add gap between icon and text */
}

/* Inline type icons within badges */
.type-icon-inline {
    width: 16px;
    height: 16px;
    display: inline-block;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Type-specific badge colors */
.card-type-badge.type-grass { background-color: #4ade80; }
.card-type-badge.type-fire { background-color: #ef4444; }
.card-type-badge.type-water { background-color: #3b82f6; }
.card-type-badge.type-lightning,
.card-type-badge.type-electric { background-color: #eab308; }
.card-type-badge.type-psychic { background-color: #a855f7; }
.card-type-badge.type-fighting { background-color: #f97316; }
.card-type-badge.type-darkness,
.card-type-badge.type-dark { background-color: #374151; }
.card-type-badge.type-metal { background-color: #6b7280; }
.card-type-badge.type-dragon { background-color: #7c3aed; }
.card-type-badge.type-fairy { background-color: #ec4899; }
.card-type-badge.type-colorless,
.card-type-badge.type-neutral,
.card-type-badge.type-normal { background-color: #9ca3af; }

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .energy-icon, .type-icon {
        width: 18px;
        height: 18px;
    }
    
    .attack-cost .energy-icon {
        width: 16px;
        height: 16px;
    }
    
    .weakness-container .type-icon,
    .resistance-container .type-icon {
        width: 20px;
        height: 20px;
    }
    
    .type-icon-inline {
        width: 14px;
        height: 14px;
    }
}

/* ===== ATTACK AND ABILITY STYLING ===== */
/* Modern card-like boxes for attacks and abilities */

.attack-box, .ability-box {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(51, 65, 85, 0.6));
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.attack-box:hover, .ability-box:hover {
    border-color: rgba(248, 113, 113, 0.3);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.attack-box::before, .ability-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary, #f87171), var(--color-accent, #fb923c));
    border-radius: 12px 12px 0 0;
}

/* Attack Header Layout */
.attack-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.attack-cost-icons {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    min-height: 32px;
}

.attack-name-damage {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-grow: 1;
}

.attack-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.attack-damage {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent, #fb923c);
    background: rgba(251, 146, 60, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.attack-description {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(148, 163, 184, 0.3);
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
}

/* Ability Header Layout */
.ability-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.ability-name-damage {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-grow: 1;
}

.ability-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.ability-damage {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent, #fb923c);
    background: rgba(251, 146, 60, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.ability-type-icon {
    width: auto;
    height: 26px;
    display: inline-block;
    vertical-align: baseline;
    margin-top: 6px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    max-width: 80px;
    flex-shrink: 0;
    outline: none;
    border: none;
}

/* Special styling for forte ability icons to remove outlines */
.ability-type-icon[src*="Forte"] {
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
    background: transparent !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.ability-type-icon[src*="Forte"]:hover,
.ability-type-icon[src*="Forte"]:focus,
.ability-type-icon[src*="Forte"]:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    transform: none !important;
}

/* Only hover effect for ability icons (not forte icons) */
.ability-type-icon:hover:not([src*="Forte"]) {
    transform: scale(1.1);
}

.ability-type {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-accent, #fb923c);
    background: rgba(251, 146, 60, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(251, 146, 60, 0.3);
    flex-shrink: 0;
}

/* Type-based gradients for attack and ability boxes */
.attack-box.type-grass::before, .ability-box.type-grass::before {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.attack-box.type-fire::before, .ability-box.type-fire::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.attack-box.type-water::before, .ability-box.type-water::before {
    background: linear-gradient(90deg, #0ea5e9, #0284c7);
}

.attack-box.type-lightning::before, .ability-box.type-lightning::before,
.attack-box.type-electric::before, .ability-box.type-electric::before {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.attack-box.type-psychic::before, .ability-box.type-psychic::before {
    background: linear-gradient(90deg, #c084fc, #a855f7);
}

.attack-box.type-fighting::before, .ability-box.type-fighting::before {
    background: linear-gradient(90deg, #fb923c, #f97316);
}

.attack-box.type-darkness::before, .ability-box.type-darkness::before,
.attack-box.type-dark::before, .ability-box.type-dark::before {
    background: linear-gradient(90deg, #7c3aed, #5b21b6);
}

.attack-box.type-metal::before, .ability-box.type-metal::before {
    background: linear-gradient(90deg, #64748b, #475569);
}

.attack-box.type-dragon::before, .ability-box.type-dragon::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.attack-box.type-fairy::before, .ability-box.type-fairy::before {
    background: linear-gradient(90deg, #f472b6, #ec4899);
}

.attack-box.type-colorless::before, .ability-box.type-colorless::before,
.attack-box.type-neutral::before, .ability-box.type-neutral::before,
.attack-box.type-normal::before, .ability-box.type-normal::before {
    background: linear-gradient(90deg, #a1a1aa, #71717a);
}

/* Type-based Pokemon name coloring */
#lb-card-name.type-grass, #card-title-lightbox.type-grass { color: #22c55e !important; background-color: transparent !important; }
#lb-card-name.type-fire, #card-title-lightbox.type-fire { color: #ef4444 !important; background-color: transparent !important; }
#lb-card-name.type-water, #card-title-lightbox.type-water { color: #0ea5e9 !important; background-color: transparent !important; }
#lb-card-name.type-lightning, #card-title-lightbox.type-lightning,
#lb-card-name.type-electric, #card-title-lightbox.type-electric { color: #fbbf24 !important; background-color: transparent !important; }
#lb-card-name.type-psychic, #card-title-lightbox.type-psychic { color: #c084fc !important; background-color: transparent !important; }
#lb-card-name.type-fighting, #card-title-lightbox.type-fighting { color: #fb923c !important; background-color: transparent !important; }
#lb-card-name.type-darkness, #card-title-lightbox.type-darkness,
#lb-card-name.type-dark, #card-title-lightbox.type-dark { color: #7c3aed !important; background-color: transparent !important; }
#lb-card-name.type-metal, #card-title-lightbox.type-metal { color: #64748b !important; background-color: transparent !important; }
#lb-card-name.type-dragon, #card-title-lightbox.type-dragon { color: #8b5cf6 !important; background-color: transparent !important; }
#lb-card-name.type-fairy, #card-title-lightbox.type-fairy { color: #f472b6 !important; background-color: transparent !important; }
#lb-card-name.type-colorless, #card-title-lightbox.type-colorless,
#lb-card-name.type-neutral, #card-title-lightbox.type-neutral,
#lb-card-name.type-normal, #card-title-lightbox.type-normal { color: #a1a1aa !important; background-color: transparent !important; }

.ability-description {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    background: rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid var(--color-primary, #f87171);
}

/* Energy icons in attack cost */
.attack-cost-icons .energy-icon {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Section containers */
.fancy-lightbox #lb-abilities-container,
.fancy-lightbox #lb-attacks-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbar for attack/ability containers */
.fancy-lightbox #lb-abilities-container::-webkit-scrollbar,
.fancy-lightbox #lb-attacks-container::-webkit-scrollbar {
    width: 6px;
}

.fancy-lightbox #lb-abilities-container::-webkit-scrollbar-track,
.fancy-lightbox #lb-attacks-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.fancy-lightbox #lb-abilities-container::-webkit-scrollbar-thumb,
.fancy-lightbox #lb-attacks-container::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 3px;
}

.fancy-lightbox #lb-abilities-container::-webkit-scrollbar-thumb:hover,
.fancy-lightbox #lb-attacks-container::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .attack-box, .ability-box {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .attack-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .attack-cost-icons {
        align-self: flex-start;
    }
    
    .attack-name {
        font-size: 1rem;
    }
    
    .attack-damage {
        font-size: 0.875rem;
    }
    
    .attack-description, .ability-description {
        font-size: 0.8rem;
    }
    
    .ability-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Forte stage styling - table layout */
.forte-stage-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.forte-stage-text {
    color: #7c3aed;
    font-weight: 600;
    min-width: 60px;
}

.forte-stage-icon {
    width: auto;
    height: 36px;
    display: inline-block;
    vertical-align: middle;
    border-radius: 0;
    max-width: 110px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    cursor: default;
    background: transparent !important;
}

.forte-stage-icon:hover,
.forte-stage-icon:focus,
.forte-stage-icon:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Forte title styling */
.forte-title-text {
    color: #7c3aed;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Attack forte icon */
.attack-forte-icon {
    width: auto;
    height: 26px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.5rem;
    border-radius: 0;
    max-width: 80px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    flex-shrink: 0;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    cursor: default;
    background: transparent !important;
}

.attack-forte-icon:hover,
.attack-forte-icon:focus,
.attack-forte-icon:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}