@font-face {
    font-family: 'Minecraft AE';
    src: url('../font/Minecraft-AE.ttf') format('truetype');
    font-display: swap;
}

:root {
    /* Neo-Pop Brutalism Theme */
    --color-bg: #e0e0e0; /* Slightly darker for contrast */
    --color-bg-alt: #ffffff;
    
    /* Vibrant Colors - Neon Pop */
    --color-primary: #ff00ff; /* Hot Pink */
    --color-secondary: #ccff00; /* Acid Green */
    --color-accent: #00ffff; /* Cyan */
    --color-yellow: #ffff00;
    --color-purple: #9d00ff;
    
    --color-text: #050505;
    --color-text-dim: #444444;
    --color-card-bg: rgba(255, 255, 255, 0.8); /* Semi-transparent for glassmorphism */
    
    /* Brutalism Borders & Shadows */
    --border-width: 3px;
    --border-color: #000000;
    --shadow-offset: 6px; /* Deeper shadow */
    --shadow-color: #000000;
    --brutal-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--shadow-color);
    --brutal-border: var(--border-width) solid var(--border-color);
    --neon-glow: 0 0 10px var(--color-primary), 0 0 20px var(--color-primary);
    
    --font-main: 'Minecraft AE', 'Arial Black', sans-serif;
    
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;
    
    --transition-fast: 0.1s ease; /* Snappier transitions */
    --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
}

/* Custom Selection */
::selection {
    background: var(--color-primary);
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    background: var(--color-bg);
    border-left: var(--brutal-border);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border: 2px solid #000;
    box-shadow: inset 2px 2px 0 rgba(255,255,255,0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Click Explosion Particles */
.click-particle {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    pointer-events: none;
    z-index: 9999;
    box-shadow: 2px 2px 0 #000;
}

/* Click Pop Text */
.click-pop-text {
    position: fixed;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-text);
    pointer-events: none;
    z-index: 9999;
    text-shadow: 2px 2px 0 var(--color-bg);
    white-space: nowrap;
    user-select: none;
}

/* Marquee Section */
.marquee-container {
    background: var(--color-text);
    color: var(--color-bg);
    padding: 15px 0;
    overflow: hidden;
    border-top: var(--brutal-border);
    border-bottom: var(--brutal-border);
    position: relative;
    z-index: 10;
    transform: rotate(-1deg) scale(1.02);
    margin-bottom: var(--spacing-lg);
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}

.marquee-content span {
    font-size: 1.5rem;
    font-weight: 900;
    padding-right: 50px;
    text-transform: uppercase;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Floating Pixel Blocks */
.floating-blocks-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.pixel-block {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--color-text-dim);
    opacity: 0.3;
    box-shadow: 0 0 10px var(--color-primary);
}

/* 3D Tilt Effect & Holographic Card */
.mode-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.6) 100%);
    border: var(--brutal-border);
    overflow: hidden; /* For shine effect */
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 100%
    );
    transform: skewX(-25deg);
    transition: 0.5s;
    z-index: 1;
    pointer-events: none;
}

.mode-card:hover::before {
    left: 150%;
    transition: 0.7s ease-in-out;
}

.mode-card-content {
    transform: translateZ(30px);
    position: relative;
    z-index: 2;
}

/* Dark Theme Override (Neo-Pop Dark) */
[data-theme="dark"] {
    --color-bg: #050505;
    --color-bg-alt: #111111;
    
    --color-text: #ffffff;
    --color-text-dim: #cccccc;
    --color-card-bg: #1a1a1a;
    
    --border-color: #ffffff;
    --shadow-color: #ffffff;
    
    /* Adjust accent colors for dark background if needed, but neon usually works well */
    --color-yellow: #FFFF00;
}

/* Theme Transition Overlay - Spiky Explosion */
.theme-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
    /* Initial state: tiny polygon at bottom right */
    clip-path: polygon(100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%);
    background: var(--color-bg);
    /* We will animate clip-path via JS/GSAP for complex shapes */
}

.theme-transition-overlay.to-light { background: #f0f0f0; }
.theme-transition-overlay.to-dark { background: #050505; }

/* Page Transition Overlay - Removed in favor of 3D Page Swipe */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg-alt); /* Base color for loading state */
    color: var(--color-text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 1;
    /* 隐藏系统原始鼠标指针 */
    cursor: none !important;
}

/* 确保所有交互元素也隐藏系统指针 */
a, button, .mode-card, .server-ip-box, .mobile-menu-btn, input, textarea, select {
    cursor: none !important;
}

#page-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: var(--color-bg);
    /* Grid Background Pattern moved here */
    background-image:
        linear-gradient(var(--color-text-dim) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-text-dim) 1px, transparent 1px);
    background-size: 40px 40px;
    background-blend-mode: overlay;
    transform-origin: center;
    will-change: transform;
    z-index: 1;
    box-shadow: 0 0 50px rgba(0,0,0,0.5); /* Shadow to separate from loading layer */
}

