* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #74ebd5, #9face6); /* Gradient background */
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.container {
    width: 80%;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.aes{

    display: none;
}
#aes{

    display: none;
}
h1 {
    text-align: center;
    margin-bottom: 20px;
}

.cipher-selection, .cipher-form {
    margin: 20px 0;
}

button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="text"], input[type="number"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#result {
    background-color: #f1f1f1;
    padding: 10px;
    border: 1px solid #ddd;
}

select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.visualization-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.visualization-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.step-box {
    padding: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.step-box::after {
    content: '→';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    color: #007BFF;
    font-size: 20px;
    z-index: 1;
}

.step-box:last-child::after {
    display: none;
}

.step-title {
    font-weight: bold;
    color: #007BFF;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

.step-content {
    font-family: monospace;
    word-break: break-all;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .visualization-steps {
        grid-template-columns: 1fr;
    }
    
    .step-box::after {
        content: '↓';
        right: 50%;
        bottom: -15px;
        top: auto;
        transform: translateX(50%);
    }
}

.visualization-grid {
    margin: 20px 0;
    border-collapse: collapse;
    width: auto;
    display: inline-block;
}

.visualization-grid td, .visualization-grid th {
    border: 1px solid #000;
    padding: 10px;
    text-align: center;
    min-width: 40px;
    position: relative;
}

.visualization-grid th {
    background-color: #f0f0f0;
}

.visualization-grid .number-row td {
    background-color: #e6e6e6;
}

.visualization-arrow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: #007BFF;
    font-weight: bold;
}

.encryption-details {
    margin-bottom: 20px;
    font-family: monospace;
    text-align: left;
}

.encryption-result {
    margin-top: 20px;
    font-family: monospace;
    font-weight: bold;
}