* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #fff;
    font-family: 'Courier New', monospace;
    height: 100vh;
    overflow: hidden;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

header {
    text-align: center;
    margin-bottom: 10px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
}

header p {
    font-size: 1.2rem;
    color: #ccc;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background-color: #111;
    border-radius: 10px;
    border: 1px solid #333;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group label {
    font-size: 1.1rem;
    font-weight: bold;
}

.input-group input {
    padding: 10px;
    border: 2px solid #333;
    background-color: #222;
    color: #fff;
    border-radius: 5px;
    font-size: 1rem;
    width: 150px;
}

.input-group input:focus {
    outline: none;
    border-color: #fff;
}

button {
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: 2px solid #555;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #555;
    border-color: #777;
}

button:active {
    transform: scale(0.95);
}

button:disabled {
    background-color: #111;
    border-color: #333;
    cursor: not-allowed;
    opacity: 0.5;
}

.animation-controls {
    display: flex;
    gap: 10px;
}

.array-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.array-label {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.array {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.array-element {
    width: 50px;
    height: 50px;
    background-color: #333;
    color: #fff;
    border: 2px solid #555;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.5s ease;
    position: relative;
}

.array-element.active {
    background-color: #fff;
    color: #000;
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.array-element.range {
    background-color: #444;
    border-color: #666;
}

.array-element.found {
    background-color: #00ff00;
    color: #000;
    border-color: #00ff00;
    animation: foundPulse 1s ease-in-out;
}

.array-element.not-found {
    background-color: #ff0000;
    color: #fff;
    border-color: #ff0000;
    animation: notFoundPulse 1s ease-in-out;
}

@keyframes foundPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes notFoundPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.info-panel {
    display: flex;
    gap: 40px;
    padding: 20px;
    background-color: #111;
    border-radius: 10px;
    border: 1px solid #333;
    flex-wrap: wrap;
}

.current-step {
    flex: 1;
    min-width: 300px;
}

.current-step h3 {
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.3rem;
}

.current-step p {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.5;
}

.search-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #222;
    border-radius: 5px;
    border: 1px solid #333;
}

.info-item .label {
    font-weight: bold;
    color: #fff;
}

.info-item span:last-child {
    color: #00ff00;
    font-weight: bold;
    font-size: 1.1rem;
}

.result {
    text-align: center;
    padding: 20px;
    background-color: #111;
    border-radius: 10px;
    border: 1px solid #333;
}

.result p {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.result .success {
    color: #00ff00;
}

.result .error {
    color: #ff0000;
}

.result .info {
    color: #ffff00;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        gap: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .animation-controls {
        justify-content: center;
    }
    
    .array-element {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .info-panel {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-info {
        min-width: auto;
    }
}
