:root {
    --bg-color: #0f172a;
    /* Slate 900 */
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-bg: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #cbd5e1;
    /* Slate 300 - Improved contrast */
    --accent-n8n: #ff6b6b;
    --accent-npm: #4ecdc4;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* 3D Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.8;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    z-index: 1;
}

header {
    margin-bottom: 5rem;
    text-align: center;
    animation: fadeInDown 1s ease-out;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

header p {
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    background: var(--card-hover-bg);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.card-content {
    position: relative;
    z-index: 2;
}

/* Glow effect */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 255, 255, 0.06) 0%,
            transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.card:hover .card-glow {
    opacity: 1;
}

.icon-box {
    width: 56px;
    height: 56px;
    margin-bottom: 2rem;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.card:hover .icon-box {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

.n8n-color {
    color: var(--accent-n8n);
}

.npm-color {
    color: var(--accent-npm);
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.status {
    margin-top: auto;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.75rem;
    position: relative;
}

.online {
    background-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.dot.online::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.maintenance {
    background-color: #f59e0b;
}

.puzzle {
    opacity: 0.8;
}

footer {
    margin-top: 6rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .card:hover {
        transform: translateY(-5px);
    }
}