/* Premium UI Overhaul - Glassmorphism & Dynamic Details */

/* Global Glass Background for Modals/Overlays */
.glass-panel {
    background: rgba(15, 23, 42, 0.85);
    /* slate-900 with opacity */
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

#project-manager-modal,
.modal-overlay {
    z-index: 9990 !important;
}

/* Dialog must appear above project manager */
#vibesim-dialog {
    z-index: 10001 !important;
}

/* Beautiful Flowing Gradients for Primary Actions */
.btn-premium {
    background: linear-gradient(135deg, #8B5CF6, #6366F1);
    background-size: 200% 200%;
    color: var(--fg);
    font-weight: 600;
    transition: all 0.4s ease;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-premium:hover {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5);
}

.btn-premium::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-premium:hover::after {
    opacity: 1;
}

/* Glass Inputs */
.input-premium {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.input-premium:focus {
    border-color: #8b5cf6;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
    outline: none;
}

/* Feed Grid & Cards */
.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    padding: 32px 0;
}

.feed-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.feed-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.15);
}

/* Glassmorphism Cards for Project Manager & Hub */
.websim-card,
.carousel-item {
    background: rgba(30, 41, 59, 0.4) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 0px !important;
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    cursor: pointer !important;
}

.websim-card:hover,
.carousel-item:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    background: rgba(30, 41, 59, 0.6) !important;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(139, 92, 246, 0.1) !important;
}

.websim-card-preview,
.carousel-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.carousel-track {
    display: flex;
    gap: 20px;
    padding: 10px 24px 30px;
    overflow-x: auto;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    min-width: 280px;
    flex-shrink: 0;
}

.feed-card-header {
    height: 180px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
    position: relative;
    overflow: hidden;
}

/* Use vibrant dynamic placeholder backgrounds for projects without previews */
.dynamic-bg-1 {
    background: linear-gradient(135deg, #f43f5e, #f59e0b);
}

.dynamic-bg-2 {
    background: linear-gradient(135deg, #3b82f6, #10b981);
}

.dynamic-bg-3 {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
}

.dynamic-bg-4 {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.feed-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.feed-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 8px;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.feed-card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #94a3b8;
}

.stat-pill {
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.stat-pill.views {
    color: #facc15;
}

/* Custom Scrollbar for Landing Page */
.landing-scroll::-webkit-scrollbar {
    width: 8px;
}

.landing-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.landing-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.landing-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* Base Body Font Override */
body {
    background: #0f172a;
    /* Slate 900 */
    font-family: 'Inter', sans-serif;
}

/* Glowing text effects */
.text-glow {
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

/* Ensure popups appear above project manager */
.file-submenu {
    z-index: 10002 !important;
}

#vibesim-privacy-modal {
    z-index: 99999 !important;
}

#post-chooser-modal {
    z-index: 99998 !important;
}