[data-theme="dark"] #page-wrapper {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
}

#loading-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
    background: var(--color-bg-alt);
}

.loading-text {
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 5px;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.3; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.3; transform: scale(0.95); }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* --- Layout --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

section {
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

/* --- Typography & Glitch Effect --- */
h1, h2, h3 {
    text-transform: uppercase;
    line-height: 1.2;
}

.glitch-text {
    position: relative;
    color: var(--color-text);
    font-size: 4rem;
    font-weight: bold;
    letter-spacing: 2px;
    display: inline-block;
    z-index: 1;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg); /* Match background to hide main text parts */
    opacity: 0.8;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--color-accent);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
    z-index: -1;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--color-secondary);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
    z-index: -2;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-card-bg);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Removed 'all' to prevent position transition issues */
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--color-primary);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

@keyframes glitch-anim {
    0% { clip: rect(17px, 9999px, 94px, 0); }
    5% { clip: rect(33px, 9999px, 15px, 0); }
    10% { clip: rect(89px, 9999px, 19px, 0); }
    15% { clip: rect(2px, 9999px, 66px, 0); }
    20% { clip: rect(78px, 9999px, 93px, 0); }
    25% { clip: rect(13px, 9999px, 6px, 0); }
    30% { clip: rect(44px, 9999px, 86px, 0); }
    35% { clip: rect(98px, 9999px, 25px, 0); }
    40% { clip: rect(26px, 9999px, 91px, 0); }
    45% { clip: rect(62px, 9999px, 47px, 0); }
    50% { clip: rect(19px, 9999px, 3px, 0); }
    55% { clip: rect(71px, 9999px, 55px, 0); }
    60% { clip: rect(4px, 9999px, 82px, 0); }
    65% { clip: rect(56px, 9999px, 11px, 0); }
    70% { clip: rect(38px, 9999px, 44px, 0); }
    75% { clip: rect(92px, 9999px, 29px, 0); }
    80% { clip: rect(15px, 9999px, 73px, 0); }
    85% { clip: rect(67px, 9999px, 38px, 0); }
    90% { clip: rect(31px, 9999px, 62px, 0); }
    95% { clip: rect(85px, 9999px, 16px, 0); }
    100% { clip: rect(53px, 9999px, 97px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 21px, 0); }
    100% { clip: rect(12px, 9999px, 84px, 0); }
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    background: var(--color-bg-alt);
    border-bottom: var(--brutal-border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: -1px;
}

.logo svg, .logo img {
    width: 64px;
    height: 64px;
    fill: var(--color-text);
    object-fit: contain;
    filter: drop-shadow(2px 2px 0px var(--color-primary));
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    position: relative;
    font-size: 1rem;
    font-weight: 700;
    padding: 8px 16px;
    background: var(--color-card-bg);
    color: var(--color-text);
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    transition: var(--transition-fast);
    text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--shadow-color);
    background: var(--color-yellow);
    color: #000; /* Always black text on yellow hover */
}

.nav-links a:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

.nav-links a::after {
    display: none;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px; /* Header height */
}

/* Static Background Pattern */
.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.03;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: rotate(-15deg) scale(1.5);
}

.bg-pattern-row {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    color: var(--color-text);
    margin: 10px 0;
}

/* Dynamic Floating Elements */
.hero-bg-floating {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Same level as pattern, but will be on top due to DOM order */
    pointer-events: none;
    overflow: hidden;
}

.bg-floating-item {
    position: absolute;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    color: var(--color-text);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 15px;
    will-change: transform, opacity;
    opacity: 0.2;
    /* Neon Glow Effect */
    text-shadow: 0 0 10px var(--color-primary), 0 0 20px var(--color-secondary);
    filter: drop-shadow(0 0 5px var(--color-accent));
}

.bg-icon {
    object-fit: contain;
    /* Icon Glow */
    filter: drop-shadow(0 0 10px var(--color-primary));
}

