/**
 * Menu Layout Styles
 * Modern grid layout with thumbnail previews
 */

/* Override base body styles for menu page */
body {
    background: #1a1a2e;
    min-height: 100vh;
    padding: 2rem;
    color: #fff;
}

/* Main container */
.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Header */
.header {
    margin-bottom: 3rem;
}

h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subtitle {
    color: #9ca3af;
    font-size: 1rem;
}

/* Sources grid - responsive card layout */
.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.source-card {
    background: #242438;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    position: relative;
}

.source-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.3);
}

/* Thumbnail preview */
.source-thumbnail {
    width: 100%;
    height: 160px;
    background: #1a1a2e;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.source-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.source-card:hover .source-thumbnail img {
    opacity: 1;
    transform: scale(1.05);
}

/* Loading placeholder for thumbnails */
.source-thumbnail.loading {
    background: linear-gradient(
        90deg,
        #1a1a2e 0%,
        #2a2a3e 50%,
        #1a1a2e 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Card content */
.source-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.source-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.source-path {
    color: #667eea;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.source-description {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.4;
    flex: 1;
}

/* Status indicator */
.source-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #2a2a3e;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* No sources state */
.no-sources {
    grid-column: 1 / -1;
    text-align: center;
    color: #9ca3af;
    padding: 4rem 2rem;
    background: #242438;
    border-radius: 12px;
}

/* Footer */
.footer {
    padding: 2rem;
    background: #242438;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #818cf8;
    text-decoration: underline;
}

.footer code {
    background: #1a1a2e;
    color: #667eea;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.footer-text {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }
    
    .sources-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .source-thumbnail {
        height: 120px;
    }
    
    .footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 1024px) {
    .sources-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}
