:root {
    --bg-color: #f4f4f9;
    --text-color: #333;
    --primary: #2563eb;
    --unvisited: #e5e7eb;
    --current: #fde047;
    --visited: #4ade80;
}

h1:has(img) {
    display: flex;
    align-items: center;
    font-size: 28px;
}

h1 > img {
    height: 60px;
    margin-right: 5px;
}

h3 {
    width: 100%;
    text-align: center;
    font-size: 22px;
    padding-bottom: 0.3em;
    margin: 0.5em 0;
    border-bottom: 2px solid #000000;
}

label {
    padding: 5px;
}

.applet-container {
    display: flex;
    gap: 20px;
    margin: 0 auto 20px auto;
}

.side-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    gap: 15px;
}

.visualizer-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: auto;
}

.code-display {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.5;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.code-line {
    padding: 2px 5px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.code-line.active {
    background-color: #3b82f6;
    color: white;
    font-weight: bold;
}

#network-container {
    width: 100%;
    height: 500px;
    border: 2px solid #94a3b8;
    border-radius: 8px;
    background-color: #fafafa;
    margin-top: 15px;
}

textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: monospace;
    resize: vertical;
}

button {
    flex: 1;
    padding: 0.8em;
    border: 3px solid #404040;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    filter: brightness(0.8);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media only screen and (max-width: 849px) {

    .applet-container {
        flex-direction: column;
        gap: 20px;
}

}