/* Game 7 - Mould, Temperature & Humidity - Modern Styles */

/* Reuse Game 6 pill controls for consistency */
.game-7-section .control-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    background: #ffffff;
    color: #2f3b45;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 56px;
}
.game-7-section .control-pill:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,0.08); }
.game-7-section .control-pill .label, .game-7-section .control-pill span { white-space: nowrap; }
.game-7-section .control-pill i { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.game-7-section .control-pill--primary { border-color: #cfe9f2; }
.game-7-section .control-pill--primary i { background: linear-gradient(135deg, #2d9ca9, #4a90e2); color: #fff; }
.game-7-section .control-pill--secondary { border-color: #e1e7ea; }
.game-7-section .control-pill--secondary i { background: linear-gradient(135deg, #6d8a99, #4f6b78); color: #fff; }

/* Main Game Image Section */
.main-game-image-section {
    position: relative;
}

.game-image-container {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
}

.main-game-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.game-image-container:hover .main-game-image {
    transform: scale(1.02);
}

.game-7-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-7-section .main-game-image-section .game-image-container:hover .image-overlay {
    opacity: 1;
}

.game-7-section .main-game-image-section .image-overlay i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.game-7-section .main-game-image-section .image-overlay p {
    font-size: 16px;
    font-weight: 600;
}

/* Inline image instructions */
.image-instructions {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2f3b45;
    background: #f8fafb;
    border: 1px solid #eef2f4;
    border-left: 4px solid #2d9ca9;
    border-radius: 12px;
    padding: 10px 12px;
}
.image-instructions i {
    background: #2d9ca9;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Instructions section */
.instructions-section {
    background: #f8fafb;
    border: 1px solid #eef2f4;
    border-radius: 12px;
}

.instructions-section .card-title {
    color: #2f3b45;
    font-weight: 600;
}

.tutorial-steps .step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.tutorial-steps .number {
    background: linear-gradient(135deg, #2d9ca9, #81b332);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.tutorial-steps p {
    margin: 0;
    color: #2f3b45;
    line-height: 1.5;
}

/* Game controls alignment */
.game-7-section .game-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Draggable items */
.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: 180px;
    height: 180px;
    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: #81b332;
    transform: scale(1.02);
}

.basket-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #ccc;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.basket-container:not(:empty) .basket-overlay {
    opacity: 0;
}

.draggable-item.correct {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.3);
}

.draggable-item.incorrect {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
    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); }
}

/* Confetti animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f0f;
    animation: confetti-fall linear infinite;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Progress bar styling */
.progress {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.progress-bar {
    background: linear-gradient(90deg, #2d9ca9, #81b332);
    transition: width 0.6s ease;
}

/* Carousel Modal Styles */
#imageCarouselModal7 .modal-dialog {
    max-width: 90vw;
}

#imageCarouselModal7 .carousel {
    border-radius: 12px;
    overflow: hidden;
}

#imageCarouselModal7 .carousel-item img {
    max-height: 80vh;
    object-fit: contain;
    background-color: #f8f9fa;
}

#imageCarouselModal7 .carousel-indicators {
    bottom: 10px;
}

#imageCarouselModal7 .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #2d9ca9;
    border: 2px solid #2d9ca9;
}

#imageCarouselModal7 .carousel-indicators button.active {
    background-color: #fff;
}

#imageCarouselModal7 .carousel-control-prev,
#imageCarouselModal7 .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 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-7-section .control-pill {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 48px;
    }
    
    .game-7-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;
    }
    
    #imageCarouselModal7 .modal-dialog {
        max-width: 95vw;
        margin: 10px;
    }
    
    #imageCarouselModal7 .carousel-control-prev,
    #imageCarouselModal7 .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }
}