@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Press+Start+2P&family=VT323&display=swap');

/* ==========================================================================
   MINECRAFT DESIGN SYSTEM & COLOR TOKENS (HSL TAILORED)
   ========================================================================== */
:root {
    /* Overworld Palette */
    --mc-sky-top: hsl(210, 100%, 75%);
    --mc-sky-bot: hsl(195, 95%, 68%);
    --mc-grass: hsl(104, 60%, 42%);
    --mc-grass-hover: hsl(104, 65%, 33%);
    --mc-grass-light: hsl(104, 55%, 52%);
    --mc-dirt: hsl(28, 42%, 30%);
    --mc-dirt-dark: hsl(28, 45%, 20%);
    
    /* System & Window Grays (Iconic Inventory Styling) */
    --mc-gui-bg: #c6c6c6;
    --mc-gui-dark: #555555;
    --mc-gui-light: #ffffff;
    --mc-obsidian: #18181c;
    --mc-obsidian-border: #3b3b4f;
    --mc-border-dark: #2d2d2d;

    /* Text Colors */
    --text-main: #2b2b2b;
    --text-muted: #5a5a5a;
    --text-light: #ffffff;
    
    /* Highlight Colors (Minecraft Formatting) */
    --mc-gold: #ffaa00;
    --mc-yellow: #ffff55;
    --mc-green: #55ff55;
    --mc-aqua: #55ffff;
    --mc-red: #ff5555;
    --mc-purple: #aa00aa;
    
    /* Motion Variables */
    --transition-snappy: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   RESET & LAYOUT BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    image-rendering: pixelated; /* Ensures pixel-art aesthetic is preserved */
}

body {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    background-color: var(--mc-sky-bot);
}

/* Typography Overrides */
h1, h2, h3, h4, .logo, .btn, .mc-font-pixel {
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

h1 {
    font-size: 1.8rem;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.15);
}

h2 {
    font-size: 1.3rem;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

p.pixel-desc {
    font-family: 'VT323', monospace;
    font-size: 1.6rem;
    line-height: 1.2;
}

code {
    font-family: 'VT323', monospace;
}

/* ==========================================================================
   DYNAMIC PARALLAX CLOUD & BACKGROUND ENGINE
   ========================================================================== */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    background: linear-gradient(to bottom, var(--mc-sky-top) 0%, var(--mc-sky-bot) 50%, var(--mc-grass-light) 85%, var(--mc-grass) 100%);
    overflow: hidden;
}

/* The horizon layer simulating voxel hills */
.background::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-image: 
        linear-gradient(to top, var(--mc-dirt) 0%, var(--mc-dirt) 70%, var(--mc-border-dark) 70%, var(--mc-border-dark) 75%, var(--mc-grass) 75%, var(--mc-grass) 100%);
    box-shadow: inset 0 8px 0 rgba(255,255,255,0.15);
    z-index: -5;
}

/* Clouds Wrapper */
.pixel-clouds-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    pointer-events: none;
    z-index: -8;
}

/* Pixel Art Clouds */
.pixel-cloud {
    position: absolute;
    background: #ffffff;
    border: 4px solid var(--mc-border-dark);
    box-shadow: inset -4px -8px 0px #d8d8d8, 4px 6px 0px rgba(0,0,0,0.1);
    height: 40px;
    opacity: 0.85;
}

.pixel-cloud::before, .pixel-cloud::after {
    content: '';
    position: absolute;
    background: #ffffff;
    border: 4px solid var(--mc-border-dark);
}

/* Different cloud sizes */
.cloud-1 {
    width: 140px;
    top: 15%;
    animation: drift 55s infinite linear;
}
.cloud-1::before {
    width: 70px;
    height: 25px;
    top: -20px;
    left: 20px;
    border-bottom: none;
    box-shadow: inset -4px 0px 0px #d8d8d8;
}

.cloud-2 {
    width: 220px;
    top: 30%;
    animation: drift 75s infinite linear;
}
.cloud-2::before {
    width: 90px;
    height: 35px;
    top: -25px;
    left: 30px;
    border-bottom: none;
    box-shadow: inset -4px 0px 0px #d8d8d8;
}
.cloud-2::after {
    width: 50px;
    height: 20px;
    top: -15px;
    left: 130px;
    border-bottom: none;
    box-shadow: inset -4px 0px 0px #d8d8d8;
}

.cloud-3 {
    width: 180px;
    top: 8%;
    animation: drift 40s infinite linear;
}
.cloud-3::before {
    width: 80px;
    height: 30px;
    top: -22px;
    left: 40px;
    border-bottom: none;
    box-shadow: inset -4px 0px 0px #d8d8d8;
}

.cloud-4 {
    width: 260px;
    top: 45%;
    animation: drift 95s infinite linear;
}
.cloud-4::before {
    width: 120px;
    height: 40px;
    top: -30px;
    left: 40px;
    border-bottom: none;
    box-shadow: inset -4px 0px 0px #d8d8d8;
}

