/* Styles specific to Symmetric vs Asymmetric Encryption lesson */

/* Animation containers */
.animation-container {
    height: 250px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-header {
    display: flex;
    background-color: var(--primary-color);
    color: white;
}

.comparison-row {
    display: flex;
    border-bottom: 1px solid #eee;
}

.comparison-row:nth-child(even) {
    background-color: #f8f9fa;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-cell {
    flex: 1;
    padding: 0.8rem;
}

.comparison-cell:first-child {
    font-weight: 600;
    flex: 0.5;
    border-right: 1px solid #eee;
}

.header-cell {
    font-weight: 700;
    text-align: center;
}

/* Hybrid encryption flow */
.hybrid-flow-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.hybrid-step {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.hybrid-step.active {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    opacity: 1;
}

.step-number {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.step-content h4 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.step-content p {
    margin: 0;
    font-size: 0.9rem;
}

/* Encryption selector */
.selector-container {
    margin: 1.5rem 0;
}

.selector-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selector-dropdown {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 1rem;
}

/* Animation elements */
.character {
    position: absolute;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.character-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.character-name {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.message {
    position: absolute;
    background-color: #f0f4f8;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-family: monospace;
    text-align: center;
    transition: all 0.5s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.key {
    position: absolute;
    width: 40px;
    height: 20px;
    background-color: var(--secondary-color);
    border-radius: 3px;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .hybrid-flow-container {
        grid-template-columns: 1fr;
    }
    
    .comparison-header, .comparison-row {
        flex-direction: column;
    }
    
    .comparison-cell:first-child {
        border-right: none;
        border-bottom: 1px solid #eee;
        background-color: #f0f4f8;
    }
    
    .header-cell {
        text-align: left;
    }
}