/* Styles specific to the Practice Lab page */

/* Exercise navigation */
.exercise-nav {
    margin: 2rem 0;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.exercise-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.exercise-link {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.exercise-link:hover {
    background-color: #357dc0;
}

/* Practice sections */
.practice-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.practice-section:last-child {
    border-bottom: none;
}

/* Tool styling */
.practice-tool {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
    overflow: hidden;
}

.tool-header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
}

.tool-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
}

.tool-interface {
    padding: 1.5rem;
}

/* Exercises */
.practice-exercise {
    margin-top: 2rem;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.exercise-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed #ccc;
}

.exercise-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.answer-feedback {
    margin-top: 0.8rem;
    padding: 0.8rem;
    border-radius: 4px;
    font-weight: 500;
}

.answer-feedback.correct {
    background-color: rgba(92, 184, 92, 0.2);
    color: #5cb85c;
}

.answer-feedback.incorrect {
    background-color: rgba(217, 83, 79, 0.2);
    color: #d9534f;
}

/* Input styles */
.input-help {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.3rem;
}

/* Challenge section */
.challenge-section {
    background-color: #f0f4f8;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 3rem;
}

.challenge-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.challenge-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.challenge-question {
    margin-bottom: 1.5rem;
}

.encrypted-message {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.hint-container {
    margin-top: 1rem;
}

.hint-text {
    margin-top: 1rem;
    padding: 0.8rem;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.hidden {
    display: none;
}

.monospace {
    font-family: monospace;
    word-break: break-all;
}

/* Playfair grid */
.playfair-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    margin: 1rem 0;
    max-width: 300px;
}

.grid-cell {
    background-color: #f0f4f8;
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    font-family: monospace;
}

/* Pigpen result */
.pigpen-result {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    min-height: 80px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.pigpen-symbol {
    width: 50px;
    height: 50px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .challenge-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .exercise-links {
        flex-direction: column;
    }
    
    .tool-interface {
        padding: 1rem;
    }
    
    .practice-exercise {
        padding: 1rem;
    }
    
    .challenge-section {
        padding: 1.5rem;
    }
}