.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.back-button {
    display: inline-block;
    margin-bottom: 40px;
    padding: 12px 24px;
    background: rgba(0, 255, 136, 0.05);
    color: #00ff88;
    border: 2px solid #00ff88;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    text-shadow: 0 0 10px #00ff88;
}

.back-button:hover {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
}

.page-ontologia header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.page-ontologia header h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite;
}

.subtitle {
    font-size: 1.2em;
    color: #2C974B;
}

@keyframes glow {

    0%,
    100% {
        text-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88;
    }

    50% {
        text-shadow: 0 0 30px #00ff88, 0 0 60px #00ff88;
    }
}

.levels-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
    position: relative;
}

.levels-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #00ff88 0%, transparent 100%);
    transform: translateX(-50%);
}

.level {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 80px;
    align-items: center;
    position: relative;
    animation: levelFadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.level:nth-child(even) .content {
    order: 2;
}

.level:nth-child(even) .visual {
    order: 1;
}

.level:nth-child(odd) .content {
    order: 1;
}

.level:nth-child(odd) .visual {
    order: 2;
}

@keyframes levelFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.level:nth-child(1) {
    animation-delay: 0.2s;
}

.level:nth-child(2) {
    animation-delay: 0.4s;
}

.level:nth-child(3) {
    animation-delay: 0.6s;
}

.level:nth-child(4) {
    animation-delay: 0.8s;
}

.level:nth-child(5) {
    animation-delay: 1s;
}

.level-number {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    border: 2px solid #00ff88;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    color: #0a0e27;
    box-shadow: 0 0 20px #00ff88;
    z-index: 10;
}

.content {
    padding: 30px;
    background: rgba(0, 255, 136, 0.05);
    border: 2px solid #00ff88;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    transition: all 0.3s ease;
}

.content:hover {
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
    transform: translateY(-5px);
}

.content h2 {
    font-size: 1.8em;
    color: #00ff88;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #00ff88;
    overflow-wrap: break-word;
}

.content p {
    color: #00cc66;
    line-height: 1.6;
    font-size: 1em;
}

.content .lead-in {
    margin-top: 15px;
    color: #00ff88;
    font-style: italic;
}

.points {
    margin: 15px 0;
    padding-left: 1.2em;
    line-height: 1.8;
}

.points-tight {
    margin: 10px 0;
}

.visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-box {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 204, 102, 0.05));
    border: 2px solid #00ff88;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
    transition: all 0.3s ease;
}

.icon-box:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.5);
}

.data-wrap {
    overflow-x: auto;
    margin-top: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    color: #00cc66;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    border: 1px solid rgba(0, 255, 136, 0.12);
    vertical-align: top;
}

.data-table th {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.06), rgba(0, 204, 102, 0.02));
    color: #00ff88;
    text-align: left;
}

.data-table tr:nth-child(even) {
    background: rgba(0, 255, 136, 0.02);
}

.category-pseudo {
    color: #ffb86b;
    font-weight: 700;
}

.category-science {
    color: #7efc7e;
    font-weight: 700;
}

@media (max-width: 768px) {
    .levels-container::before {
        left: 30px;
    }

    .level {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
        margin-left: 80px;
    }

    .level:nth-child(odd) .content,
    .level:nth-child(even) .content,
    .level:nth-child(odd) .visual,
    .level:nth-child(even) .visual {
        order: initial;
    }

    /* .level is shifted 80px right: -50px puts the badge on the timeline (30px) */
    .level-number {
        left: -50px;
        top: 0;
    }

    .page-ontologia header h1 {
        font-size: 2em;
    }

    .content {
        padding: 20px;
    }

    .content h2 {
        font-size: 1.4em;
    }

    .icon-box {
        width: 150px;
        height: 150px;
        font-size: 60px;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
        font-size: 0.9em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .level {
        opacity: 1;
    }
}
