@import 'game-shared.css';

/* Game 4 - Classroom PM Sources Styles */

/* Professional Control Pills */
.game-4-section .control-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 28px;
    border: 2px solid;
    background: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 56px;
    white-space: nowrap;
}

.game-4-section .control-pill i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    flex-shrink: 0;
}

.game-4-section .control-pill--primary {
    border-color: #2d9ca9;
}

.game-4-section .control-pill--primary i {
    background: #2d9ca9;
    color: white;
}

.game-4-section .control-pill--secondary {
    border-color: #6c757d;
}

.game-4-section .control-pill--secondary i {
    background: #6c757d;
    color: white;
}

.game-4-section .control-pill--warning {
    border-color: #ffc107;
}

.game-4-section .control-pill--warning i {
    background: #ffc107;
    color: white;
}

.game-4-section .control-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.game-4-section .control-pill:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Game Controls Header */
.game-4-section .game-controls {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Instructions Section */
.game-4-section .instructions-section {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.game-4-section .instructions-section h4 {
    color: #2d9ca9;
    font-weight: 700;
    margin-bottom: 20px;
}

.game-4-section .tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.game-4-section .step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: rgba(45, 156, 169, 0.03);
    border-left: 4px solid #2d9ca9;
    border-radius: 8px;
}

.game-4-section .step .number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #2d9ca9;
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.game-4-section .step p {
    margin: 0;
    line-height: 1.5;
    color: #333;
}

/* Progress Bar Styling */
.game-4-section .progress {
    background: rgba(45, 156, 169, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.game-4-section .progress-bar {
    background: linear-gradient(45deg, #2d9ca9, #81b832);
    transition: width 0.3s ease;
}

/* Image Instructions */
.game-4-section .image-instructions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(45, 156, 169, 0.05);
    border: 1px solid rgba(45, 156, 169, 0.2);
    border-left: 4px solid #2d9ca9;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.game-4-section .image-instructions i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #2d9ca9;
    color: white;
    border-radius: 50%;
    font-size: 16px;
    flex-shrink: 0;
}

/* Main Game Image */
.game-4-section .main-game-image-section .game-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.game-4-section .main-game-image-section .main-game-image {
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.game-4-section .main-game-image-section .main-game-image:hover {
    transform: scale(1.02);
}

.game-4-section .main-game-image-section .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.game-4-section .main-game-image-section .game-image-container:hover .image-overlay {
    opacity: 1;
}

.game-4-section .main-game-image-section .image-overlay i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.game-4-section .main-game-image-section .image-overlay p {
    font-size: 16px;
    font-weight: 600;
}

.game-4-section {
    margin-bottom: 2rem;
}

.draggable-item {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 170px;
    height: 170px;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.draggable-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.draggable-item:active {
    cursor: grabbing;
}

.draggable-item img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 12px;
}

.draggable-item span {
    font-size: 13px;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
    color: #2d9ca9;
}

.basket {
    margin-bottom: 20px;
}

.basket-container {
    background: linear-gradient(145deg, rgba(45, 156, 169, 0.02), rgba(129, 179, 50, 0.02));
    border: 2px dashed #2d9ca9;
    border-radius: 14px;
    min-height: 160px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.basket-container.highlight {
    background: rgba(45, 156, 169, 0.08);
    border-color: #2d9ca9;
    box-shadow: 0 0 20px rgba(45, 156, 169, 0.2);
    transform: scale(1.02);
}

.basket-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    pointer-events: none;
}

.basket-overlay i {
    font-size: 3rem;
    color: rgba(0, 0, 0, 0.1);
}

.basket-container .draggable-item {
    position: relative;
    z-index: 2;
    margin: 5px;
}

.correct {
    background-color: rgba(123, 179, 43, 0.1) !important;
    border: 2px solid #7BB32B !important;
    box-shadow: 0 0 10px rgba(123, 179, 43, 0.3) !important;
}

.correct:after {
    content: '\2713';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 25px;
    height: 25px;
    background-color: #7BB32B;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.incorrect {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3) !important;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

.step {
    display: flex;
    align-items: flex-start;
}

.number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background-color: #2D9CA9;
    color: white;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: bold;
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* Responsive styles */
@media (max-width: 576px) {
    .draggable-item {
        width: 110px;
        height: 110px;
        padding: 10px;
    }
    
    .draggable-item img {
        width: 70px;
        height: 70px;
    }
    
    .draggable-item span {
        font-size: 11px;
    }
    
    .game-4-section .control-pill {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 48px;
    }
    
    .game-4-section .control-pill i {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .basket-container {
        min-height: 140px;
    }
    
    .draggable-item {
        width: 130px;
        height: 130px;
    }
    
    .draggable-item img {
        width: 80px;
        height: 80px;
    }
    
    .draggable-item span {
        font-size: 12px;
    }
}

/* Game 4 - Classroom PM Sources - Specific Styles */
.game-4-section .basket-container[data-type="pm-source"] .basket-overlay i {
    color: #ff9800;
}

.game-4-section .basket-container[data-type="not-pm-source"] .basket-overlay i {
    color: #4caf50;
}

.game-4-section .draggable-item[data-type="pm-source"].correct-item {
    border-color: #ff9800;
    background-color: rgba(255, 152, 0, 0.05);
}

.game-4-section .draggable-item[data-type="not-pm-source"].correct-item {
    border-color: #4caf50;
    background-color: rgba(76, 175, 80, 0.05);
}

/* Carousel Modal Styles */
#imageCarouselModal4 .modal-dialog {
    max-width: 90vw;
}

#imageCarouselModal4 .carousel {
    border-radius: 12px;
    overflow: hidden;
}

#imageCarouselModal4 .carousel-item img {
    max-height: 80vh;
    object-fit: contain;
    background-color: #f8f9fa;
}

#imageCarouselModal4 .carousel-indicators {
    bottom: 10px;
}

#imageCarouselModal4 .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #2d9ca9;
    border: 2px solid #2d9ca9;
}

#imageCarouselModal4 .carousel-indicators button.active {
    background-color: #fff;
}

#imageCarouselModal4 .carousel-control-prev,
#imageCarouselModal4 .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 20px;
}


/* Responsive Carousel Styles */
@media (max-width: 768px) {
    #imageCarouselModal4 .modal-dialog {
        max-width: 95vw;
        margin: 10px;
    }
    
    #imageCarouselModal4 .carousel-control-prev,
    #imageCarouselModal4 .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }
}
