body {
    background-color: theme('colors.background');
    color: theme('colors.text-primary');
    /* Repeating pixelated stone texture overlay */
    background-image: url('data:image/svg+xml;utf8,<svg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h64v64H0z" fill="%2310150e"/><path d="M0 0h32v32H0zm32 32h32v32H32z" fill="%23181d16" fill-opacity="0.5"/><path d="M0 32h32v32H0zm32-32h32v32H32z" fill="%230b0f09" fill-opacity="0.3"/></svg>');
    background-repeat: repeat;
    caret-color: theme('colors.primary-container');
    cursor: crosshair;
}

/* Skeuomorphic Button */
.btn-mace {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: theme('colors.primary-container');
    color: theme('colors.on-primary-container');
    border-bottom: 4px solid #2a5a1b; /* Custom active border */
    border-top: 2px solid theme('colors.surface-tint');
    border-left: 2px solid theme('colors.surface-tint');
    border-right: 2px solid #2a5a1b;
    transition: all 0.1s;
    cursor: pointer;
    user-select: none;
}
.btn-mace:not(.btn-secondary):hover {
    background-color: theme('colors.mace-green-light');
    box-shadow: 0 0 15px theme('colors.primary');
}
.btn-mace:active {
    border-bottom-width: 2px;
    transform: translateY(2px);
    margin-bottom: 2px; /* Maintain layout height */
}

.btn-secondary {
    background-color: theme('colors.stone-panel');
    color: theme('colors.text-primary');
    border-bottom: 4px solid theme('colors.surface-container-lowest');
    border-top: 2px solid theme('colors.surface-variant');
    border-left: 2px solid theme('colors.surface-variant');
    border-right: 2px solid theme('colors.surface-container-lowest');
}
.btn-secondary:hover {
    background-color: theme('colors.surface-bright');
    box-shadow: none;
}

/* Cobblestone Card */
.card-cobble {
    background-color: theme('colors.cobblestone-card');
    border-top: 2px solid theme('colors.surface-variant');
    border-left: 2px solid theme('colors.surface-variant');
    border-bottom: 2px solid theme('colors.surface-container-lowest');
    border-right: 2px solid theme('colors.surface-container-lowest');
    transition: transform 0.2s;
}
.card-cobble:hover {
    transform: translateY(-2px);
}

/* CRT Overlay */
.crt-overlay {
    position: relative;
}
.crt-overlay::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(13, 15, 12, 0.05) 2px,
        rgba(13, 15, 12, 0.05) 4px
    );
    z-index: 10;
    pointer-events: none;
}

/* Particle Container */
#particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}
.particle {
    position: absolute;
    color: theme('colors.primary');
    animation: fall linear infinite;
}

/* Logo field removed (was used for rotating logos that didn't load) */

/* Animations */
.observe-me {
    opacity: 0;
    transform: translateY(20px);
}
.observe-me.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes fall {
        to {
            transform: translateY(100vh);
        }
    }
    @keyframes flicker {
        0% { opacity: 0.95; }
        50% { opacity: 1; }
        100% { opacity: 0.95; }
    }
    @keyframes float {
        0% { transform: translateY(0px); }
        50% { transform: translateY(-12px); }
        100% { transform: translateY(0px); }
    }
    @keyframes drift-rotate {
        0% {
            transform: translate3d(0, 0, 0) rotateX(var(--rotX)) rotateY(var(--rotY)) rotateZ(var(--rotZ));
        }
        100% {
            transform: translate3d(var(--driftX), var(--driftY), var(--driftZ)) rotateX(calc(var(--rotX) + 360deg)) rotateY(calc(var(--rotY) + 360deg)) rotateZ(calc(var(--rotZ) + 360deg));
        }
    }
    .crt-overlay::after {
        animation: flicker 0.15s infinite;
    }
    .float-anim {
        animation: float 6s ease-in-out infinite;
    }
    .observe-me {
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
}
@media (prefers-reduced-motion: reduce) {
    .observe-me {
        opacity: 1;
        transform: translateY(0);
    }
    .logo-field-item {
        animation: none;
    }
}

/* Supported runtimes visual tweaks */
.runtime-grid{display:flex;gap:1rem;flex-wrap:wrap;justify-content:center;align-items:center}
.runtime-item{background:rgba(255,255,255,0.02);padding:.6rem;border-radius:.5rem;display:flex;align-items:center;gap:.6rem;min-width:84px}
.runtime-item img{height:28px;width:auto;display:block}
.runtime-item.large img{height:38px}
.runtime-item.forge.large img{height:44px}
.runtime-item.paper.large img{height:44px}
.runtime-label{font-size:.75rem;color:theme('colors.text-tertiary');text-align:center}
.runtime-section{display:flex;flex-direction:column;align-items:center;gap:.6rem}

@media (max-width:768px){
  .runtime-item{min-width:64px}
}

/* Logo bobbing animation and green glow */
@keyframes bobbing {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.hero-logo {
  animation: bobbing 3s ease-in-out infinite;
  filter: drop-shadow(0 0 20px #34d399) drop-shadow(0 0 35px rgba(52, 211, 153, 0.8)) drop-shadow(0 0 50px rgba(52, 211, 153, 0.5)) drop-shadow(0 0 80px rgba(34, 197, 94, 0.6));
  transition: filter 0.3s ease;
}

.hero-logo:hover {
  filter: drop-shadow(0 0 30px #34d399) drop-shadow(0 0 50px rgba(52, 211, 153, 1)) drop-shadow(0 0 70px rgba(52, 211, 153, 0.7)) drop-shadow(0 0 100px rgba(34, 197, 94, 0.8));
}