@keyframes drift {
    0% { transform: translateX(110vw); }
    100% { transform: translateX(-350px); }
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: var(--mc-gui-bg);
    border-bottom: 4px solid var(--mc-border-dark);
    box-shadow: 
        inset 0 4px 0 rgba(255,255,255,0.6),
        inset 0 -4px 0 var(--mc-gui-dark),
        0 6px 0px rgba(0,0,0,0.15);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    color: var(--mc-border-dark);
    text-decoration: none;
    text-shadow: 2px 2px 0px rgba(255,255,255,0.7);
    padding: 0.6rem 1rem;
    border: 3px solid transparent;
    transition: var(--transition-snappy);
}

.logo:hover {
    color: var(--mc-grass);
    text-shadow: 2px 2px 0px rgba(0,0,0,0.15);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
    border: 4px solid transparent;
    background: transparent;
    transition: var(--transition-snappy);
    position: relative;
}

.nav-links a:hover {
    color: var(--mc-border-dark);
    background: #b0b0b0;
    border: 4px solid var(--mc-border-dark);
    border-top-color: #fff;
    border-left-color: #fff;
    border-bottom-color: var(--mc-gui-dark);
    border-right-color: var(--mc-gui-dark);
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.4);
}

/* ==========================================================================
   CONTAINER & LAYOUT
   ========================================================================== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 8rem 1.5rem 5rem;
}

/* ==========================================================================
   MINECRAFT WINDOW / CARD COMPONENT (INVENTORY STYLE)
   ========================================================================== */
.mc-window {
    background: var(--mc-gui-bg);
    border: 4px solid var(--mc-border-dark);
    box-shadow: 
        inset 4px 4px 0px var(--mc-gui-light),
        inset -4px -4px 0px var(--mc-gui-dark),
        6px 6px 0px rgba(0,0,0,0.25);
    padding: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    animation: block-drop 0.6s cubic-bezier(0.19, 1, 0.22, 1) both;
}

/* Swaying hover dynamics */
.mc-window:hover {
    transform: translateY(-6px);
    box-shadow: 
        inset 4px 4px 0px var(--mc-gui-light),
        inset -4px -4px 0px var(--mc-gui-dark),
        10px 12px 0px rgba(0,0,0,0.2);
}

