/* =========================================
   GRAPHICS PAGE SPECIFIC STYLES
   ========================================= */

   :root {
    /* Extending base variables for this page */
    --neon-blue: #00f3ff;
    --neon-cyan: #0afff0; /* Primary accent for headers */
    --neon-pink: #fb0060;
    --dark-bg: #0a0a0a;
    --card-bg: rgba(20, 20, 20, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #888888;
    --glass-blur: blur(20px);
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Override for this page to fix scrolling context */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%; 
    height: auto;
    font-family: 'Rajdhani', sans-serif;
    background: var(--dark-bg);
    color: var(--text-main);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    display: none;
}

/* Graphics Container */
.graphics-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 40px 100px;
    position: relative;
}

/* --- HERO SECTION --- */
.graphics-hero {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 40px;
    position: relative;
}

.premium-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 5rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    
    background: linear-gradient(
        to right, 
        #666666 0%, 
        #ffffff 20%, 
        #666666 40%, 
        #666666 100%
    );
    background-size: 200% auto;
    
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    animation: shine 4s linear infinite;
    filter: drop-shadow(0 0 8px rgba(0, 243, 255, 0.4));
    
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

@keyframes shine {
    to { background-position: 200% center; }
}

.subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    color: var(--neon-cyan);
    letter-spacing: 8px;
    margin-top: 15px;
    text-transform: uppercase;
    opacity: 0.8;
    font-weight: 500;
}

/* GitHub Button */
.hero-actions {
    margin-top: 25px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
}

.github-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    padding: 10px 25px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    background: rgba(255,255,255,0.03);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.github-btn i {
    font-size: 1.2rem;
}

.github-btn:hover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    transform: translateY(-2px);
    color: #fff;
}

.interaction-hint {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    color: #555; 
    margin-top: 80px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: pulseHint 3s infinite ease-in-out;
}

.interaction-hint i {
    font-size: 0.8rem;
    color: var(--neon-cyan);
}

.interaction-hint span {
    color: #888;
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
    padding-bottom: 2px;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(2px); }
}

/* --- Section Styling --- */
.section-block {
    margin-bottom: 100px;
    scroll-margin-top: 120px; 
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-cyan);
    font-size: 1.8rem;
    margin-right: 20px;
    white-space: nowrap;
    position: relative;
    text-shadow: 0 0 15px rgba(10, 255, 240, 0.4);
}

.section-header .line {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), transparent);
    box-shadow: 0 0 5px var(--neon-cyan);
    opacity: 0.5;
}

/* --- Dual Video Section --- */
/* =========================================
   NEW: Engine & Rendering Framework Styles
   ========================================= */

/* =========================================
   NEW: Engine & Rendering Framework Styles
   ========================================= */

/* 1. Main Masterpiece Card */
.main-video-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    transition: transform 0.4s var(--transition-smooth), box-shadow 0.4s ease;
}

.main-video-card:hover {
    box-shadow: 0 10px 40px rgba(0, 243, 255, 0.15);
    border-color: rgba(0, 243, 255, 0.5);
}

/* 👇 新增/修正：主视频包裹器 (强制 1920x1080 不裁切) */
.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    padding-bottom: 0; /* 清除旧代码的 16:9 padding 限制 */
    aspect-ratio: 1920 / 1080; /* 精确匹配你的主视频分辨率 */
    display: flex; 
}

.video-wrapper video {
    position: relative; /* 覆盖之前的 absolute */
    width: 100%;
    height: 100%;
    object-fit: contain; /* contain 保证视频绝对完整，宁可留黑边也绝不放大裁切 */
}
/* 👆 ----------------------------------------------- */

.main-video-info {
    padding: 30px;
}

.main-video-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    margin: 0 0 15px 0;
    color: #fff;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.3);
}

/* 2. Technical Highlights Grid (2 Columns) */
.tech-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 25px;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(255,255,255,0.02);
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.highlight-item:hover {
    background: rgba(0, 243, 255, 0.05);
    border-color: rgba(0, 243, 255, 0.2);
    transform: translateY(-2px);
}

.highlight-item i {
    color: var(--neon-cyan);
    font-size: 1.2rem;
    margin-top: 3px;
}

.highlight-item p {
    font-size: 0.9rem;
    color: #bbb;
    margin: 0;
    line-height: 1.5;
    font-family: 'Rajdhani', sans-serif;
}

