body {
    margin: 0;
    font-family: Arial;
    background: #0d0d0d;
    color: white;
}

#tsparticles {
    position: fixed;
    inset: 0;
    z-index: -1;
}

.app {
    padding: 20px;
}

h1 {
    text-align: center;
    color: #00ff88;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

button,
input,
select {
    padding: 6px 10px;
    border-radius: 5px;
    border: none;
}

button {
    background: #00ff88;
    font-weight: bold;
    cursor: pointer;
}

.info {
    margin-bottom: 15px;
}

.pointer-info {
    margin-top: 5px;
}

.main-layout {
    display: flex;
    gap: 20px;
}

.visual-section {
    flex: 2;
    background: rgba(20, 20, 20, 0.9);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
}

.queue-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.box {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    background: #e0e0e0;
    border: 3px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: black;
    position: relative;
    transition: transform 0.5s, opacity 0.5s;
}

.enqueuing {
    animation: slideIn 0.5s ease-in;
}

.dequeuing {
    animation: slideOut 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100px); opacity: 0; }
}

.resetting {
    animation: fadeOut 0.5s ease-out;
}

@keyframes fadeOut {
    to { opacity: 0; }
}

.pseudocode {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 10px;
    border-radius: 5px;
}

.line {
    display: block;
    padding: 2px 0;
}

.line.condition {
    background-color: #ff6b35;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 10px #ff6b35;
}

.line.assignment {
    background-color: #00ff88;
    color: black;
    font-weight: bold;
    box-shadow: 0 0 10px #00ff88;
}

.line.error {
    background-color: #ff0000;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 10px #ff0000;
}

.line.normal {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 10px #007bff;
}

.pointer {
    position: absolute;
    top: -20px;
    font-size: 14px;
    color: red;
    font-weight: bold;
}

.code-section {
    flex: 1;
    background: rgba(20, 20, 20, 0.9);
    padding: 15px;
    border-radius: 10px;
}

pre {
    white-space: pre-wrap;
    color: #00ff88;
}

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    .box {
        width: 50px;
        height: 50px;
        font-size: 12px;
    }
    .controls {
        flex-wrap: wrap;
    }
    button, input, select {
        margin: 5px;
    }
}