:root {
    --bg: #0d0d0f;
    --fg: #e0e0e2;
    --accent: #d62828;
    --dim: #a0a0a0;
    --max-width: 900px;
}

body {
    margin: 0;
    height: 100vh;
    background: var(--bg);
    color: var(--fg);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: var(--max-width);
    width: 100%;
    padding: 40px;
    box-sizing: border-box;
    gap: 40px;
    text-align: left;
    animation: fadeSlideUp 1s ease-out forwards;
    opacity: 0;
}

.content {
    flex: 1;
    z-index: 2;
    min-width: 280px;
}

.gear-wrapper {
    flex: none;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeZoomIn 1.2s ease-out forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.gear {
    fill: var(--accent);
    position: relative;
    filter: drop-shadow(0 0 10px rgba(214, 40, 40, 0.6));
    max-width: 100%;
    height: auto;
}

.gear.big {
    width: 100%;
    max-width: 140px;
    animation: spin 12s linear infinite, glow 3s ease-in-out infinite alternate;
}

.gear.small {
    width: 100%;
    max-width: 90px;
    margin-top: -40px;
    margin-left: 20px;
    animation: spinReverse 9s linear infinite, glow 3s ease-in-out infinite alternate;
    opacity: 0.85;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spinReverse {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px rgba(214,40,40,0.3)); }
    to { filter: drop-shadow(0 0 25px rgba(214,40,40,0.8)); }
}

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

h2.tag {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 10px;
    font-weight: 500;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin: 0 0 20px;
    background: linear-gradient(90deg, #ff4d4d, #b30000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(214, 40, 40, 0.5);
}

p {
    color: var(--dim);
    font-size: clamp(1rem, 2.5vw, 1.05rem);
    line-height: 1.6;
}

a {
    position: relative;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.25s ease;
    box-shadow: 0 0 6px rgba(214, 40, 40, 0.6);
}

a:hover,
a:focus,
a:active {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(214, 40, 40, 0.7);
    outline: none;
}

a:hover::after,
a:focus::after {
    width: 100%;
}

::selection {
    background: rgba(214, 40, 40, 0.3);
    color: var(--fg);
}

footer {
    position: absolute;
    bottom: 15px;
    font-size: 0.9rem;
    color: var(--dim);
    text-align: center;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 30px;
    }

    .gear-wrapper {
        max-width: 160px;
    }

    .gear.big {
        max-width: 100px;
    }

    .gear.small {
        max-width: 70px;
        margin-top: -30px;
        margin-left: 15px;
    }
}