.highlight-item p strong {
    color: #fff;
    font-weight: 700;
}

/* 3. Sub-Videos Grid (3 Columns x 2 Rows) */
.sub-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.sub-video-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s var(--transition-smooth), box-shadow 0.4s ease;
}

.sub-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.1);
    border-color: rgba(0, 243, 255, 0.4);
}

/* 👇 修改：小视频包裹器 (精确适配 1704x1076) */
.mini-video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    padding-bottom: 0; /* 清除旧代码的 16:9 padding 限制 */
    aspect-ratio: 1704 / 1076; /* 直接写入真实分辨率比例，浏览器会自动计算最完美的高宽比 */
}

.mini-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 此时容器和视频的比例已经 100% 相同，cover 就能在不裁切的情况下完美填满 */
}
/* 👆 ----------------------------------------------- */

.sub-video-label {
    padding: 12px;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: var(--neon-cyan);
    background: rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.05);
    letter-spacing: 1px;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .tech-highlights { grid-template-columns: 1fr; }
    .sub-video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .sub-video-grid { grid-template-columns: 1fr; }
}


/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    grid-auto-rows: 240px; 
    gap: 20px;
}

#realtime .bento-grid {
    grid-template-rows: 240px 360px;
}

.bento-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.bento-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s var(--transition-smooth);
    group: card;
}

.span-1x1 { grid-column: span 1; grid-row: span 1; }
.span-2x2 { grid-column: span 2; grid-row: span 2; }
.span-2x1 { grid-column: span 2; grid-row: span 1; }
.span-1x2 { grid-column: span 1; grid-row: span 2; }
.span-2 { grid-column: span 2; } /* Generic span 2 columns */
.span-4 { grid-column: span 4; } /* Full width */

.bento-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition-smooth);
    opacity: 0.8;
}

.bento-card:hover {
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    z-index: 2;
}

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

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.6) 50%, transparent);
    transform: translateY(100%);
    transition: transform 0.4s var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 5;
}

.card-label {
    position: absolute;
    bottom: 15px;
    left: 15px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 4;
}

.bento-card:hover .card-label { opacity: 0; }
.bento-card:hover .card-overlay { transform: translateY(0); }

.card-overlay h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    color: var(--neon-blue);
}

.card-overlay p {
    font-size: 0.85rem;
    color: #ddd;
    margin: 0;
}

/* --- Perfect Quad Grid --- */
.quad-grid {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: 100%;
}

.quad-grid img {
    width: 50%;
    height: 50%;
    object-fit: cover;
    display: block;
    box-sizing: border-box;
    border: 1px solid rgba(0,0,0,0.5);
}

/* Tri Row Grid */
.tri-row-grid {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
}
.tri-row-grid img {
    flex: 1;
    height: 100%;
    object-fit: cover;
    border-right: 1px solid rgba(0,0,0,0.8);
    transition: flex 0.4s ease;
}
.tri-row-grid:hover img:hover { flex: 2; }

/* --- Side Navigation --- */
.side-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 2000;
}

.nav-dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.nav-dot::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(0,0,0,0.8);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
}

.nav-dot:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.nav-dot:hover {
    background: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
    transform: scale(1.2);
}

.nav-dot.active {
    background: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue);
    transform: scale(1.3);
    border-color: #fff;
}

/* --- Footer Action --- */
.footer-action {
    text-align: center;
    margin-top: 80px;
}

.back-to-top-btn {
    background: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 10px 30px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.back-to-top-btn:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

/* --- Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--transition-smooth);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .bento-grid, .bento-grid.three-col {
        grid-template-columns: repeat(2, 1fr);
    }
    .dual-video-grid {
        grid-template-columns: 1fr;
    }
    .span-2x2, .span-2x1, .span-2, .span-4 {
        grid-column: span 2;
    }
    .premium-text {
        font-size: 3rem;
    }
}
@media (max-width: 600px) {
    .bento-grid, .bento-grid.three-col {
        grid-template-columns: 1fr;
    }
    .span-2x2, .span-2x1, .span-2, .span-4 {
        grid-column: span 1;
    }
    .side-nav {
        display: none;
    }
    .premium-text {
        font-size: 2.2rem;
    }
}