/* 模态框样式 */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #1a1a3a 0%, #2a2a4a 100%);
    border: 2px solid #4a8ac8;
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 30px rgba(74, 138, 200, 0.5);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    color: #4a8ac8;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.5rem;
}

.modal-btn {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, #4a8ac8, #8a4ac8);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin: 0.5rem;
    box-shadow: 0 2px 10px rgba(74, 138, 200, 0.3);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 138, 200, 0.5);
}

.modal-btn:active {
    transform: translateY(0);
}

.modal-btn.cancel {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
}

.modal-btn.cancel:hover {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
}

.modal-btn.confirm {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

.modal-btn.confirm:hover {
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.5);
}

/* 对话框样式 */
#dialog-modal .modal-content {
    max-width: 600px;
}

#dialog-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-align: justify;
}

#dialog-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.dialog-option {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(74, 138, 200, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: white;
}

.dialog-option:hover {
    background: rgba(74, 138, 200, 0.3);
    border-color: #4a8ac8;
    transform: translateX(5px);
}

.dialog-option.selected {
    background: rgba(74, 138, 200, 0.5);
    border-color: #4a8ac8;
    box-shadow: 0 0 15px rgba(74, 138, 200, 0.3);
}

/* 捕捉界面样式 */
#capture-modal .modal-content {
    max-width: 400px;
}

#token-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.token-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(74, 138, 200, 0.3);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.token-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4a8ac8;
    transform: translateY(-2px);
}

.token-item.selected {
    background: rgba(74, 138, 200, 0.3);
    border-color: #4a8ac8;
    box-shadow: 0 0 20px rgba(74, 138, 200, 0.5);
}

.token-item.selected::after {
    content: "✓";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #4ecdc4;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.token-name {
    font-weight: bold;
    color: #4a8ac8;
    margin-bottom: 0.5rem;
}

.token-rate {
    font-size: 0.8rem;
    color: #8a8a8a;
}

.token-count {
    font-size: 0.9rem;
    color: #ffd93d;
    margin-top: 0.5rem;
}

/* 物品使用界面样式 */
#item-modal .modal-content {
    max-width: 450px;
}

#item-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.5rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.item-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(74, 138, 200, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.item-option:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4a8ac8;
}

.item-option.selected {
    background: rgba(74, 138, 200, 0.3);
    border-color: #4a8ac8;
    box-shadow: 0 0 15px rgba(74, 138, 200, 0.3);
}

.item-option-info {
    flex: 1;
}

.item-option-name {
    font-weight: bold;
    color: #4a8ac8;
    margin-bottom: 0.3rem;
}

.item-option-description {
    font-size: 0.8rem;
    color: #8a8a8a;
}

.item-option-count {
    background: rgba(74, 138, 200, 0.2);
    border: 1px solid #4a8ac8;
    border-radius: 15px;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    color: #4a8ac8;
}

/* 确认对话框样式 */
.confirm-modal .modal-content {
    max-width: 350px;
    text-align: center;
}

.confirm-modal .modal-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.5;
}

.confirm-modal .modal-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* 输入对话框样式 */
.input-modal .modal-content {
    max-width: 400px;
}

.input-modal input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(74, 138, 200, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.input-modal input::placeholder {
    color: #8a8a8a;
}

.input-modal input:focus {
    outline: none;
    border-color: #4a8ac8;
    box-shadow: 0 0 10px rgba(74, 138, 200, 0.3);
}

/* 列表选择对话框样式 */
.list-modal .modal-content {
    max-width: 500px;
}

.list-modal .modal-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
}

.list-modal .list-item {
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(74, 138, 200, 0.3);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.list-modal .list-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4a8ac8;
}

.list-modal .list-item.selected {
    background: rgba(74, 138, 200, 0.3);
    border-color: #4a8ac8;
    box-shadow: 0 0 15px rgba(74, 138, 200, 0.3);
}

/* 关闭按钮 */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #8a8a8a;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ff6b6b;
}

/* 模态框动画变体 */
.modal.slide-up .modal-content {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal.slide-left .modal-content {
    animation: slideLeft 0.3s ease-out;
}

@keyframes slideLeft {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .modal-content h3 {
        font-size: 1.3rem;
    }
    
    #dialog-text {
        font-size: 1rem;
    }
    
    .dialog-option {
        padding: 0.8rem;
    }
    
    #token-list {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.8rem;
    }
    
    .token-item {
        padding: 0.8rem;
    }
    
    .confirm-modal .modal-buttons {
        flex-direction: column;
    }
    
    .modal-btn {
        margin: 0.3rem;
        padding: 0.7rem 1.2rem;
    }
} 