@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@700;800;900&family=VT323&display=swap');

:root {
    /* Create Clockwork Color Palette - Modrinth Green & Industrial Tones */
    --bg-main: #06080a;
    --bg-surface: rgba(16, 20, 26, 0.9);

    --modrinth-green: #1BD96A;
    --modrinth-vibrant: #34ed82;
    --modrinth-dark: #14a450;
    --modrinth-glow: rgba(27, 217, 106, 0.3);

    /* Primary Accent Mapping */
    --accent: var(--modrinth-green);
    --accent-vibrant: var(--modrinth-vibrant);
    --accent-dark: var(--modrinth-dark);
    --accent-glow: var(--modrinth-glow);

    /* Backward Compatibility / Legacy Mappings */
    --brass: var(--accent);
    --brass-vibrant: var(--accent-vibrant);
    --brass-dark: var(--accent-dark);
    --brass-glow: var(--accent-glow);

    --copper: #14a450;
    /* Also shift copper towards green or keep it for variety */
    --copper-glow: rgba(20, 164, 80, 0.2);

    --iron: #3D3D3D;
    --andesite: #5E5E5E;

    --text-primary: #f0f2f5;
    --text-secondary: #a0a8b4;
    --text-muted: #6b7280;

    --pixel-font: 'VT323', monospace;
    --glass-blur: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Layout Utilities */
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-4xl {
    max-width: 56rem;
    width: 100%;
    padding: 0 1.5rem;
}

.max-w-3xl {
    max-width: 48rem;
    width: 100%;
    padding: 0 1.5rem;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* Subtle industrial texture */
    background-image:
        radial-gradient(circle at 50% 50%, rgba(27, 217, 106, 0.05) 0%, transparent 80%),
        url("assets/dark-leather.png");
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* Background Gears */
.gear-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.15;
}

.gear {
    position: absolute;
    fill: var(--brass);
    animation: rotate infinite linear;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-mechanical {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.02);
        filter: brightness(1.2);
    }
}

@keyframes vibrate {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(1px, -1px);
    }

    50% {
        transform: translate(-1px, 1px);
    }

    75% {
        transform: translate(1px, 1px);
    }

    100% {
        transform: translate(0, 0);
    }
}

.gear-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
    animation-duration: 20s;
}

.gear-2 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: -30px;
    animation-duration: 15s;
    animation-direction: reverse;
}

.gear-3 {
    width: 100px;
    height: 100px;
    top: 40%;
    right: 10%;
    animation-duration: 10s;
}

/* Mechanical Header/Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    background: rgba(27, 217, 106, 0.1);
    border: 3px solid var(--brass);
    border-radius: 4px;
    color: var(--brass);
    font-family: var(--pixel-font);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px var(--brass-glow);
    animation: vibrate 0.2s infinite linear;
    animation-play-state: paused;
}

.badge:hover {
    animation-play-state: running;
}

.pixel-text {
    font-family: var(--pixel-font);
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #ff4444;
    border-radius: 2px;
    position: relative;
    box-shadow: 0 0 10px #ff0000;
}

/* Hero Section Overhaul */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.hero-title {
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 0.85;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
}

.hero-title .accent {
    color: var(--brass);
    background: linear-gradient(to bottom, var(--brass) 0%, var(--brass-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Fallback for background-clip */
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 3.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-left: 3px solid var(--brass);
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(4px);
}

/* IP Box: Mechanical Input */
.ip-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 2rem;
    background: #10141a;
    border: 3px solid var(--iron);
    border-bottom: 6px solid var(--brass-dark);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 10px 0 #000;
}

.ip-box:active {
    transform: translateY(4px);
    box-shadow: 0 6px 0 #000;
    border-bottom-width: 2px;
}

.ip-box::before {
    content: '⚙';
    position: absolute;
    left: -10px;
    color: var(--brass);
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--brass);
}

.ip-box:hover {
    border-color: var(--brass);
    box-shadow: 0 12px 0 #000, 0 0 30px var(--brass-glow);
}

