* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 2rem;
}

h2 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.card {
    background: #414141;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    border: 1px solid #404040;
}

.algorithm-select {
    margin-bottom: 20px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #57abf0;
    color: white;
}

.btn-primary:hover {
    background-color: #1976d2;
}

.btn-primary.active {
    background-color: #1565c0;
}

.btn-success {
    background-color: #4caf50;
    color: white;
}

.btn-success:hover {
    background-color: #388e3c;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input[type="text"],
input[type="number"] {
    padding: 8px;
    border: 1px solid #404040;
    border-radius: 4px;
    background: #333333;
    color: #ffffff;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #2196f3;
}

.cache-slots {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.cache-slot {
    flex: 1;
    border: 2px solid #404040;
    padding: 20px;
    text-align: center;
    border-radius: 4px;
    font-size: 18px;
    background: #333333;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.stats-card {
    text-align: center;
    background: #333333;
}

.stats-card h3 {
    color: #ffffff;
    margin-bottom: 10px;
}

.sequence {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sequence-item {
    background: #404040;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cache-slot, .sequence-item {
    animation: fadeIn 0.3s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
}