/**
 * Cosmic Gallery Stylesheet
 * Location: /public_html/assets/css/cosmic.css
 */

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a1a;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Cosmic Background */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    overflow: hidden;
}

/* Canvas for animations */
#cosmic-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Header */
.header {
    background: rgba(10, 10, 26, 0.95);
    padding: 20px 40px;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(118, 75, 162, 0.8);
    }
}

.hero p {
    font-size: 1.2em;
    color: #aaa;
    margin-bottom: 30px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.meme-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.meme-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

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

.meme-card:hover {
    transform: translateY(-5px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.meme-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.meme-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s;
}

.meme-card:hover .meme-image {
    transform: scale(1.05);
}

.meme-info {
    padding: 15px;
}

.meme-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.meme-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #aaa;
}

.meme-stats {
    display: flex;
    gap: 15px;
}

.meme-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.username-link {
    color: #a5b4fc;
    text-decoration: none;
    transition: color 0.2s;
}

.username-link:hover {
    color: #818cf8;
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #667eea;
}

.empty-state p {
    font-size: 1.1em;
    color: #aaa;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2em;
    }
    
    .hero p {
        font-size: 1em;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

/* Loading animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
