/* Pangea Documentation Styles */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --bg-color: #ecf0f1;
    --code-bg: #2c3e50;
    --code-text: #ecf0f1;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--bg-color);
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.9;
}

nav {
    background: var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

nav a:hover {
    background: var(--secondary-color);
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h2 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

code {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
    border-left: 4px solid var(--secondary-color);
}

pre code {
    background: none;
    padding: 0;
}

.example-box {
    background: #f8f9fa;
    border-left: 4px solid var(--success-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.info-box {
    background: #d1ecf1;
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.animation-container {
    background: #f8f9fa;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    border: 2px solid var(--secondary-color);
}

.stack-visual {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    max-width: 300px;
    margin: 2rem auto;
}

.stack-item {
    background: var(--secondary-color);
    color: white;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    animation: stackPush 0.3s ease-out;
}

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

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

.eval-step {
    background: white;
    border: 2px solid var(--secondary-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.token {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    margin: 0.2rem;
    border-radius: 4px;
    font-family: monospace;
}

.token.operator {
    background: var(--accent-color);
}

.token.number {
    background: var(--success-color);
}

.token.evaluated {
    background: #95a5a6;
    text-decoration: line-through;
}

.diagram {
    margin: 2rem auto;
    text-align: center;
}

.interactive-demo {
    background: white;
    border: 2px solid var(--secondary-color);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.interactive-demo input,
.interactive-demo textarea {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1rem;
}

.interactive-demo button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.3s;
}

.interactive-demo button:hover {
    background: var(--primary-color);
}

.output {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    font-family: monospace;
    min-height: 50px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: var(--secondary-color);
    color: white;
}

tr:hover {
    background: #f8f9fa;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    main {
        margin: 1rem;
        padding: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    header h1 {
        font-size: 2rem;
    }
}