.training-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.training-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

.training-squares-container {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.training-square {
    width: 50px;
    height: 50px;
    background-color: white;
    border: 2px solid #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease-out;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    will-change: transform;
    -webkit-touch-callout: none;
}

.training-square:hover {
    transform: scale(1.05);
}

.training-square .value {
    font-size: 24px;
    font-weight: bold;
}

.training-square .label {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #333;
    background-color: white;
    padding: 0 4px;
    border-radius: 2px;
    z-index: 1;
}

.training-square.purple .label {
    color: #333;
    background-color: white;
}

.training-explanation {
    margin-top: 1rem;
    text-align: left;
}

.training-explanation.hidden {
    display: none;
}

.training-controls {
    margin-top: 2rem;
}

.training-controls button {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
}

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

.training-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
    gap: 10px;
}

.slide-arrow-container,
.bidirectional-arrows {
    margin-top: 10px;
}

.slide-arrow {
    text-align: center;
    white-space: nowrap;
}

.slide-arrow .arrow-text {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
}

.arrow {
    font-size: 24px;
    color: #007bff;
    transform: rotate(45deg);
}

@keyframes pulse {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(5px);
        opacity: 0.7;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.training-explanation:not(.hidden) ~ .training-container .slide-arrow-container {
    display: none;
}

.slide-arrow-container.hidden {
    display: none;
}

.reset-btn {
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.reset-btn:hover {
    background-color: #5a6268;
}

#slideResults {
    margin-top: 10px;
    padding-left: 20px;
}

#slideResults li {
    margin-bottom: 8px;
    color: #666;
}

.slide-arrow.hidden {
    display: none;
}

.truth-table {
    margin-bottom: 20px;
    width: 100%;
    max-width: 400px;
}

.truth-table h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.truth-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.truth-table th,
.truth-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.truth-table th {
    background-color: #007bff;
    color: white;
    font-weight: 500;
}

.truth-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.truth-table td:first-child {
    font-weight: bold;
    color: #007bff;
}

#directionExplanation {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.training-square.dragging {
    z-index: 1000;
    opacity: 0.9;
    transition: none;
}

.training-square.white {
    background-color: white;
    color: black;
}

.training-square.purple {
    background-color: purple;
    color: white;
}

.truth-table td[colspan="2"] {
    text-align: center;
    font-weight: bold;
}

.truth-table table {
    font-size: 0.9em;
}

.truth-table th,
.truth-table td {
    padding: 8px 6px;
}

.truth-table td:nth-child(4) {
    font-style: italic;
    color: #666;
}

.training-square.tan {
    background-color: tan;
    color: black;
}

.training-square.orange {
    background-color: orange;
    color: black;
}

.math-explanation {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-left: 4px solid #ff8c00;
    font-size: 0.9em;
    color: #666;
}

.movement-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.horizontal-cards {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.vertical-card {
    display: flex;
    justify-content: center;
}

.vertical-card.top {
    margin-bottom: -5px;
}

.vertical-card.bottom {
    margin-top: -5px;
}

.movement-explanation {
    margin-top: 20px;
    text-align: left;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.movement-explanation ul {
    list-style: none;
    padding-left: 0;
}

.movement-explanation li {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.movement-explanation li::before {
    font-size: 1.2em;
}

.movement-explanation li:nth-child(1)::before {
    content: "→";
    color: #28a745;
}

.movement-explanation li:nth-child(2)::before {
    content: "↕";
    color: #28a745;
}

.movement-explanation li:nth-child(3)::before {
    content: "✗";
    color: #dc3545;
}

.movement-grid .training-square {
    width: 60px;
    height: 60px;
    margin: 0;
    cursor: default;
}

.movement-grid .training-square:hover {
    transform: none;
}

.move-results {
    margin-top: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    text-align: left;
}

.move-results.hidden {
    display: none;
}

.move-results h4 {
    margin: 0 0 8px 0;
    color: #333;
}

.move-results .operation {
    font-weight: bold;
    color: #007bff;
}

.move-results .result {
    color: #666;
    font-style: italic;
}

.movement-grid {
    margin-bottom: 10px;
}

/* Add these new styles for the Special Colors screen */
.color-explanation {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    text-align: left;
}

.color-explanation ul {
    list-style: none;
    padding-left: 0;
    margin: 10px 0;
}

.color-explanation li {
    margin: 8px 0;
    padding: 8px;
    border-radius: 4px;
}

.green-example {
    background-color: #28a745;
    color: white;
}

.yellow-example {
    background-color: #ffc107;
    color: black;
}

.prompt-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.training-square.prompt {
    background-color: #f0f0f0;
    cursor: default;
}

.training-square.correct-position {
    background-color: #28a745;
    color: white;
}

.training-square.correct-value {
    background-color: #ffc107;
    color: black;
}

.puzzle-wrapper {
    position: relative;
    margin: 20px 0;
}

.target-indicator {
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    color: #dc3545;
    font-size: 24px;
}

.puzzle-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.puzzle-row {
    display: flex;
    gap: 10px;
}

.color-hint {
    margin-top: 15px;
    padding: 12px;
    background-color: #e9ecef;
    border-radius: 8px;
    font-style: italic;
    color: #666;
}

.drag-instruction {
    margin-top: 10px;
    padding: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-style: italic;
    color: #666;
    font-weight: bold;
}

.grey-example {
    background-color: grey;
    color: white;
    border: 2px solid black;
}

.training-square.grey {
    background-color: grey;
    color: white;
    border: 2px solid black;
    cursor: not-allowed;
}

.training-square.immovable {
    pointer-events: none;
}

.training-complete {
    text-align: left;
    padding: 20px;
}

.training-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #28a745;
}

.training-summary ul {
    list-style: none;
    padding-left: 0;
}

.training-summary li {
    margin: 10px 0;
    padding-left: 25px;
    position: relative;
}

.training-summary li::before {
    content: "✓";
    color: #28a745;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.good-luck {
    font-size: 1.1em;
    color: #007bff;
    text-align: center;
    margin-top: 20px;
    font-weight: bold;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.training-link {
    color: white;
    text-decoration: underline;
    margin-left: 30px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 21px;
}

.training-link:hover {
    color: #f0f0f0;
}
 