/* Animation on load - simulated block drop */
@keyframes block-drop {
    0% {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.mc-window h1, .mc-window h2, .mc-window h3 {
    color: var(--mc-border-dark);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    text-shadow: 2px 2px 0px rgba(255,255,255,0.7);
}

.mc-window p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

/* ==========================================================================
   3D TACTILE MINECRAFT BUTTONS
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.9rem 1.4rem;
    background: #8b8b8b;
    color: #e0e0e0;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    border: 4px solid var(--mc-border-dark);
    border-top-color: var(--mc-gui-light);
    border-left-color: var(--mc-gui-light);
    border-bottom-color: var(--mc-gui-dark);
    border-right-color: var(--mc-gui-dark);
    cursor: pointer;
    text-shadow: 2px 2px 0px #373737;
    position: relative;
    box-shadow: 0 4px 0px rgba(0,0,0,0.2);
    transition: background 0.1s, transform 0.1s, box-shadow 0.1s;
    user-select: none;
    margin-top: 1rem;
}

/* Button Hover State - Highlights text in Yellow & outline in Gold */
.btn:hover {
    background: #a0a0a0;
    color: var(--mc-yellow);
    border-color: var(--mc-border-dark);
    border-top-color: #fff;
    border-left-color: #fff;
    border-bottom-color: #555;
    border-right-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 6px 0px rgba(0,0,0,0.25);
    outline: 2px solid var(--mc-gold);
}

/* Active Downward Tactile Shunting */
.btn:active {
    transform: translateY(4px);
    box-shadow: 0 0px 0px rgba(0,0,0,0.2);
    border-top-color: var(--mc-gui-dark);
    border-left-color: var(--mc-gui-dark);
    border-bottom-color: var(--mc-gui-light);
    border-right-color: var(--mc-gui-light);
    outline: none;
}

/* Primary Button (Grass Green) */
.btn.primary {
    background: var(--mc-grass);
    border-top-color: var(--mc-grass-light);
    border-left-color: var(--mc-grass-light);
    border-bottom-color: var(--mc-grass-hover);
    border-right-color: var(--mc-grass-hover);
    color: #fff;
}
.btn.primary:hover {
    background: var(--mc-grass-hover);
    color: var(--mc-yellow);
    outline: 2px solid var(--mc-aqua);
}

/* Danger Button (Redstone Red) */
.btn.danger {
    background: #b91c1c;
    border-top-color: #ef4444;
    border-left-color: #ef4444;
    border-bottom-color: #7f1d1d;
    border-right-color: #7f1d1d;
    color: #fff;
}
.btn.danger:hover {
    background: #991b1b;
    outline: 2px solid var(--mc-red);
}

/* ==========================================================================
   OBSIDIAN IP DISPLAY & CLIPBOARD COMPONENT
   ========================================================================== */
.ip-box {
    background: var(--mc-obsidian);
    border: 4px solid var(--mc-obsidian-border);
    box-shadow: 
        inset 0 0 16px rgba(85, 255, 85, 0.1),
        0 6px 12px rgba(0,0,0,0.4);
    padding: 1.5rem 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
    width: 100%;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Emerald shimmer effect */
.ip-box::before {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(85, 255, 85, 0.15), transparent);
    transform: skewX(-20deg);
    animation: shimmer 6s infinite ease-in-out;
}

@keyframes shimmer {
    0% { left: -150%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

.ip-box span {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    color: var(--text-light);
}

.ip-box code {
    font-size: 2.2rem;
    color: var(--mc-green);
    text-shadow: 0 0 10px rgba(85, 255, 85, 0.4), 2px 2px 0px #000;
    letter-spacing: 1px;
}

.ip-box .btn {
    margin: 0;
}

/* ==========================================================================
   CSS 3D FLOATING VOXEL BLOCK COMPONENT
   ========================================================================== */
.voxel-container {
    width: 100px;
    height: 100px;
    perspective: 600px;
    margin: 1.5rem auto;
    position: relative;
    z-index: 10;
}

.voxel-block {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transform: rotateX(-22deg) rotateY(45deg);
    animation: voxel-float-rotate 7s infinite ease-in-out;
}

.voxel-face {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid var(--mc-border-dark);
}

/* Top: Grass Green with concentric pixel borders */
.face-top {
    transform: rotateX(90deg) translateZ(50px);
    background: var(--mc-grass);
    box-shadow: 
        inset 0 0 0 8px var(--mc-grass-light),
        inset 0 0 0 16px var(--mc-grass),
        inset 0 0 0 24px var(--mc-grass-light);
}

/* Bottom: Dark wood/dirt */
.face-bottom {
    transform: rotateX(-90deg) translateZ(50px);
    background: var(--mc-dirt-dark);
    box-shadow: inset 0 0 0 12px var(--mc-border-dark);
}

/* Sides: Grass Rim transitioning into Dirt Voxel */
.face-side {
    background: linear-gradient(to bottom, var(--mc-grass) 30%, var(--mc-border-dark) 30%, var(--mc-border-dark) 36%, var(--mc-dirt) 36%);
    box-shadow: 
        inset 6px 0px 0 rgba(255,255,255,0.1),
        inset 0px 6px 0 rgba(255,255,255,0.1);
}

.face-front  { transform: rotateY(0deg) translateZ(50px); }
.face-back   { transform: rotateY(180deg) translateZ(50px); }
.face-left   { transform: rotateY(-90deg) translateZ(50px); }
.face-right  { transform: rotateY(90deg) translateZ(50px); }

/* Voxel floating and rotation logic */
@keyframes voxel-float-rotate {
    0% {
        transform: translateY(0px) rotateX(-22deg) rotateY(0deg);
    }
    50% {
        transform: translateY(-16px) rotateX(-28deg) rotateY(180deg);
    }
    100% {
        transform: translateY(0px) rotateX(-22deg) rotateY(360deg);
    }
}

/* ==========================================================================
   MINECRAFT CHAT STYLE COPY NOTIFICATION TOAST
   ========================================================================== */
.mc-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #555555;
    box-shadow: 
        inset 3px 3px 0px #aaaaaa,
        inset -3px -3px 0px #373737,
        0 8px 16px rgba(0,0,0,0.5);
    padding: 1.2rem 1.8rem;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    line-height: 1.6;
    z-index: 9999;
    pointer-events: none;
    transform: translateY(120px) scale(0.8);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.35), opacity 0.3s;
}

.mc-toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.mc-toast .toast-accent {
    color: var(--mc-yellow);
}

.mc-toast .toast-success {
    color: var(--mc-green);
}

/* ==========================================================================
   GRID & UTILITY STYLES
   ========================================================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

ul.mc-list {
    list-style: none;
    padding-left: 0.5rem;
    margin-top: 1rem;
}

ul.mc-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

ul.mc-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--mc-grass);
    border: 2px solid var(--mc-border-dark);
    box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

/* Code box embedded styles */
.code-block {
    background: rgba(0,0,0,0.85);
    border: 3px solid var(--mc-border-dark);
    box-shadow: inset 2px 2px 8px rgba(0,0,0,0.8);
    padding: 1.2rem;
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    color: var(--mc-green);
    margin: 1.2rem 0;
    overflow-x: auto;
}

/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATIONS
   ========================================================================== */
@media (max-width: 768px) {
    body {
        font-size: 1.05rem;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }
    
    .nav-links {
        justify-content: center;
        width: 100%;
        gap: 0.2rem;
    }
    
    .nav-links a {
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .container {
        padding-top: 10rem;
    }
    
    .mc-window {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.4rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .ip-box code {
        font-size: 1.6rem;
    }
}
