/* css/interact-system.css */
/* InteractSystem 專用樣式 - 淺色主題（羊皮紙/米黃色調） */

/* 容器 - 淺色背景 */
.interact-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #e5d7c3;  /* 羊皮紙底色 */
    z-index: 3500;
    overflow: hidden;
}

/* 主面板 - 米黃色調 */
.interact-panel {
    width: 1280px;
    height: 720px;
    background: linear-gradient(145deg, #fef9e8, #f5ecd8);
    border-radius: 0px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 20px;
    position: absolute;
    top: 0;
    left: 0;
}

/* 標題 - 深咖啡色 */
.interact-title {
    text-align: center;
    font-size: 36px;
    color: #5c4a2a;
    margin-bottom: 20px;
    font-weight: bold;
    flex-shrink: 0;
    z-index: 10;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
}

/* 遊戲區域 - 淺色底 */
.interact-game-area {
    flex: 1;
    background: rgba(210, 180, 140, 0.15);
    border-radius: 16px;
    position: relative;
    overflow: visible;
    margin-bottom: 20px;
    min-height: 0;
    border: 1px solid rgba(139, 115, 85, 0.3);
}

/* 放置區域容器 */
.interact-drop-zones {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* 單個放置區 - 淺色 */
.interact-drop-zone {
    min-width: 160px;
    min-height: 120px;
    background: rgba(210, 180, 140, 0.2);
    border: 2px dashed #c4a67a;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    transition: all 0.2s;
    position: relative;
    flex: 1;
    z-index: 1;
    backdrop-filter: blur(2px);
}

/* 放置區標題 - 深咖啡色 */
.interact-zone-title {
    color: #5c4a2a;
    font-weight: bold;
    margin-bottom: 8px;
}

/* 放置區提示 - 棕色 */
.interact-zone-hint {
    color: #8b7355;
    text-align: center;
}

/* 放置區內已放置物品容器 */
.interact-zone-placed {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-height: 80px;
}

/* 進度條容器 */
.interact-progress-container {
    margin-top: 15px;
    flex-shrink: 0;
    z-index: 10;
}

/* 進度條 */
.interact-progress-bar {
    height: 12px;
    background: rgba(139, 115, 85, 0.2);
    border-radius: 6px;
    overflow: hidden;
}

/* 進度條填充 - 暖橙色 */
.interact-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #e67e22, #f39c12);
    transition: width 0.3s;
}

/* 訊息區域 */
.interact-message {
    text-align: center;
    color: #e67e22;
    font-size: 18px;
    margin-top: 10px;
    min-height: 35px;
    font-weight: bold;
}

/* 關閉按鈕 */
.interact-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #e67e22;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 16px;
    z-index: 100;
    transition: all 0.2s;
}

.interact-close-btn:hover {
    background: #f39c12;
    transform: scale(1.05);
}

/* 可拖曳物件 - 淺色木質風格 */
.interact-drag-item {
    background: linear-gradient(145deg, #f5e6d3, #e8d5bc);
    border: 3px solid #e67e22;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s, transform 0.2s;
    touch-action: none;
    position: absolute;
    overflow: hidden;
}

.interact-drag-item:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.interact-drag-item:active {
    cursor: grabbing;
}

/* 拖曳時的文字標籤 - 深色底但淺色風格的文字 */
.interact-drag-label {
    background: rgba(60, 40, 20, 0.9);
    color: #ffd700;
    font-weight: bold;
    white-space: nowrap;
    z-index: 10001;
    pointer-events: none;
    border: 2px solid #e67e22;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: labelFadeIn 0.1s ease-out;
}

/* 高亮放置區 */
.interact-drop-zone.highlight {
    background: rgba(230, 126, 34, 0.25);
    border: 3px solid #ffd700;
    transform: scale(1.02);
}

/* ========== 動畫 ========== */
@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes popupAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes labelFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 知識卡動畫 */
@keyframes knowledgeCardAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 知識卡滾動條樣式 */
.knowledge-card ::-webkit-scrollbar {
    width: 6px;
}

.knowledge-card ::-webkit-scrollbar-track {
    background: #f5ecd8;
    border-radius: 3px;
}

.knowledge-card ::-webkit-scrollbar-thumb {
    background: #e67e22;
    border-radius: 3px;
}

/* 已配對的物件 - 不可拖曳 */
.interact-drag-item[data-matched="true"] {
    cursor: default;
    opacity: 0.85;
    filter: grayscale(0.1);
}

.interact-drag-item[data-matched="true"]:active {
    cursor: default;
}

/* ========== 響應式調整 ========== */
@media (max-width: 920px) and (orientation: landscape) {
    .interact-title {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .interact-drop-zone {
        min-width: 130px;
        min-height: 100px;
        padding: 8px;
    }
    
    .interact-zone-title {
        font-size: 16px;
    }
    
    .interact-zone-hint {
        font-size: 12px;
    }
    
    .interact-close-btn {
        padding: 6px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) and (orientation: landscape) {
    .interact-title {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .interact-drop-zone {
        min-width: 110px;
        min-height: 85px;
        padding: 6px;
    }
    
    .interact-zone-title {
        font-size: 14px;
    }
    
    .interact-zone-hint {
        font-size: 11px;
    }
    
    .interact-progress-bar {
        height: 8px;
    }
    
    .interact-message {
        font-size: 14px;
        margin-top: 6px;
        min-height: 28px;
    }
    
    .interact-close-btn {
        padding: 5px 12px;
        font-size: 12px;
        top: 10px;
        right: 15px;
    }
}