body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #4CAF50;
    font-family: 'UnifrakturMaguntia', serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.smoke {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://i.imgur.com/5zX9W.gif') repeat;
    opacity: 0.2;
    z-index: -1;
    animation: drift 60s linear infinite;
}

@keyframes drift {
    0% { background-position: 0 0; }
    100% { background-position: 1000px 1000px; }
}

header {
    text-align: center;
    padding: 50px 20px;
}

h1 {
    font-size: 3rem;
    margin: 0;
    text-shadow: 0 0 10px #4CAF50;
}

nav {
    margin: 20px 0;
}

nav a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 1.5rem;
    margin: 0 15px;
}

nav a:hover {
    color: #81C784;
}

main {
    max-width: 1200px;
    padding: 20px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#simulator-container {
    display: flex;
    justify-content: flex-start; /* Align to left */
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    gap: 20px;
}

#library-section {
    width: 250px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 5px;
    color: #fff;
    font-family: Arial, sans-serif;
    position: sticky;
    top: 20px;
    max-height: 80vh;
    overflow-y: auto;
    margin-left: 20px; /* Closer to left edge */
}

#library-section h3 {
    margin-top: 0;
}

#equation-list {
    list-style: none;
    padding: 0;
}

#equation-list li {
    margin: 10px 0;
    cursor: pointer;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background-color 0.3s;
}

#equation-list li:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#plot-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#sketch-holder {
    width: 800px;
    height: 600px;
    position: relative;
    z-index: 10;
}

#controls {
    margin: 20px 0;
    font-family: Arial, sans-serif;
}

button, input {
    font-family: Arial, sans-serif;
    background-color: #4CAF50;
    color: #e0e0e0;
    border: none;
    padding: 10px;
    margin: 5px;
    cursor: pointer;
}

button:hover, input:hover {
    background-color: #81C784;
}

#vertices-list {
    max-width: 800px;
    text-align: left;
    font-family: Arial, sans-serif;
}

.vertex-item {
    margin: 10px 0;
}