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

body {
    background: #0a0a0f;
    color: #c8c8d4;
    font-family: 'Georgia', serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#container {
    max-width: 960px;
    width: 100%;
    padding: 2rem;
}

/* Introduction */
#intro {
    text-align: center;
    padding: 4rem 2rem;
}

#intro h1 {
    font-size: 2.4rem;
    color: #e0e0ec;
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

#intro-text {
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

#intro-text p {
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

button {
    background: transparent;
    border: 1px solid #555;
    color: #c8c8d4;
    padding: 0.8rem 2rem;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 2px;
}

button:hover {
    border-color: #aaa;
    color: #fff;
}

/* Environment bar */
#environment-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #222;
    border-radius: 3px;
    font-size: 0.9rem;
    background: #0d0d14;
}

#env-name {
    transition: color 0.5s;
}

#round-counter {
    color: #666;
}

/* Systems */
#systems {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.system {
    flex: 1;
    max-width: 300px;
    text-align: center;
    border: 1px solid #1a1a24;
    border-radius: 4px;
    padding: 1rem;
    background: #0d0d14;
    transition: border-color 0.5s;
}

.system-label {
    font-size: 1rem;
    color: #e0e0ec;
    margin-bottom: 0.8rem;
    letter-spacing: 0.03em;
}

.system-canvas {
    display: block;
    margin: 0 auto 0.8rem;
    border-radius: 3px;
}

.system-description {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    min-height: 2.4rem;
    transition: color 0.5s;
}

/* System states */
.system.broken {
    border-color: #442222;
}

.system.broken .system-description {
    color: #884444;
}

.system.scattered {
    border-color: #333322;
}

.system.adapted {
    border-color: #224433;
}

.system.adapted .system-description {
    color: #66aa88;
}

/* Perturbation area */
#perturbation-area {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
}

#perturbation-prompt {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #999;
}

#perturbation-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

#perturbation-buttons button {
    font-size: 0.85rem;
    padding: 0.6rem 1.4rem;
}

#perturbation-buttons button:hover {
    border-color: #cc8844;
    color: #cc8844;
}

/* Narration */
#narration {
    text-align: center;
    padding: 1rem 2rem;
    min-height: 5rem;
}

#narration-text {
    line-height: 1.7;
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto 1rem;
}

#narration-text p {
    margin-bottom: 0.8rem;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

#narration-text .emphasis {
    color: #e0e0ec;
    font-style: italic;
}

#narration-text .question {
    color: #aaaacc;
    font-size: 1.05rem;
    margin-top: 1.5rem;
}

/* Reflection */
#reflection {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 640px;
    margin: 0 auto;
}

#reflection-text {
    line-height: 1.8;
    font-size: 1rem;
}

#reflection-text p {
    margin-bottom: 1.2rem;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

#reflection-text .stat {
    color: #e0e0ec;
    font-size: 1.1rem;
}

#reflection-text .source {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

#reflection-text .final {
    color: #aaaacc;
    font-size: 1.05rem;
    margin-top: 2rem;
    font-style: italic;
}

#restart-btn {
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    #systems {
        flex-direction: column;
        align-items: center;
    }

    .system {
        max-width: 100%;
        width: 100%;
    }

    .system-canvas {
        width: 100%;
        height: auto;
    }
}
