@import 'game-shared.css';

/* Game 6 - Temperature & Humidity Styles */

.game-6-section {
    margin-bottom: 2rem;
}

/* Professional How-to section */
.game-6-section .instructions-section {
    background: #ffffff;
    border: 1px solid #eef2f4;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.game-6-section .instructions-section h4 {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2f3b45;
}

.game-6-section .instructions-section .tutorial-steps {
    display: grid;
    gap: 10px;
}

.game-6-section .instructions-section .tutorial-steps p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #2f3b45;
    background: #f8fafb;
    border: 1px solid #eef2f4;
    border-left: 4px solid #2d9ca9;
    border-radius: 12px;
    padding: 12px 14px;
}

.game-6-section .instructions-section .tutorial-steps p strong {
    color: #1d2b36;
}

.game-6-section .instructions-section .tutorial-steps p:first-child {
    background: linear-gradient(180deg, #f2fbfd, #f8fafb);
    border-left-color: #4a90e2;
}

@media (max-width: 576px) {
    .game-6-section .instructions-section {
        padding: 16px;
        border-radius: 12px;
    }
    .game-6-section .instructions-section h4 { font-size: 1.1rem; }
    .game-6-section .instructions-section .tutorial-steps p { font-size: 0.95rem; }
}

/* Header controls alignment (consistent with other games) */
.game-6-section .game-controls {
    display: flex;
    gap: 12px;
}

.game-6-section .game-controls .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

/* Reuse Game 2 pill controls for consistency */
.game-6-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-6-section .control-pill:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,0.08); }
.game-6-section .control-pill .label, .game-6-section .control-pill span { white-space: nowrap; }
.game-6-section .control-pill i { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.game-6-section .control-pill--primary { border-color: #cfe9f2; }
.game-6-section .control-pill--primary i { background: linear-gradient(135deg, #2d9ca9, #4a90e2); color: #fff; }
.game-6-section .control-pill--secondary { border-color: #e1e7ea; }
.game-6-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);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.game-image-container:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
}

.overlay-content i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.overlay-content p {
    margin: 0;
    font-weight: 500;
    font-size: 1.1rem;
}

/* 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;
}

/* Carousel Modal Styles */
#imageCarouselModal .modal-dialog {
    max-width: 90vw;
}

#imageCarouselModal .carousel {
    border-radius: 12px;
    overflow: hidden;
}

#imageCarouselModal .carousel-item img {
    max-height: 80vh;
    object-fit: contain;
    background-color: #f8f9fa;
}

#imageCarouselModal .carousel-indicators {
    bottom: 10px;
}

#imageCarouselModal .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #2d9ca9;
    border: 2px solid #2d9ca9;
}

#imageCarouselModal .carousel-indicators button.active {
    background-color: #fff;
}

#imageCarouselModal .carousel-control-prev,
#imageCarouselModal .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;
}

.draggable-item {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
    height: 150px;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    touch-action: none;
    -ms-touch-action: none;
}

.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;
    -webkit-user-drag: none;
    user-drag: none;
}

.draggable-item span {
    font-size: 13px;
    text-align: center;
    font-weight: 700;
    line-height: 1.25;
    color: #2d9ca9;
}

.basket {
    margin-bottom: 20px;
}

.basket-container {
    background: linear-gradient(180deg, #f7fbff, #f9fafe);
    border: 2px dashed #cfe9f2;
    border-radius: 14px;
    min-height: 150px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.basket-container.highlight { background-color: rgba(45, 156, 169, 0.08); border-color: #2D9CA9; }

.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;
        margin: 6px;
    }
    
    .draggable-item img {
        width: 70px;
        height: 70px;
    }
    
    .draggable-item span {
        font-size: 12px;
    }
    
    .overlay-content i {
        font-size: 1.5rem;
    }
    
    .overlay-content p {
        font-size: 0.9rem;
    }
    
    .main-game-image-section {
        padding: 0 10px;
    }
    
    .game-image-container {
        border-radius: 8px;
    }
    
    .basket-container {
        min-height: 100px;
        padding: 10px;
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    .game-controls button,
    .btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    #items-container {
        gap: 8px !important;
    }
}

@media (max-width: 768px) {
    .basket-container {
        min-height: 120px;
    }
    
    #imageCarouselModal .modal-dialog {
        max-width: 95vw;
        margin: 10px;
    }
    
    #imageCarouselModal .carousel-control-prev,
    #imageCarouselModal .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }
    
    .row.g-4 {
        flex-direction: column;
        gap: 0 !important;
    }
    
    .col-md-6 {
        width: 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .main-game-image-section {
        margin-bottom: 20px;
    }
    
    .main-game-image {
        max-width: 100%;
        height: auto;
    }
    
    .draggable-item { width: 130px; height: 130px; padding: 12px; margin: 6px; }
    .draggable-item img { width: 80px; height: 80px; }
    .draggable-item span { font-size: 12px; }
    
    .basket-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 15px;
    }
    
    .progress {
        height: 8px;
    }
    
    .game-controls button,
    .btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 1rem;
        padding: 10px 16px;
    }
    
    .tutorial-steps p {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .modal-dialog {
        margin: 15px;
    }
    
    .card-body {
        padding: 20px !important;
    }
}

@media (max-width: 480px) {
    .draggable-item {
        width: 80px;
        height: 80px;
        padding: 6px;
        margin: 4px;
    }
    
    .draggable-item img {
        width: 30px;
        height: 30px;
        margin-bottom: 5px;
    }
    
    .draggable-item span {
        font-size: 9px;
        line-height: 1.1;
    }
    
    .basket-container {
        min-height: 90px;
        padding: 8px;
    }
    
    .basket h5 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .main-game-image-section {
        padding: 0 5px;
        margin-bottom: 15px;
    }
    
    .game-controls button,
    .btn {
        font-size: 0.85rem;
        padding: 8px 10px;
        margin: 2px;
    }
    
    .card-body {
        padding: 15px !important;
    }
    
    .modal-content {
        border-radius: 6px;
    }
    
    .tutorial-steps p {
        font-size: 0.9rem;
    }
    
    #items-container {
        gap: 6px !important;
        justify-content: center;
    }
    
    .progress {
        height: 6px;
    }
}

/* Game 6 - Temperature & Humidity - Specific Styles */
.game-6-section .basket-container[data-type="mold-risk"] .basket-overlay i {
    color: #9c27b0;
}

.game-6-section .basket-container[data-type="healthy-condition"] .basket-overlay i {
    color: #009688;
}

.game-6-section .draggable-item[data-type="mold-risk"].correct-item {
    border-color: #9c27b0;
    background-color: rgba(156, 39, 176, 0.05);
}

.game-6-section .draggable-item[data-type="healthy-condition"].correct-item {
    border-color: #009688;
    background-color: rgba(0, 150, 136, 0.05);
} 