/**
 * Custom styles for Meme Trend Dashboard
 * Improved version with optimized layout for better UX
 * Includes styles for introvert meme tracking
 */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    border-radius: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Spotlight Images */
.spotlight-img {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* Gallery Images */
.gallery-img {
    height: 180px;
    object-fit: cover;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* Meme Items */
.meme-item {
    cursor: pointer;
    transition: transform 0.2s;
}

.meme-item:hover {
    transform: translateY(-5px);
}

/* Introvert Meme Styles */
.introvert-meme .card {
    border-color: #13cff0;
}

.introvert-meme .card:hover {
    box-shadow: 0 0.5rem 1rem rgba(13, 202, 240, 0.2) !important;
}

/* Writer Insights */
.writer-insights-card {
    border-left: 4px solid #0d6efd;
}

.keyword-badge {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 1rem;
    background-color: #f8f9fa;
    color: #212529;
    display: inline-block;
}

/* Compact Layout Optimizations */
.compact-card {
    margin-bottom: 1rem;
}

.compact-card .card-body {
    padding: 1rem;
}

.compact-card .card-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .spotlight-img, .gallery-img {
        height: 150px;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* List View */
.list-view .meme-item {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

.list-view .card {
    flex-direction: row;
}

.list-view .gallery-img {
    width: 120px;
    height: 120px;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0.5rem;
}

.list-view .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading-pulse {
    animation: pulse 1.5s infinite ease-in-out;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Engagement Radar Chart */
.radar-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.radar-legend-item {
    display: flex;
    align-items: center;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.radar-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.25rem;
}

/* Writer Insights Panel */
#writer-insights .card {
    border-left: 4px solid #0d6efd;
}

.insight-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem;
    border-radius: 1rem;
    background-color: #f8f9fa;
    font-size: 0.875rem;
}

/* Tooltip Customization */
.custom-tooltip {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    max-width: 200px;
}

/* Introvert Meme Insights */
.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.2);
    color: #055160;
}

/* Introvert Filter Switch */
.form-switch .form-check-input:checked {
    background-color: #13cff0;
    border-color: #13cff0;
}

.form-check-label[for="introvert-filter"] {
    color: #055160;
    font-weight: 500;
}
