:root {
    --primary-color: #0a0a0a;
    --secondary-color: #1a1a1a;
    --accent-color: #333333;
    --light-color: #ffffff;
    --dark-color: #000000;
    --success-color: #93c5fd;
    --danger-color: #e5e5e5;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --border-radius: 0;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --prey-color: rgba(65, 145, 255, 0.9);
    --prey-color-faded: rgba(65, 145, 255, 0.3);
    --predator-color: rgba(255, 65, 65, 0.9);
    --predator-color-faded: rgba(255, 65, 65, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--gray-100);
    background-color: var(--dark-color);
    padding: 0;
    margin: 0;
    background-image: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--accent-color);
}

h1 {
    color: var(--light-color);
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.subtitle {
    color: var(--gray-400);
    font-size: 1rem;
    font-style: italic;
}

/* Equation Display Styles */
.equations-display {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .equations-display {
        flex-direction: row;
        justify-content: space-between;
    }
}

.equation-card {
    background-color: var(--primary-color);
    border: 1px solid var(--accent-color);
    padding: 1.5rem;
    flex: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.equation-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.equation-card.prey {
    border-left: 3px solid var(--prey-color);
}

.equation-card.predator {
    border-left: 3px solid var(--predator-color);
}

.equation-card.simulating {
    animation: equation-pulse 1.5s infinite alternate;
}

.equation-title {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.prey .equation-title {
    color: var(--prey-color);
}

.predator .equation-title {
    color: var(--predator-color);
}

.prey.simulating .equation-title {
    animation: text-glow-blue 1.5s infinite alternate;
}

.predator.simulating .equation-title {
    animation: text-glow-red 1.5s infinite alternate;
}

@keyframes text-glow-blue {
    0% {
        text-shadow: 0 0 5px rgba(65, 145, 255, 0.3);
    }
    100% {
        text-shadow: 0 0 15px rgba(65, 145, 255, 0.7);
    }
}

@keyframes text-glow-red {
    0% {
        text-shadow: 0 0 5px rgba(255, 65, 65, 0.3);
    }
    100% {
        text-shadow: 0 0 15px rgba(255, 65, 65, 0.7);
    }
}

.equation {
    margin: 1.5rem 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.equation-description {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray-400);
    font-family: 'Courier New', monospace;
}

.equation-description span {
    position: relative;
    padding-left: 1.5rem;
}

.equation-description span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 1rem;
    height: 1px;
}

.growth::before {
    background-color: var(--gray-300);
}

.prey .growth::before {
    background-color: var(--prey-color);
}

.predator .growth::before {
    background-color: var(--predator-color);
}

.death::before {
    background-color: var(--gray-600);
}

/* Animation for MathJax elements */
.MathJax {
    transition: all 0.5s ease;
}

.MathJax:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.simulating .MathJax {
    animation: mathJax-pulse 2s infinite alternate;
}

@keyframes mathJax-pulse {
    0% {
        opacity: 0.9;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Existing content styles */
.content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .content {
        grid-template-columns: 300px 1fr;
    }
}

.card {
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    border: 1px solid var(--accent-color);
}

.card-header {
    background-color: var(--secondary-color);
    color: var(--light-color);
    padding: 1rem;
    border-bottom: 1px solid var(--accent-color);
}

.card-header h2 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: var(--gray-300);
    font-family: 'Courier New', monospace;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--dark-color);
    color: var(--light-color);
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--gray-300);
    box-shadow: 0 0 0 1px var(--gray-300);
}

.btn {
    display: inline-block;
    background-color: var(--dark-color);
    color: var(--light-color);
    border: 1px solid var(--accent-color);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 1rem;
}

.btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--gray-300);
}

.chart-card {
    height: 100%;
}

.chart-card .card-body {
    padding: 1rem;
}

canvas {
    width: 100%;
    height: 400px;
}

.article-section {
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
    background-color: var(--primary-color);
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.article-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--prey-color), 
        var(--predator-color), 
        transparent);
    animation: border-glow 3s infinite alternate;
}

.article-content {
    position: relative;
    z-index: 1;
}

.article-section h3 {
    color: var(--light-color);
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.article-section p {
    color: var(--gray-300);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.article-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--prey-color);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--prey-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.article-link:hover {
    background-color: var(--prey-color);
    color: var(--light-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(65, 145, 255, 0.3);
}

.article-link .link-text {
    font-weight: 500;
    letter-spacing: 1px;
}

.article-link .link-arrow {
    transition: transform 0.3s ease;
}

.article-link:hover .link-arrow {
    transform: translateX(4px);
}

@keyframes border-glow {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--accent-color);
    color: var(--gray-500);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.creator {
    margin-top: 1rem;
    color: var(--light-color);
    font-style: normal;
    font-size: 0.9rem;
    letter-spacing: 2px;
    opacity: 1;
    text-transform: uppercase;
    border-top: 1px solid var(--accent-color);
    padding-top: 1rem;
    font-weight: 500;
    animation: credit-pulse 2s infinite alternate;
}

.author-name {
    color: white;
    font-weight: 700;
    background: linear-gradient(90deg, 
        var(--prey-color) 0%, 
        var(--predator-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 0 4px;
    position: relative;
}

.author-name::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        var(--prey-color) 0%, 
        var(--predator-color) 100%);
}

@keyframes credit-pulse {
    0% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }
    100% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    }
}

@keyframes equation-pulse {
    0% {
        border-left-width: 3px;
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.05);
    }
    100% {
        border-left-width: 5px;
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    }
}

.author-link {
    text-decoration: none;
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}

.author-link:hover {
    transform: scale(1.1);
}

.author-link:hover .author-name::after {
    height: 2px;
    background: linear-gradient(90deg, 
        var(--prey-color) 30%, 
        var(--predator-color) 70%);
    animation: link-shine 1.5s infinite;
}

@keyframes link-shine {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