.ip-box .label {
    font-family: var(--pixel-font);
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--brass);
}

.ip-box .address {
    font-family: var(--pixel-font);
    font-size: 2.2rem;
    color: #fff;
    letter-spacing: 1px;
}

/* Feature Cards: Industrial Glass */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 3rem auto 0;
    padding: 0 1rem;
}

.glass-card {
    background: var(--bg-surface);
    border: 3px solid var(--iron);
    border-top: 6px solid var(--brass);
    border-radius: 8px;
    padding: 2.5rem;
    transition: all 0.3s;
    position: relative;
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.5);
}

.glass-card:hover {
    transform: translate(-5px, -5px);
    border-color: var(--brass);
    box-shadow: 15px 15px 0 rgba(0, 0, 0, 0.5), 0 0 40px var(--brass-glow);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--iron);
    border: 3px solid var(--brass);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--brass);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Animated Steam/Particles (Subtle) */
.steam-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Buttons: Create UI */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 3rem;
    background: var(--brass);
    color: #000;
    text-decoration: none;
    border-radius: 2px;
    font-weight: 800;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--brass-dark);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--brass-dark);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 3rem;
    background: #2a2e37;
    color: #fff;
    border: 2px solid var(--iron);
    border-radius: 2px;
    font-weight: 800;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #111;
}

.btn-modrinth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
}

.btn-modrinth-brand img {
    height: auto;
    max-height: 80px;
    /* Force it to stay reasonable */
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.btn-modrinth-brand:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.btn-modrinth-brand:active {
    transform: scale(0.98);
}

/* Logs: Dark Industrial Monitor */
.terminal {
    background: #020305;
    border: 4px solid var(--iron);
    border-radius: 4px;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 1);
    font-family: var(--pixel-font);
    font-size: 1.2rem;
}

.terminal-header {
    background: var(--iron);
    border-bottom: 3px solid var(--brass);
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
}

/* Language Menu */
.lang-menu {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: var(--bg-surface);
    border: 2px solid var(--iron);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #000;
}

.lang-btn.active {
    border-color: var(--brass);
    color: var(--brass);
    background: rgba(27, 217, 106, 0.1);
}

.lang-btn:hover {
    transform: translateY(-2px);
    border-color: var(--brass);
}

/* Admin Dashboard Overlay */
.admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.admin-overlay.visible {
    display: flex;
}

.admin-panel {
    width: 100%;
    max-width: 450px;
    background: #1a1e26;
    border: 3px solid var(--brass);
    border-radius: 8px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 1);
}

.admin-panel h2 {
    color: var(--brass);
    margin-bottom: 2rem;
    text-align: center;
}

.admin-input-group {
    margin-bottom: 1.5rem;
}

.admin-input-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.admin-input {
    width: 100%;
    background: #0b0d11;
    border: 2px solid var(--iron);
    padding: 1rem;
    color: #fff;
    font-family: ui-monospace, monospace;
    border-radius: 4px;
    outline: none;
}

.admin-input:focus {
    border-color: var(--brass);
}

.admin-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-amp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #7f1d1d;
    color: #fca5a5;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid #991b1b;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.btn-amp:hover {
    background: #991b1b;
    color: #fff;
    box-shadow: 0 0 20px rgba(153, 27, 27, 0.4);
}

/* Hidden Admin Trigger */
.admin-trigger {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 10px;
    height: 10px;
    background: transparent;
    cursor: pointer;
}

/* Deployment Instructions / Help Section */
.help-section {
    padding: 6rem 2rem;
    background: rgba(16, 20, 26, 0.4);
    border-top: 3px solid var(--iron);
}

.step-card {
    background: #10141a;
    border-left: 5px solid var(--brass);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .step-card {
        padding: 3rem;
    }
}

.step-number {
    font-family: var(--pixel-font);
    font-size: 2rem;
    color: var(--brass);
    margin-bottom: 0.5rem;
    display: block;
}

/* Global Animate */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}