.hero-content {
    position: relative;
    z-index: 1;
    background: var(--color-card-bg);
    padding: var(--spacing-xl);
    border: var(--brutal-border);
    box-shadow: 10px 10px 0px var(--shadow-color);
    max-width: 800px;
    width: 90%;
}

.glitch-text {
    font-size: 5rem;
    color: var(--color-text);
    text-shadow: 4px 4px 0px var(--color-primary);
    margin-bottom: var(--spacing-md);
    /* Disable old glitch animation for cleaner look, or keep it subtle */
    animation: none;
}

.glitch-text::before, .glitch-text::after {
    display: none;
}

.server-ip-box {
    margin-top: var(--spacing-md);
    display: inline-flex;
    align-items: center;
    background: var(--color-card-bg);
    border: var(--brutal-border);
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    box-shadow: var(--brutal-shadow);
    font-weight: bold;
    margin: 10px;
}

.server-ip-box:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--shadow-color);
    background: var(--color-accent);
}

.server-ip-box:hover span,
.server-ip-box:hover .copy-icon {
    color: #000;
    fill: #000;
}

.server-ip-box:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

.server-ip-box span {
    font-size: 1.2rem;
    margin-right: var(--spacing-md);
    color: var(--color-text);
}

.copy-icon {
    width: 24px;
    height: 24px;
    fill: var(--color-text);
}

.ip-tooltip {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%) rotate(-5deg);
    background: var(--color-primary);
    color: #fff;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    box-shadow: 4px 4px 0px var(--shadow-color);
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.1s;
    pointer-events: none;
}

.server-ip-box.copied .ip-tooltip {
    opacity: 1;
}

/* --- About Section --- */
.about {
    background: var(--color-yellow);
    border-top: var(--brutal-border);
    border-bottom: var(--brutal-border);
}

[data-theme="dark"] .about {
    background: #333300; /* Darker yellow for dark mode */
    color: #fff;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    color: #000; /* Always black on yellow background */
}

[data-theme="dark"] .about-text {
    color: #fff;
}

.about-text strong {
    background: #fff;
    padding: 2px 6px;
    border: 2px solid #000;
    box-shadow: 3px 3px 0px #000;
    color: #000;
}

/* --- Features/Modes Section --- */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

@media (max-width: 1200px) {
    .modes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .modes-grid {
        grid-template-columns: 1fr;
    }
}

.mode-card {
    background: var(--color-card-bg);
    border: var(--brutal-border);
    padding: var(--spacing-lg);
    transition: var(--transition-fast);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px; /* Increased height for better visual balance */
    box-shadow: var(--brutal-shadow);
}

/* Specific colors for cards */
.mode-card:nth-child(1) { background: var(--color-card-bg); }
.mode-card:nth-child(2) { background: var(--color-card-bg); }
.mode-card:nth-child(3) { background: var(--color-card-bg); }

/* Header decoration for cards */
.mode-card h3 {
    color: #000;
    margin-bottom: var(--spacing-md);
    font-size: 1.8rem;
    background: var(--color-primary);
    display: inline-block;
    padding: 5px 10px;
    border: 2px solid var(--border-color);
    box-shadow: 3px 3px 0px var(--shadow-color);
    transform: rotate(-2deg);
    align-self: flex-start;
}

.mode-card:nth-child(2) h3 { background: var(--color-secondary); transform: rotate(1deg); }
.mode-card:nth-child(3) h3 { background: var(--color-accent); transform: rotate(-1deg); }

.mode-card p {
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
    flex-grow: 1;
    font-weight: 500;
    margin-top: 10px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--color-text);
    border: none;
    color: var(--color-bg);
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--color-primary);
    color: #000;
    transform: scale(1.02);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

.mode-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0px var(--shadow-color);
}

/* --- Footer --- */
footer {
    padding: var(--spacing-xl) 0;
    border-top: var(--brutal-border);
    text-align: center;
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: var(--brutal-border);
    background: var(--color-card-bg);
    box-shadow: var(--brutal-shadow);
    transition: var(--transition-fast);
}

.social-links a svg {
    width: 24px;
    height: 24px;
    fill: var(--color-text);
}

.social-links a:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--shadow-color);
    background: var(--color-secondary);
}

.social-links a:hover svg {
    fill: #000;
}

/* --- Mobile Nav --- */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Page Transition --- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 9999;
    transform: translateY(0);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-loader.hidden {
    transform: translateY(-100%);
}

.page-loader::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: var(--color-primary);
    box-shadow: 0 0 20px var(--color-primary);
}

/* --- Utilities --- */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

