/* Insights Index Page Styles */

/* ===== INSIGHT CARD ENHANCEMENTS ===== */

/* Base card styling for insights */
.info-card {
    background: linear-gradient(135deg, #1e1f2e 0%, #252835 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

/* Card tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.5rem 1.5rem 0.75rem 1.5rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    margin-top: auto;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s ease;
    opacity: 0.75;
    border: none;
}

.tag-game {
    background: rgba(99, 102, 241, 0.15);
    color: #94a3b8;
}

.tag-game:hover {
    background: rgba(99, 102, 241, 0.25);
    opacity: 1;
}

.tag-monetization {
    background: rgba(245, 158, 11, 0.15);
    color: #94a3b8;
}

.tag-monetization:hover {
    background: rgba(245, 158, 11, 0.25);
    opacity: 1;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.4);
}

.info-card:hover::before {
    opacity: 1;
}

/* Card header with visual accent */
.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #f0f6fc;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 2px;
    flex-shrink: 0;
}

.card-description {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    letter-spacing: 0.3px;
}

/* Card actions styling */
.card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.read-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.read-more-btn:hover::before {
    left: 100%;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.read-more-btn:active {
    transform: translateY(0);
}

/* ===== GRID LAYOUT ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    grid-column: 1 / -1;
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 2px dashed rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    color: #cbd5e1;
}

.empty-state i {
    font-size: 3rem;
    color: #6366f1;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #f0f6fc;
    margin: 0 0 0.5rem 0;
}

.empty-state p {
    font-size: 1rem;
    color: #94a3b8;
    margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
        padding: 0 0.75rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .read-more-btn {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .card-content {
        padding: 1.25rem;
    }
    
    .card-title {
        font-size: 1.15rem;
    }
    
    .empty-state {
        padding: 2.5rem 1.5rem;
    }
}

/* Additional styles for machinations preview */
.card-iframe-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.machinations-preview {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(248, 250, 252, 0.95) 50%, 
        rgba(241, 245, 249, 0.9) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.machinations-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(29, 78, 216, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.machinations-logo {
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.machinations-logo svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.card-iframe-container:hover .machinations-logo svg {
    transform: scale(1.1);
}

.preview-text {
    position: relative;
    z-index: 2;
}

.preview-text h4 {
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.preview-text p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.card-iframe-container:hover .iframe-overlay {
    opacity: 1 !important;
}

.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.iframe-overlay-content {
    text-align: center;
    color: white;
}

.iframe-fallback {
    width: 100%;
    height: 200px;
    background-color: #2a2c3e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    text-align: center;
    font-style: italic;
}

.iframe-fallback i {
    color: #666;
}

.iframe-fallback small {
    color: #888;
    font-size: 0.75rem;
}

.study-meta {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    text-align: center;
}

.status-badge {
    background: #2196F3;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.875rem;
}

.model-info {
    color: #aaa;
    font-size: 0.875rem;
}
