/* === JieDimension Studio - Premium Glassmorphism Theme === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;800&display=swap');

:root {
    /* Deep Space Backgrounds */
    --bg-base: #0a0b10;
    --bg-surface: rgba(22, 24, 34, 0.4);
    --bg-surface-hover: rgba(35, 38, 54, 0.5);
    
    /* Vibrant Neon Accents */
    --accent-primary: #8b5cf6; /* Violet */
    --accent-secondary: #06b6d4; /* Cyan */
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    
    /* Glow Effects */
    --glow-primary: rgba(139, 92, 246, 0.5);
    --glow-secondary: rgba(6, 182, 212, 0.5);
    
    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Glassmorphism Details */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-highlight: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(16px);
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --content-max-width: 1040px;
    --control-size: 46px;
    
    /* Video Background */
    --video-opacity: 0.85;
}

body.theme-light {
    --bg-base: #f1f5f9;
    --bg-surface: rgba(255, 255, 255, 0.5);
    --bg-surface-hover: rgba(255, 255, 255, 0.7);
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --glass-border: rgba(0, 0, 0, 0.15);
    --glass-border-highlight: rgba(0, 0, 0, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    
    --video-opacity: 0.95; /* Brighter for light theme */
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    background-attachment: fixed;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* --- Background Video Container --- */
#bg-video-container {
    position: fixed;
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    z-index: -2;
    overflow: hidden;
    background-color: var(--bg-base);
}
#bg-video {
    width: 100%; height: 100%; 
    object-fit: cover;
    opacity: var(--video-opacity);
    transition: opacity 1s ease-in-out;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* --- Navigation Bar --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 11, 16, 0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.site-title span:first-child {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-title-cn {
    font-size: 0.8rem;
    color: var(--accent-secondary);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2px;
}

.site-nav {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.site-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
}

.site-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--accent-gradient);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.site-nav a:hover {
    color: var(--text-primary);
}

.site-nav a:hover::after {
    width: 100%;
}

/* --- Container --- */
.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 1.5rem;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 4.5rem 1.5rem;
    margin: 1.5rem 0 3rem;
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

/* Abstract glowing orbs behind hero */
.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.hero::before {
    top: -20%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: var(--accent-primary);
}

.hero::after {
    bottom: -20%;
    right: -10%;
    width: 250px;
    height: 250px;
    background: var(--accent-secondary);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-30px) scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.hero .tagline {
    font-size: 1.25rem;
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.hero-description {
    font-size: 1.02rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* --- Section Titles --- */
.section-title {
    font-size: 2.15rem;
    margin: 3rem 0 2rem;
    text-align: center;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    margin: 1rem auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--glow-primary);
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: var(--control-size);
    height: var(--control-size);
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    font-size: 1.35rem;
    border: none;
    box-shadow: 0 4px 15px var(--glow-primary);
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--glow-primary);
}

/* --- Theme Controls --- */
.theme-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.control-btn {
    width: var(--control-size);
    height: var(--control-size);
    border-radius: 50%;
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1.35rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--glass-shadow);
    background: var(--bg-surface-hover);
}

/* --- Game Cards Grid --- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.game-card {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-smooth);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: var(--glass-border-highlight);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px var(--glow-primary);
}

.game-thumbnail {
    width: 100%;
    height: 190px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.game-thumbnail::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
    mix-blend-mode: overlay;
}

.game-card:hover .game-thumbnail::after {
    opacity: 0.5;
}

.game-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.game-card:hover .game-title {
    color: var(--accent-secondary);
}

.game-platform {
    align-self: flex-start;
    padding: 0.35rem 1rem;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.game-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    flex-grow: 1;
}

.game-status {
    color: var(--accent-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-secondary);
    box-shadow: 0 0 8px var(--glow-secondary);
}

/* --- Blog Post List --- */
.post-list {
    list-style: none;
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-item {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.post-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

.post-item:hover {
    transform: translateX(5px);
    border-color: rgba(255,255,255,0.15);
    background: var(--bg-surface-hover);
}

.post-item:hover::before {
    opacity: 1;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.post-title a:hover {
    color: var(--accent-secondary);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Post Content --- */
.post-content {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    margin-top: 2rem;
}

.post-content h1, .post-content h2, .post-content h3 {
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
}

.post-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.post-content a {
    color: var(--accent-secondary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition-smooth);
}

.post-content a:hover {
    border-bottom-color: var(--accent-secondary);
    text-shadow: 0 0 8px var(--glow-secondary);
}

.post-content code {
    background: rgba(255,255,255,0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #e2e8f0;
    font-size: 0.9em;
}

.post-content pre {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content pre code {
    background: transparent;
    padding: 0;
    color: #cbd5e1;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.05em;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--glow-primary);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    opacity: 0;
    z-index: -1;
    transition: var(--transition-smooth);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--glow-primary);
    color: white;
}

.btn:hover::before {
    opacity: 1;
}

/* --- Footer --- */
.site-footer {
    background: rgba(10, 11, 16, 0.8);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 1.5rem;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
}

.site-footer p {
    margin-bottom: 0.5rem;
}

.site-footer a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.site-footer a:hover {
    color: white;
    text-shadow: 0 0 10px var(--glow-secondary);
}

/* --- Blender Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.gallery-overlay p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* --- Responsive Layout --- */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1.2rem;
        padding: 1.25rem 1rem;
    }

    .site-nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .container {
        padding: 1rem;
    }

    .hero {
        padding: 3.25rem 1.1rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero .tagline {
        font-size: 1.05rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .theme-controls {
        left: 16px;
        bottom: 16px;
        gap: 10px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
    }

    .control-btn,
    .back-to-top {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }

    .post-content {
        padding: 1.5rem;
    }
}