/* --- Scroll Animation Classes --- */
.reveal {
    opacity: 0;
    transform: translateY(100px) scale(0.9);
    filter: blur(10px);
    transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* --- Hero Entrance Animation --- */
.hero-content {
    animation: hero-entrance 1.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
    transform: translateY(50px);
}

@keyframes hero-entrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- OneBlock Mining Animation --- */
.mining-scene {
    width: 300px;
    height: 300px;
    margin: 60px auto;
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.block {
    width: 80px;
    height: 80px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(-30deg) rotateY(45deg);
    transform-style: preserve-3d;
}

.face {
    position: absolute;
    width: 80px;
    height: 80px;
    background: #795548;
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.1) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.1) 75%, rgba(0,0,0,0.1)),
        linear-gradient(45deg, rgba(0,0,0,0.1) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.1) 75%, rgba(0,0,0,0.1));
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    border: 1px solid rgba(0,0,0,0.3);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

.face.top {
    background-color: #4caf50;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.1) 75%, rgba(255,255,255,0.1)),
        linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.1) 75%, rgba(255,255,255,0.1));
    transform: rotateX(90deg) translateZ(40px);
}
.face.front  { transform: translateZ(40px); }
.face.back   { transform: rotateY(180deg) translateZ(40px); }
.face.right  { transform: rotateY(90deg) translateZ(40px); filter: brightness(0.8); }
.face.left   { transform: rotateY(-90deg) translateZ(40px); filter: brightness(0.8); }
.face.bottom { transform: rotateX(-90deg) translateZ(40px); background: #3e2723; filter: brightness(0.5); }

/* Pickaxe Styling */
.pickaxe {
    width: 120px;
    height: 120px;
    position: absolute;
    top: -20px;
    right: -20px;
    transform-origin: 80% 80%;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(5px 5px 5px rgba(0,0,0,0.3));
    color: #00e5ff; /* Default diamond color */
}

.pickaxe svg {
    width: 100%;
    height: 100%;
    transform: rotate(-45deg);
}

.particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-secondary);
    opacity: 0;
}

.particle:nth-child(1) { animation: particle-fly 2s infinite 0.4s; top: 40%; left: 40%; }
.particle:nth-child(2) { animation: particle-fly 2s infinite 0.42s; top: 40%; left: 60%; }
.particle:nth-child(3) { animation: particle-fly 2s infinite 0.44s; top: 60%; left: 40%; }
.particle:nth-child(4) { animation: particle-fly 2s infinite 0.46s; top: 60%; left: 60%; }

@keyframes particle-fly {
    0% { transform: translate(0, 0); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)); opacity: 0; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .glitch-text {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-bg-alt);
        border-bottom: var(--brutal-border);
        flex-direction: column;
        padding: var(--spacing-lg);
        text-align: center;
        gap: var(--spacing-md);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
        padding: 5px;
        border: var(--brutal-border);
        background: var(--color-card-bg);
        box-shadow: var(--brutal-shadow);
        color: var(--color-text);
    }
    
    .mobile-menu-btn:active {
        transform: translate(2px, 2px);
        box-shadow: none;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
}

/* --- Lite Mode (Performance Optimization) --- */
body.lite-mode * {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    cursor: auto !important;
    filter: none !important;
}

body.lite-mode .noise-overlay,
body.lite-mode .custom-cursor,
body.lite-mode .hero-bg-pattern,
body.lite-mode .hero-bg-floating,
body.lite-mode .click-particle,
body.lite-mode .pixel-block,
body.lite-mode .theme-transition-overlay,
body.lite-mode .side-decoration {
    display: none !important;
}

body.lite-mode .mode-card {
    transform: none !important;
    background: var(--color-card-bg);
    border: 1px solid #ccc;
}

body.lite-mode .mode-card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: var(--color-primary);
}

body.lite-mode .resource-card:hover {
    transform: none !important;
}

body.lite-mode .glitch-text::before,
body.lite-mode .glitch-text::after {
    display: none !important;
}

/* Force visibility for elements that rely on entrance animations */
body.lite-mode .hero-content,
body.lite-mode .reveal,
body.lite-mode .glitch-text {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    visibility: visible !important;
}

body.lite-mode .nav-links a:hover {
    transform: none !important;
    background: var(--color-yellow);
}

/* Lite Mode Notification */
.lite-mode-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 10000;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideUpFade 0.5s ease-out forwards;
}

.lite-mode-notification button {
    background: var(--color-primary);
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}